### Configure Gwyddion MinGW Cross-Compilation Setup Variables Source: https://gwyddion.net/documentation/user-guide-en/installation-cross-mingw32 This code block shows an example of the `setup32` configuration file, which defines critical paths for the Gwyddion source code, MinGW installation, target installation directory, Win32 Python, and NSIS compiler. Users need to review and potentially adjust these variables, especially `source_dir`, before starting the cross-compilation process. ```Shell source_dir=$HOME/Projects/Gwyddion/gwyddion-mingw mingw_prefix=/usr/i686-pc-mingw32/sys-root/mingw target_prefix=$HOME/opt/gwyddion-mingw32 python_dir=$HOME/.wine/drive_c/Python27 nsis_compiler=C:\\Program\\ Files\\ \(x86\\)\\NSIS\\makensis.exe ``` -------------------------------- ### Install NSIS (Nullsoft Scriptable Install System) under Wine Source: https://gwyddion.net/documentation/user-guide-en/installation-cross-mingw32 Install NSIS, a Windows program used for creating the Gwyddion installer, by running its setup executable through Wine. Version 3.06 or newer is recommended. ```Windows Command Prompt wine nsis-3.06-setup.exe ``` -------------------------------- ### Start Using a GwyResource Source: https://gwyddion.net/documentation/head/libgwyddion/GwyResource Initializes a GwyResource for proper use, creating auxiliary structures and performing necessary setup. This function acts as a constructor from a usage perspective and increments the GObject reference count. Resources should be released with `gwy_resource_release()` when no longer needed. ```C void gwy_resource_use (GwyResource *resource); ``` ```APIDOC gwy_resource_use: resource: A resource. Returns: void ``` -------------------------------- ### Document API Introduction: gwy.ShapeFitPreset.setup Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `setup` method within the `gwy.ShapeFitPreset` class, introduced in version 2.47. This method is part of the Gwyddion library's API. ```APIDOC gwy.ShapeFitPreset.setup ``` -------------------------------- ### Get 3D Setup Object from Gwy3DView Source: https://gwyddion.net/documentation/libgwydgets/Gwy3DView Gets the 3D setup object of a 3D view. This is a convenience method that can be used instead of fetching the setup object from the data container. ```C Gwy3DSetup * gwy_3d_view_get_setup (Gwy3DView *gwy3dview); ``` ```APIDOC gwy_3d_view_get_setup(gwy3dview) Gets the 3D setup object of a 3D view. Parameters: gwy3dview: Gwy3DView * - A 3D data view widget. Returns: Gwy3DSetup * - The corresponding 3D setup. ``` -------------------------------- ### gwy.gwy_app_setup_logging Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the gwy.gwy_app_setup_logging function in version 2.45. ```APIDOC gwy.gwy_app_setup_logging ``` -------------------------------- ### Get Gwy3DView Setup Prefix Source: https://gwyddion.net/documentation/head/libgwydgets/Gwy3DView Retrieves the prefix identifying the 3D view setup within the container. ```C const gchar * gwy_3d_view_get_setup_prefix (Gwy3DView *gwy3dview); ``` ```APIDOC Parameters: gwy3dview: A 3D data view widget. Returns: The setup key prefix. ``` -------------------------------- ### Create new Gwy3DSetup instance Source: https://gwyddion.net/documentation/head/libgwydgets/Gwy3DSetup Documents the `gwy_3d_setup_new` function, which creates a new 3D view setup with default values. It returns a pointer to the newly created `Gwy3DSetup` object. ```APIDOC Function: gwy_3d_setup_new Signature: Gwy3DSetup * gwy_3d_setup_new (void) Description: Creates a new 3D view setup with default values. Returns: A newly created 3D view setup. ``` -------------------------------- ### Introduce get Method in gwy.Surface Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `get` method within the `gwy.Surface` class, first available in Gwyddion version 2.45. ```APIDOC gwy.Surface.get ``` -------------------------------- ### Display GNU GPL Interactive Program Startup Notice Source: https://gwyddion.net/documentation/user-guide-en/gpl This example shows a short notice to be displayed by interactive programs upon startup, informing users about the program's free software status, lack of warranty, and where to find more details about the license terms. ```Text Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type "show w". This is free software, and you are welcome to redistribute it under certain conditions; type "show c" for details. ``` -------------------------------- ### Get 3D View Setup Object (C) Source: https://gwyddion.net/documentation/head/libgwydgets/Gwy3DView Retrieves the 3D setup object associated with a 3D view. This function provides a convenient way to access the setup object without directly fetching it from the data container. ```C Gwy3DSetup * gwy_3d_view_get_setup (Gwy3DView *gwy3dview); ``` ```APIDOC gwy_3d_view_get_setup: description: Gets the 3D setup object of a 3D view. This is a convenience method that can be used instead of fetching the setup object from the data container. parameters: gwy3dview: type: Gwy3DView * description: A 3D data view widget. returns: type: Gwy3DSetup * description: The corresponding 3D setup. ``` -------------------------------- ### Document gwy.gwy_volume_func_run API Introduction Source: https://gwyddion.net/documentation/head/pygwy/since-index Provides an introduction and version information for the `gwy.gwy_volume_func_run` API function, indicating its first appearance in the Gwyddion `gwy` module. ```APIDOC gwy.gwy_volume_func_run (Introduced in version 2.32) ``` -------------------------------- ### Document API Introduction: gwy.Spectra.__init__ Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `__init__` method within the `gwy.Spectra` class, introduced in version 2.7. This method is part of the Gwyddion library's API. ```APIDOC gwy.Spectra.__init__ ``` -------------------------------- ### Get Gwy3DView Setup Prefix Source: https://gwyddion.net/documentation/libgwydgets/Gwy3DView Retrieves the string prefix used to identify the 3D view's setup parameters within its container. This prefix helps organize and locate view-specific settings. ```C const gchar * gwy_3d_view_get_setup_prefix (Gwy3DView *gwy3dview); ``` ```APIDOC Function: gwy_3d_view_get_setup_prefix Parameters: gwy3dview: A 3D data view widget. Returns: The setup key prefix. ``` -------------------------------- ### Document gwy.gwy_xyz_func_run API Introduction Source: https://gwyddion.net/documentation/head/pygwy/since-index Provides an introduction and version information for the `gwy.gwy_xyz_func_run` API function, indicating its first appearance in the Gwyddion `gwy` module. ```APIDOC gwy.gwy_xyz_func_run (Introduced in version 2.45) ``` -------------------------------- ### C Example: Deserializing an Object with gwy_serialize_unpack_object_struct Source: https://gwyddion.net/documentation/libgwyddion/GwySerializable Illustrates how to use 'gwy_serialize_unpack_object_struct' to deserialize a simple object with a single real number 'foo'. This example shows the setup of 'GwySerializeSpec' and the call to the deserialization function, omitting error checking for brevity. ```C static GObject* my_object_deserialize(const guchar *buffer, gsize size, gsize *position) { double foo = 1.0; GwySerializeSpec spec[] = { { 'd', "foo", &foo, NULL, }, }; MyObject *my_object; gwy_serialize_unpack_object_struct(buffer, size, position, "MyObject", G_N_ELEMENTS(spec), spec); return my_object_new(foo); } ``` -------------------------------- ### Get Y-Offset of GwyLawn Origin Source: https://gwyddion.net/documentation/head/libgwyprocess/GwyLawn Retrieves the offset of the data lawn origin in the y direction. This value represents the starting point along the Y-axis. ```C gdouble gwy_lawn_get_yoffset (GwyLawn *lawn); ``` ```APIDOC Parameters: lawn (GwyLawn *): A data lawn. Returns: gdouble: Offset value. ``` -------------------------------- ### Document gwy.RGBA.__init__ API Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the gwy.RGBA.__init__ API element within the gwy library. ```APIDOC gwy.RGBA.__init__ ``` -------------------------------- ### Get Z-axis Offset of GwyBrick Source: https://gwyddion.net/documentation/head/libgwyprocess/api-index-2-31 Retrieves the offset value for the Z-axis of the GwyBrick, typically representing the physical origin or starting point of the data along this dimension. ```APIDOC gwy_brick_get_zoffset() ``` -------------------------------- ### Gwy3DSetup API Reference Source: https://gwyddion.net/documentation/libgwydgets/Gwy3DSetup Comprehensive API documentation for the Gwy3DSetup object, detailing its structure, functions, properties, and inheritance within the Gwyddion library. ```APIDOC Class: Gwy3DSetup Description: Represents a basic 3D scene setup: viewpoint, projection, light, scale, etc. Inherits: GObject Implements: GwySerializable Includes: #include Functions: gwy_3d_setup_new(): Signature: Gwy3DSetup * gwy_3d_setup_new (void); Description: Creates a new 3D view setup with default values. Returns: A newly created 3D view setup. Properties: axes-visible: Type: gboolean Description: Whether axes are visible. Flags: Read / Write Default: TRUE fmscale-reserve-space: Type: gboolean Description: Whethere to reserve entire vertical stripe of the false colour scale. Flags: Read / Write Default: TRUE Since: 2.49 fmscale-size: Type: double Description: Size of false colour scale relative to view height. Flags: Read / Write Allowed values: [0,1] Default: 1 Since: 2.49 fmscale-visible: Type: gboolean Description: Whether false color bar is visible. Flags: Read / Write Default: FALSE fmscale-y-align: Type: double Description: Vertical alignment of false colour scale. Flags: Read / Write Allowed values: [0,1] Default: 0.5 Since: 2.49 hide-masked: Type: gboolean Description: Hide masked vertices. Flags: Read / Write Default: FALSE labels-visible: Type: gboolean Description: Whether axis labels are visible if axes are visible. Flags: Read / Write Default: TRUE Types and Values: struct Gwy3DSetup; struct Gwy3DSetupClass: Definition: GObjectClass parent_class; void (*reserved1)(void); void (*reserved2)(void); ``` -------------------------------- ### Get Y-axis Offset of GwyBrick Source: https://gwyddion.net/documentation/head/libgwyprocess/api-index-2-31 Retrieves the offset value for the Y-axis of the GwyBrick, typically representing the physical origin or starting point of the data along this dimension. ```APIDOC gwy_brick_get_yoffset() ``` -------------------------------- ### API Introduction: gwy.DataField.affine_prepare Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.DataField.affine_prepare` method in Gwyddion .NET API version 2.49. ```APIDOC gwy.DataField.affine_prepare (Introduced in version 2.49) ``` -------------------------------- ### API Introduction: gwy.Brick.__init__ Source: https://gwyddion.net/documentation/head/pygwy/since-index An introduction or reference to the `gwy.Brick.__init__` method, first appearing in version 2.31. ```APIDOC gwy.Brick.__init__ ``` -------------------------------- ### Get X-axis Offset of GwyBrick Source: https://gwyddion.net/documentation/head/libgwyprocess/api-index-2-31 Retrieves the offset value for the X-axis of the GwyBrick, typically representing the physical origin or starting point of the data along this dimension. ```APIDOC gwy_brick_get_xoffset() ``` -------------------------------- ### gwy.DataLine.fft_window Method Introduction Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `fft_window` method within the `gwy.DataLine` class, indicating its availability from version 2.62. ```APIDOC gwy.DataLine.fft_window() Introduced: 2.62 ``` -------------------------------- ### Get X-Offset of GwyLawn Origin Source: https://gwyddion.net/documentation/head/libgwyprocess/GwyLawn Retrieves the offset of the data lawn origin in the x direction. This value represents the starting point along the X-axis. ```C gdouble gwy_lawn_get_xoffset (GwyLawn *lawn); ``` ```APIDOC Parameters: lawn (GwyLawn *): A data lawn. Returns: gdouble: Offset value. ``` -------------------------------- ### Typical GwyNLFitPreset Usage Example Source: https://gwyddion.net/documentation/head/libgwyddion/GwyNLFitPreset This C code example illustrates the typical workflow for using GwyNLFitPreset to perform non-linear fitting. It demonstrates how to retrieve a specific preset (e.g., 'Gaussian'), allocate memory for parameters and errors, guess initial parameter values, execute the fitting process, and properly free allocated resources. ```C GwyNLFitPreset *preset; GwyNLFitter *fitter; gdouble *params, *errors; preset = gwy_inventory_get_item(gwy_nlfit_presets(), "Gaussian"); params = g_new(gdouble, gwy_nlfit_preset_get_nparams(preset)); errors = g_new(gdouble, gwy_nlfit_preset_get_nparams(preset)); /* Use a priori parameter value information, or: */ gwy_nlfit_preset_guess(preset, ndata, xdata, ydata, params, &ok); fitter = gwy_nlfit_preset_fit(preset, NULL, ndata, xdata, ydata, params, params, errors, NULL); /* Examine fitting status, parameters and errors... */ g_free(params); g_free(errors); gwy_math_nlfit_free(fitter); ``` -------------------------------- ### Get Current Text Header Context Line Number (C) Source: https://gwyddion.net/documentation/libgwyapp/libgwyapp-file-module-utils Retrieves the current line number being processed within a GwyTextHeaderContext. Line numbers start from zero. ```C guint gwy_text_header_context_get_lineno (const GwyTextHeaderContext *context); ``` ```APIDOC gwy_text_header_context_get_lineno: Gets the current header line. Parameters: context: Header parsing context. Returns: The current line number, starting from zero. Since: 2.18 ``` -------------------------------- ### Get Y Offset for GwyDataField Source: https://gwyddion.net/documentation/head/libgwyprocess/api-index-all Retrieves the Y-axis offset of a GwyDataField. This function indicates the starting position of the data field along the vertical axis. It is part of the GwyDataField module. ```APIDOC gwy_data_field_get_yoffset() Type: function Module: GwyDataField ``` -------------------------------- ### Introduce gwy.gwy_app_data_browser_copy_xyz Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_data_browser_copy_xyz` function, indicating its availability from version 2.45 onwards. ```APIDOC Function: gwy.gwy_app_data_browser_copy_xyz Introduced in version: 2.45 ``` -------------------------------- ### API Introduction: gwy.AppDataId.verify_spectra Source: https://gwyddion.net/documentation/head/pygwy/since-index An introduction or reference to the `gwy.AppDataId.verify_spectra` method, first appearing in version 2.41. ```APIDOC gwy.AppDataId.verify_spectra ``` -------------------------------- ### Get Current Text Header Context Line Number Source: https://gwyddion.net/documentation/head/libgwyapp/libgwyapp-file-module-utils Retrieves the current line number being processed within a GwyTextHeaderContext. The line numbering starts from zero. ```C guint gwy_text_header_context_get_lineno (const GwyTextHeaderContext *context); ``` ```APIDOC gwy_text_header_context_get_lineno(): Description: Gets the current header line. Parameters: context: type: const GwyTextHeaderContext * description: Header parsing context. Returns: type: guint description: The current line number, starting from zero. Since: 2.18 ``` -------------------------------- ### Get GwyTipModel Preset Group Name Source: https://gwyddion.net/documentation/head/libgwyprocess/libgwyprocess-tip Retrieves the group name to which a `GwyTipModelPreset` belongs, for example, 'analytical'. This helps categorize and organize different tip models. ```APIDOC gwy_tip_model_get_preset_group_name: Signature: const gchar * gwy_tip_model_get_preset_group_name (const GwyTipModelPreset *preset) Parameters: preset: const GwyTipModelPreset * (Tip model preset) Returns: const gchar * (Preset group name) ``` -------------------------------- ### Introduce gwy.gwy_app_data_browser_find_volume_by_title Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_data_browser_find_volume_by_title` function, indicating its availability from version 2.45 onwards. ```APIDOC Function: gwy.gwy_app_data_browser_find_volume_by_title Introduced in version: 2.45 ``` -------------------------------- ### Get X Offset for GwyDataField Source: https://gwyddion.net/documentation/head/libgwyprocess/api-index-all Retrieves the X-axis offset of a GwyDataField. This function indicates the starting position of the data field along the horizontal axis. It is part of the GwyDataField module. ```APIDOC gwy_data_field_get_xoffset() Type: function Module: GwyDataField ``` -------------------------------- ### Introduce gwy.gwy_app_current_tool Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_current_tool` function, indicating its availability from version 2.55 onwards. ```APIDOC Function: gwy.gwy_app_current_tool Introduced in version: 2.55 ``` -------------------------------- ### Get Value Format for Y-Coordinates (gwy.DataLine) Source: https://gwyddion.net/documentation/head/pygwy/gwy.DataLine-class This method finds a suitable value format for displaying the values (Y-coordinates) of a data line. It takes a style parameter to guide the formatting. ```APIDOC gwy.DataLine.get_value_format_y(style) ``` -------------------------------- ### Check Help System Availability (C API) Source: https://gwyddion.net/documentation/head/libgwyapp/libgwyapp-help Performs a weak check to determine if the help system is potentially available. It verifies the presence of a help backend, the user guide module map, and local user guide directory if applicable. A `TRUE` return does not guarantee full functionality, but `FALSE` indicates help will not work. ```C gboolean gwy_help_is_available (void); ``` ```APIDOC gwy_help_is_available: Parameters: None Returns: gboolean - TRUE if help seems available, FALSE if it is not. Since: 2.38 ``` -------------------------------- ### Get Y Offset of DataField Origin Source: https://gwyddion.net/documentation/head/pygwy/gwy.DataField-class Retrieves the Y offset of the data field's origin. This indicates the physical starting position along the Y-axis relative to a global coordinate system. ```APIDOC gwy.DataField.get_yoffset() ``` -------------------------------- ### Document gwy.SelectionGraphZoom.__init__ API Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the gwy.SelectionGraphZoom.__init__ API element within the gwy library. ```APIDOC gwy.SelectionGraphZoom.__init__ ``` -------------------------------- ### Introduce gwy.gwy_app_data_browser_copy_volume Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_data_browser_copy_volume` function, indicating its availability from version 2.32 onwards. ```APIDOC Function: gwy.gwy_app_data_browser_copy_volume Introduced in version: 2.32 ``` -------------------------------- ### Get Value Format for X-Coordinates (gwy.DataLine) Source: https://gwyddion.net/documentation/head/pygwy/gwy.DataLine-class This method finds a suitable value format for displaying the coordinates along the X-axis of a data line. It takes a style parameter to guide the formatting. ```APIDOC gwy.DataLine.get_value_format_x(style) ``` -------------------------------- ### Gwyddion Expression Language: Identifiers Source: https://gwyddion.net/documentation/user-guide-en/expression-syntax Examples of valid identifiers for functions, constants, and variables in the Gwyddion expression language. Identifiers start with a letter and can contain letters, numbers, or underscores. ```Gwyddion Expression Language pow10 Pi d2_2 ``` -------------------------------- ### Introduce gwy.gwy_app_data_browser_select_volume Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_data_browser_select_volume` function, indicating its availability from version 2.32 onwards. ```APIDOC Function: gwy.gwy_app_data_browser_select_volume Introduced in version: 2.32 ``` -------------------------------- ### Introduce gwy.gwy_app_data_browser_get Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_data_browser_get` function, indicating its availability from version 2.41 onwards. ```APIDOC Function: gwy.gwy_app_data_browser_get Introduced in version: 2.41 ``` -------------------------------- ### Get Number of Preset Graph Colors (C API) Source: https://gwyddion.net/documentation/head/libgwydgets/libgwydgets-GwyGraphBasics Returns the total number of distinct preset colors available through gwy_graph_get_preset_color(). This count indicates how many unique colors can be retrieved before they start repeating. ```APIDOC gwy_graph_get_n_preset_colors(): guint Returns: The number of distinct colors. ``` -------------------------------- ### Get GwyContainer Quark Keys with Prefix Source: https://gwyddion.net/documentation/libgwyddion/GwyContainer Retrieves quark keys from a GwyContainer that start with a given prefix. This function returns a newly allocated, zero-terminated array of GQuark keys. The number of keys can optionally be stored in `n`. ```C GQuark * gwy_container_keys_with_prefix (GwyContainer *container, const gchar *prefix, guint *n); ``` ```APIDOC Function: gwy_container_keys_with_prefix Parameters: container: GwyContainer * - A container. prefix: const gchar * - A nul-terminated id prefix. n: guint * - Location to store the number of keys to. Can be NULL. Returns: GQuark * - A newly allocated array with quark keys, in no particular order. The array is zero-terminated. Since: 2.50 ``` -------------------------------- ### gwy.gwy_app_find_window_for_volume API Introduction Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the 'gwy.gwy_app_find_window_for_volume' function in Gwyddion version 2.42. ```APIDOC gwy.gwy_app_find_window_for_volume Introduced: 2.42 ``` -------------------------------- ### Get X Offset of DataField Origin Source: https://gwyddion.net/documentation/head/pygwy/gwy.DataField-class Retrieves the X offset of the data field's origin. This indicates the physical starting position along the X-axis relative to a global coordinate system. ```APIDOC gwy.DataField.get_xoffset() ``` -------------------------------- ### gwy.DataLine.check_compatibility_with_brick_z Method Introduction Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `check_compatibility_with_brick_z` method within the `gwy.DataLine` class, indicating its availability from version 2.51. ```APIDOC gwy.DataLine.check_compatibility_with_brick_z() Introduced: 2.51 ``` -------------------------------- ### Build Gwyddion Windows Installer Source: https://gwyddion.net/documentation/user-guide-en/installation-cross-mingw32 These commands execute the `cross-build-32` or `cross-build-64` scripts, which automate all steps necessary to cross-compile Gwyddion and create a Windows installer for the specified architecture. Upon successful completion, the executable installer will be located in the `$target_prefix` directory. ```Shell ./cross-build-32 ``` ```Shell ./cross-build-64 ``` -------------------------------- ### GwyContainer: Get Quark Keys with Prefix Source: https://gwyddion.net/documentation/head/libgwyddion/GwyContainer Retrieves quark keys from a GwyContainer that start with a specified prefix. Returns a newly allocated, zero-terminated array of GQuark keys. The number of keys can optionally be stored in `n`. ```C GQuark * gwy_container_keys_with_prefix (GwyContainer *container, const gchar *prefix, guint *n); ``` ```APIDOC Function: gwy_container_keys_with_prefix Description: Gets quark keys of a container that start with given prefix. Parameters: container: GwyContainer * - A container. prefix: const gchar * - A nul-terminated id prefix. n: guint * - Location to store the number of keys to. Can be NULL. Returns: GQuark * - A newly allocated array with quark keys, in no particular order. The array is zero-terminated. Since: 2.50 ``` -------------------------------- ### Document gwy.gwy_widget_sync_sensitivity API Introduction Source: https://gwyddion.net/documentation/head/pygwy/since-index Provides an introduction and version information for the `gwy.gwy_widget_sync_sensitivity` API function, indicating its first appearance in the Gwyddion `gwy` module. ```APIDOC gwy.gwy_widget_sync_sensitivity (Introduced in version 2.8) ``` -------------------------------- ### Introduce gwy.gwy_app_data_browser_get_gui_enabled Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_data_browser_get_gui_enabled` function, indicating its availability from version 2.21 onwards. ```APIDOC Function: gwy.gwy_app_data_browser_get_gui_enabled Introduced in version: 2.21 ``` -------------------------------- ### Get SI Unit Format with Significant Digits (gwy_si_unit_get_format_with_digits) Source: https://gwyddion.net/documentation/libgwyddion/GwySIUnit Determines an appropriate format for representing values with a specified number of significant digits. The resulting format guides how values should be printed, including magnitude, units, and decimal precision. ```C GwySIValueFormat * gwy_si_unit_get_format_with_digits (GwySIUnit *siunit, GwySIUnitFormatStyle style, gdouble maximum, gint sdigits, GwySIValueFormat *format); ``` ```APIDOC Parameters: siunit: An SI unit. style: Unit format style. maximum: The maximum value to be represented. sdigits: The number of significant digits the value should have. format: A value format to set-up, may be NULL, a new value format is allocated then. Returns: The value format. If format was NULL, a newly allocated format is returned, otherwise (modified) format itself is returned. ``` -------------------------------- ### Get Y offset of Gwyddion Lawn origin with Lawn.get_yoffset Source: https://gwyddion.net/documentation/head/pygwy/gwy.Lawn-class Retrieves the offset of the data lawn's origin in the y direction. This offset indicates the starting position of the data within a larger coordinate system. ```APIDOC Lawn.get_yoffset() Description: Gets the offset of data lawn origin in y direction. Returns: float - Offset value. Since: 2.60 ``` -------------------------------- ### C Example: GwyDataView Setup for Data Previews Source: https://gwyddion.net/documentation/head/libgwymodule/gwymodule-tutorial-process This C code demonstrates how to initialize and configure a GwyDataView widget for displaying 2D data previews. It covers creating a GwyContainer, populating it with a data field, instantiating GwyDataView and GwyPixmapLayer, associating the layer with the data key '/0/data', and adjusting the zoom level for the preview. The example illustrates the use of raw data keys for container objects. ```C GtkWidget *data_view; GwyPixmapLayer *layer; GwyContainer *mydata; gdouble zoomval; /* Create new container */ mydata = gwy_container_new(); /* Fill it with objects and auxiliary data, dfield and id were obtained * before. */ gwy_container_set_object_by_name(mydata, "/0/data", dfield); gwy_app_sync_data_items(data, mydata, id, 0, FALSE, GWY_DATA_ITEM_PALETTE, GWY_DATA_ITEM_MASK_COLOR, GWY_DATA_ITEM_RANGE, 0); /* Create the data view and its layers */ data_view = gwy_data_view_new(mydata); layer = gwy_layer_basic_new(); gwy_pixmap_layer_set_data_key(layer, "/0/data"); gwy_layer_basic_set_gradient_key(GWY_LAYER_BASIC(layer), "/0/base/palette"); gwy_data_view_set_base_layer(GWY_DATA_VIEW(data_view), layer); /* Calculate preview size */ zoomval = PREVIEW_SIZE/(gdouble)MAX(gwy_data_field_get_xres(dfield), gwy_data_field_get_yres(dfield)); gwy_data_view_set_zoom(GWY_DATA_VIEW(data_view), zoomval); /* Pack data_view somewhere... */ ``` -------------------------------- ### Quantitative MFM Data Processing Toolchain Example Source: https://gwyddion.net/documentation/user-guide-en/mfm This example provides a comprehensive, step-by-step guide for processing MFM data to obtain quantitative results using Gwyddion. It demonstrates the use of various Gwyddion modules, including force gradient recalculation, thresholding, stray field simulation, transfer function estimation, deconvolution, and arithmetic operations, applied to both calibration and test sample data. ```APIDOC 1. Convert calibration sample MFM phase data to MFM force gradient using [Recalculate to Force Gradient](mfm.html#mfm-data-conversion "Conversion to force gradient") with k 3.3 N/m and Q factor 226. 2. Add mask at 50% of the value using [thresholding](grain-analysis.html#grain-threshold "Thresholding"). 3. Calculate the effective magnetic charge using [Perpendicular Media Stray field](mfm.html#mfm-field-simulation "Simulation of the stray field and MFM response") with 130 nm film thickness, 500 kA/m magnetic charge, 12 pJ/m exchange constant, 400 kJ/m³ uniaxial anisotropy, 0 deg cantilever angle and output Meff. 4. Calculate the TTF using [Transfer Function Guess](convolution-deconvolution.html#transfer-function-guess) with Wiener filter method, 65×65 TTF size and Welch window. 5. Convert MFM phase data of the test sample to MFM force gradient using [Recalculate to Force Gradient](mfm.html#mfm-data-conversion "Conversion to force gradient") with k 3.3 N/m and Q factor 226. 6. Scale the TTF to the pixel size of the test sample. 7. Use [Dimensions and Units](basic-operations.html#dimensions-and-units "Dimensions and Units") to match exactly the pixel size of the test sample measurements. 8. Deconvolve the cropped TTF from MFM force gradient on test sample using [Deconvolve](convolution-deconvolution.html#deconvolve "Image deconvolution"), using the maxium of L-curve curvature for obtaining best sigma. 9. Divide the resulting effective magnetic charge by 2 to get the stray field Hz using [Arithmetic](multidata.html#data-arithmetic "Arithmetic"). ``` -------------------------------- ### Introduce gwy.gwy_app_data_browser_select_brick Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_data_browser_select_brick` function, indicating its availability from version 2.61 onwards. ```APIDOC Function: gwy.gwy_app_data_browser_select_brick Introduced in version: 2.61 ``` -------------------------------- ### gwy_app_setup_logging Source: https://gwyddion.net/documentation/libgwyapp/api-index-all Sets up the application's logging system. This function is part of the logging module. ```APIDOC gwy_app_setup_logging(): function in logging ``` -------------------------------- ### Get GwyTipModel Preset by Name Source: https://gwyddion.net/documentation/head/libgwyprocess/libgwyprocess-tip Retrieves data associated with a specific tip model preset using its string name, for example, 'contact'. This provides a convenient way to access presets by their descriptive names. ```APIDOC gwy_tip_model_get_preset_by_name: Signature: const GwyTipModelPreset * gwy_tip_model_get_preset_by_name (const gchar *name) Parameters: name: const gchar * (Name of tip, e.g., "contact") Returns: const GwyTipModelPreset * (Chosen preset data) ``` -------------------------------- ### Get X offset of Gwyddion Lawn origin with Lawn.get_xoffset Source: https://gwyddion.net/documentation/head/pygwy/gwy.Lawn-class Retrieves the offset of the data lawn's origin in the x direction. This offset indicates the starting position of the data within a larger coordinate system. ```APIDOC Lawn.get_xoffset() Description: Gets the offset of data lawn origin in x direction. Returns: float - Offset value. Since: 2.60 ``` -------------------------------- ### Check Help Availability (C API) Source: https://gwyddion.net/documentation/libgwyapp/libgwyapp-help Check whether help is available. This is a weak check that finds if we have any help-showing backend that might work at all, have the user guide module map, and if the user guide locations is a local directory it checks whether it exists. If it returns `TRUE` it does not guarantee help will work. If it returns `FALSE`, however, it means help will not work. ```C gboolean gwy_help_is_available (void); ``` ```APIDOC gwy_help_is_available: Parameters: - (void) Returns: gboolean - TRUE if help seems available, FALSE if it is not. Since: 2.38 ``` -------------------------------- ### gwy.DataLine.distribution Method Introduction Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `distribution` method within the `gwy.DataLine` class, indicating its availability from version 2.8. ```APIDOC gwy.DataLine.distribution() Introduced: 2.8 ``` -------------------------------- ### Get Sum of Values in Data Line Part (C) Source: https://gwyddion.net/documentation/libgwyprocess/libgwyprocess-linestats This function computes the sum of all data points within a specified part of a GwyDataLine. It takes the data line, a starting index, and an ending index (exclusive) as input. It returns the calculated sum gdouble value. ```C gdouble gwy_data_line_part_get_sum (GwyDataLine *data_line, gint from, gint to); ``` ```APIDOC Function: gwy_data_line_part_get_sum Description: Computes sum of all values in a part of a data line. Parameters: data_line: A data line. from: Index the line part starts at. to: Index the line part ends at + 1. Returns: Sum of all values within the interval. ``` -------------------------------- ### Document API Introduction: gwy.Spectra.xytoi Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `xytoi` method within the `gwy.Spectra` class, introduced in version 2.7. This method is part of the Gwyddion library's API. ```APIDOC gwy.Spectra.xytoi ``` -------------------------------- ### Get Minimum Value of Data Line Part (C) Source: https://gwyddion.net/documentation/libgwyprocess/libgwyprocess-linestats This function finds the minimum value within a specified part of a GwyDataLine. It takes the data line, a starting index, and an ending index (exclusive) as input. It returns the minimum gdouble value found in the interval. ```C gdouble gwy_data_line_part_get_min (GwyDataLine *data_line, gint from, gint to); ``` ```APIDOC Function: gwy_data_line_part_get_min Description: Finds the minimum value of a part of a data line. Parameters: data_line: A data line. from: Index the line part starts at. to: Index the line part ends at + 1. Returns: Minimum within given interval. ``` -------------------------------- ### API Introduction: gwy.Brick.copy_zcalibration Source: https://gwyddion.net/documentation/head/pygwy/since-index An introduction or reference to the `gwy.Brick.copy_zcalibration` method, first appearing in version 2.52. ```APIDOC gwy.Brick.copy_zcalibration ``` -------------------------------- ### Get Maximum Value of Data Line Part (C) Source: https://gwyddion.net/documentation/libgwyprocess/libgwyprocess-linestats This function finds the maximum value within a specified part of a GwyDataLine. It takes the data line, a starting index, and an ending index (exclusive) as input. It returns the maximum gdouble value found in the interval. ```C gdouble gwy_data_line_part_get_max (GwyDataLine *data_line, gint from, gint to); ``` ```APIDOC Function: gwy_data_line_part_get_max Description: Finds the maximum value of a part of a data line. Parameters: data_line: A data line. from: Index the line part starts at. to: Index the line part ends at + 1. Returns: Maximum within given interval. ``` -------------------------------- ### Get Minimum Value of Data Line Part (Gwyddion C API) Source: https://gwyddion.net/documentation/head/libgwyprocess/libgwyprocess-linestats Finds the minimum value within a specified part of a GwyDataLine. This function takes the data line object, a starting index, and an ending index (exclusive) to define the segment of interest. ```APIDOC gdouble gwy_data_line_part_get_min (GwyDataLine *data_line, gint from, gint to) Parameters: data_line (GwyDataLine*): A data line. from (gint): Index the line part starts at. to (gint): Index the line part ends at + 1. Returns: gdouble - Minimum within given interval. ``` -------------------------------- ### gwy.DataLine.fft_raw Method Introduction Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `fft_raw` method within the `gwy.DataLine` class, indicating its availability from version 2.1. ```APIDOC gwy.DataLine.fft_raw() Introduced: 2.1 ``` -------------------------------- ### GwyHelp Module API Reference Source: https://gwyddion.net/documentation/head/libgwyapp/libgwyapp-help API documentation for the GwyHelp module, detailing functions for integrating user guide access into Gwyddion dialogs and windows, along with related types. ```APIDOC Module: help Description: User guide access Functions: void gwy_help_add_to_proc_dialog(GtkDialog *dialog, GwyHelpFlags flags) Description: Adds help to a data processing function dialog. Note: The help button will not be added if no help URI is found for the currently running function or help is not available. Parameters: dialog: Main dialog for a data processing function. flags: Flags allowing to modify the help setup. Since: 2.38 void gwy_help_add_to_graph_dialog(GtkDialog *dialog, GwyHelpFlags flags) Description: Adds help to a graph function dialog. Note: The help button will not be added if no help URI is found for the currently running function or help is not available. Parameters: dialog: Main dialog for a graph function. flags: Flags allowing to modify the help setup. Since: 2.38 void gwy_help_add_to_volume_dialog(GtkDialog *dialog, GwyHelpFlags flags) Description: Adds help to a volume data processing function dialog. Note: The help button will not be added if no help URI is found for the currently running function or help is not available. Parameters: dialog: Main dialog for a volume data processing function. flags: Flags allowing to modify the help setup. Since: 2.38 void gwy_help_add_to_xyz_dialog(GtkDialog *dialog, GwyHelpFlags flags) Description: Adds help to a XYZ data processing function dialog. Note: The help button will not be added if no help URI is found for the currently running function or help is not available. Parameters: dialog: Main dialog for a XYZ data processing function. flags: Flags allowing to modify the help setup. Since: 2.45 void gwy_help_add_to_cmap_dialog(GtkDialog *dialog, GwyHelpFlags flags) Description: Adds help to a curve map data processing function dialog. Note: The help button will not be added if no help URI is found for the currently running function or help is not available. Parameters: dialog: Main dialog for a curve map data processing function. flags: Flags allowing to modify the help setup. Since: 2.60 void gwy_help_add_to_file_dialog() void gwy_help_add_to_tool_dialog() void gwy_help_add_to_window() void gwy_help_add_to_window_uri() void gwy_help_show() gboolean gwy_help_is_available() Types and Values: enum GwyHelpFlags ``` -------------------------------- ### Get Maximum Value of Data Line Part (Gwyddion C API) Source: https://gwyddion.net/documentation/head/libgwyprocess/libgwyprocess-linestats Finds the maximum value within a specified part of a GwyDataLine. This function takes the data line object, a starting index, and an ending index (exclusive) to define the segment of interest. ```APIDOC gdouble gwy_data_line_part_get_max (GwyDataLine *data_line, gint from, gint to) Parameters: data_line (GwyDataLine*): A data line. from (gint): Index the line part starts at. to (gint): Index the line part ends at + 1. Returns: gdouble - Maximum within given interval. ``` -------------------------------- ### Get Sum of Values in Data Line Part (Gwyddion C API) Source: https://gwyddion.net/documentation/head/libgwyprocess/libgwyprocess-linestats Computes the sum of all data points within a specified part of a GwyDataLine. This function takes the data line object, a starting index, and an ending index (exclusive) to define the segment of interest. ```APIDOC gdouble gwy_data_line_part_get_sum (GwyDataLine *data_line, gint from, gint to) Parameters: data_line (GwyDataLine*): A data line. from (gint): Index the line part starts at. to (gint): Index the line part ends at + 1. Returns: gdouble - Sum of all values within the interval. ``` -------------------------------- ### Introduce __init__ Constructor Method for gwy.Surface Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `__init__` constructor method within the `gwy.Surface` class, first available in Gwyddion version 2.45. ```APIDOC gwy.Surface.__init__ ``` -------------------------------- ### Get Average Value of Data Line Part (C) Source: https://gwyddion.net/documentation/libgwyprocess/libgwyprocess-linestats This function computes the mean (average) value of all data points within a specified part of a GwyDataLine. It takes the data line, a starting index, and an ending index (exclusive) as input. It returns the calculated average gdouble value. ```C gdouble gwy_data_line_part_get_avg (GwyDataLine *data_line, gint from, gint to); ``` ```APIDOC Function: gwy_data_line_part_get_avg Description: Computes mean value of all values in a part of a data line. Parameters: data_line: A data line. from: Index the line part starts at. to: Index the line part ends at + 1. Returns: Average value within given interval. ``` -------------------------------- ### Document gwy.gwy_volume_func_get_menu_path API Introduction Source: https://gwyddion.net/documentation/head/pygwy/since-index Provides an introduction and version information for the `gwy.gwy_volume_func_get_menu_path` API function, indicating its first appearance in the Gwyddion `gwy` module. ```APIDOC gwy.gwy_volume_func_get_menu_path (Introduced in version 2.32) ``` -------------------------------- ### Run Gwyddion from Fink Installation Source: https://gwyddion.net/documentation/user-guide-en/installation-osx Executes the Gwyddion application installed via Fink by specifying its typical installation path. This command is used to launch Gwyddion after it has been installed through Fink. ```Shell /usr/local/bin/gwyddion ``` -------------------------------- ### Introduce gwy.gwy_app_data_browser_select_lawn Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_data_browser_select_lawn` function, indicating its availability from version 2.61 onwards. ```APIDOC Function: gwy.gwy_app_data_browser_select_lawn Introduced in version: 2.61 ``` -------------------------------- ### API Introduction: gwy.AppDataId.verify_xyz Source: https://gwyddion.net/documentation/head/pygwy/since-index An introduction or reference to the `gwy.AppDataId.verify_xyz` method, first appearing in version 2.46. ```APIDOC gwy.AppDataId.verify_xyz ``` -------------------------------- ### Add Help to Window (C API) Source: https://gwyddion.net/documentation/libgwyapp/libgwyapp-help Adds help to a window pointing to the user guide. If the window is a GtkDialog a help button will be added by default (this can be modified with `flags`). Normal windows do not get help buttons. No help may be added if help is not available. This is a relatively low-level function and should not be necessary in modules. An exception may be modules with multiple user interfaces described in different parts of the guide – but this should be rare. It is a suitable functions for adding help to base application windows, such as channel or volume windows. ```C void gwy_help_add_to_window (GtkWindow *window, const gchar *filename, const gchar *fragment, GwyHelpFlags flags); ``` ```APIDOC gwy_help_add_to_window: Parameters: - window: A window. - filename: Base file name in the user guide without any path or extensions, for instance "statistical-analysis". - fragment: Fragment identifier (without "#"), or possibly NULL. - flags: Flags allowing to modify the help setup. Returns: void Since: 2.38 ``` -------------------------------- ### Get GwyContainer String Keys with Prefix by Name Source: https://gwyddion.net/documentation/libgwyddion/GwyContainer Retrieves string keys from a GwyContainer that start with a given prefix. This function returns a newly allocated, NULL-terminated array of `const gchar **` string keys. The number of keys can optionally be stored in `n`. The strings are owned by GLib and must not be freed. ```C const gchar ** gwy_container_keys_with_prefix_by_name (GwyContainer *container, const gchar *prefix, guint *n); ``` ```APIDOC Function: gwy_container_keys_with_prefix_by_name Parameters: container: GwyContainer * - A container. prefix: const gchar * - A nul-terminated id prefix. n: guint * - Location to store the number of keys to. Can be NULL. Returns: const gchar ** - A newly allocated array with string keys, in no particular order. Unlike the array the strings are owned by GLib and must not be freed. The array is NULL-terminated. Since: 2.50 ``` -------------------------------- ### Introduce gwy.gwy_app_channel_log_add_proc Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_channel_log_add_proc` function, indicating its availability from version 2.38 onwards. ```APIDOC Function: gwy.gwy_app_channel_log_add_proc Introduced in version: 2.38 ``` -------------------------------- ### Document gwy.gwy_volume_func_get_tooltip API Introduction Source: https://gwyddion.net/documentation/head/pygwy/since-index Provides an introduction and version information for the `gwy.gwy_volume_func_get_tooltip` API function, indicating its first appearance in the Gwyddion `gwy` module. ```APIDOC gwy.gwy_volume_func_get_tooltip (Introduced in version 2.32) ``` -------------------------------- ### Get Average Value of Data Line Part (Gwyddion C API) Source: https://gwyddion.net/documentation/head/libgwyprocess/libgwyprocess-linestats Computes the mean (average) value of all data points within a specified part of a GwyDataLine. This function takes the data line object, a starting index, and an ending index (exclusive) to define the segment of interest. ```APIDOC gdouble gwy_data_line_part_get_avg (GwyDataLine *data_line, gint from, gint to) Parameters: data_line (GwyDataLine*): A data line. from (gint): Index the line part starts at. to (gint): Index the line part ends at + 1. Returns: gdouble - Average value within given interval. ``` -------------------------------- ### Get Log-Scale Suitable Ranges for GwyGraphCurveModel (C) Source: https://gwyddion.net/documentation/libgwydgets/GwyGraphCurveModel Retrieves the minimum and maximum displayable values for X and Y axes of a GwyGraphCurveModel, considering logarithmic scaling. It returns FALSE if no displayable data points exist under the specified log-scale setup, otherwise TRUE. The function's return values are cached for performance. ```C gboolean gwy_graph_curve_model_get_ranges (GwyGraphCurveModel *gcmodel, gboolean x_logscale, gboolean y_logscale, gdouble *x_min, gdouble *x_max, gdouble *y_min, gdouble *y_max); ``` -------------------------------- ### Document API Introduction: gwy.Spectra.new_alike Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `new_alike` method within the `gwy.Spectra` class, introduced in version 2.7. This method is part of the Gwyddion library's API. ```APIDOC gwy.Spectra.new_alike ``` -------------------------------- ### GwyContainer: Get String Keys with Prefix by Name Source: https://gwyddion.net/documentation/head/libgwyddion/GwyContainer Retrieves string keys from a GwyContainer that start with a specified prefix. Returns a newly allocated, `NULL`-terminated array of `const gchar **` string keys. The number of keys can optionally be stored in `n`. The strings themselves are owned by GLib and must not be freed. ```C const gchar ** gwy_container_keys_with_prefix_by_name (GwyContainer *container, const gchar *prefix, guint *n); ``` ```APIDOC Function: gwy_container_keys_with_prefix_by_name Description: Gets string keys of a container that start with given prefix. Parameters: container: GwyContainer * - A container. prefix: const gchar * - A nul-terminated id prefix. n: guint * - Location to store the number of keys to. Can be NULL. Returns: const gchar ** - A newly allocated array with string keys, in no particular order. Unlike the array the strings are owned by GLib and must not be freed. The array is NULL-terminated. Since: 2.50 ``` -------------------------------- ### Introduce gwy.gwy_app_data_browser_select_spectra Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the `gwy.gwy_app_data_browser_select_spectra` function, indicating its availability from version 2.7 onwards. ```APIDOC Function: gwy.gwy_app_data_browser_select_spectra Introduced in version: 2.7 ``` -------------------------------- ### gwy.gwy_app_wait_cursor_start Source: https://gwyddion.net/documentation/head/pygwy/since-index Documents the introduction of the gwy.gwy_app_wait_cursor_start function in version 2.3. ```APIDOC gwy.gwy_app_wait_cursor_start ```