Trees  Indices  Help 


Twodimensional data representation
DataField
is an object that is used for
representation of all twodimensional data matrices. Most of the basic
data handling and processing functions in Gwyddion are declared here as
they are connected with DataField
.




























































































































































































































































































































































































































































































































































































































































































Creates a new data field.

Sums two data fields. 
Subtracts one data field from another. 
Divides one data field with another. 
Multiplies two data fields. 
Finds pointwise maxima of two data fields. 
Finds pointwise minima of two data fields. 
Finds pointwise hypotenuse of two data fields.
Since: 2.31 
Checks whether two data fields are compatible.

Checks whether a data field is compatible with brick XYplanes.
Since: 2.51 
Creates a new data field by extending another data field using the specified method of exterior handling.
Since: 2.36 
Replaces masked areas by the solution of Laplace equation. The boundary conditions on mask boundaries are Dirichlet with values
given by pixels on the outer boundary of the masked area. Boundary
conditions at field edges are Neumann conditions ∂z/∂n=0 where n denotes
the normal to the edge. If entire area of For the default value of
Since: 2.47 
Performs one interation of Laplace data correction. Tries to remove all the points in mask off the data by using iterative method similar to solving heat flux equation. Use this function repeatedly until reasonable
Warning: For almost all purposes this function was superseded by noniteratie DataField.laplace_solve() which is simultaneously much faster and more accurate. 
Fills data under mask with the average value. This function simply puts average value of all the
In most cases you probably want to use DataField.correct_average_unmasked() instead.

Fills data under mask with the average value of unmasked data. This function calculates the average value of all unmasked pixels in
If all data are masked the field is filled with zeroes.
Since: 2.44 
Creates mask of data that are above or below
Sigma denotes rootmean square deviation of heights. This criterium
corresponds to the usual Gaussian distribution outliers detection if

Creates mask of data that are above or below multiples of rms from average height. Data that are below
Since: 2.26 
Distorts a data field in the horizontal plane. Note the transform function The
Since: 2.5 
Resamples a data field in an arbitrarily distorted manner. Each item in The
Since: 2.45 
Find and marks scars in a data field. Scars are linear horizontal defects, consisting of shifted values.
Zero or negative values in
Since: 2.46 
Calculates a correlation score in one point. Correlation window size is given by If anything fails (data too close to boundary, etc.), function returns 1.0 (none correlation)..

Calculates a correlation score in one point using weights to center the used information to the center of kernel. Correlation window size is given by If anything fails (data too close to boundary, etc.), function returns 1.0 (none correlation)..

Algorithm for matching two different images of the same object under changes. It does not use any special features for matching. It simply searches
for all points (with their neighbourhood) of

Initializes a crosscorrelation iterator. This iterator reports its state as

Computes correlation score for all positions in a data field. Correlation score is compute for all points in data field
The points in This function is mostly made obsolete by DataField.correlation_search() which offers, beside the
plain FFTbased correlation, a method equivalent to

Creates a new correlation iterator. This iterator reports its state as
This function is mostly made obsolete by DataField.correlation_search() which offers, beside the
plain FFTbased correlation, a method equivalent to

Performs correlation search of a detail in a larger data field. There are two basic classes of methods: Covariance (products of kernel and data values are summed) and height difference (squared differences between kernel and data values are summed). For the second class, the sign of the output is inverted. So in both cases higher values mean better match. All methods are implemented efficiently using FFT. Usually you want to use If the detail can also occur with different height scales, use
If
Since: 2.50 
Invalidates cached data field stats. User code should rarely need this macro, as all
However, if you get raw data with DataField.get_data() and then mix direct changes to it with calls to methods like DataField.get_max(), you may need to explicitely invalidate cached values to let DataField.get_max() know it has to recompute the maximum. 
Creates a new data field similar to an existing one. Use DataField.duplicate() if you want to copy a data field including data.

Creates a new data field by resampling an existing one. This method is equivalent to DataField.duplicate() followed by DataField.resample(), but it is more efficient.

Resamples a data field using given interpolation method This method may invalidate raw data buffer returned by DataField.get_data().

Creates a new data field by binning an existing one. The data field is divided into rectangles of dimensions
Note that the result is the average – not sum – of the individual
values. Multiply the returned data field with
By giving nonzero
Since: 2.50 
Resizes (crops) a data field. Crops a data field to a rectangle between upperleft and bottomright points, recomputing real size. This method may invalidate raw data buffer returned by DataField.get_data().

Extracts a rectangular part of a data field to a new data field.

Copies the contents of an already allocated data field to a data field of the same size.

Copies a rectangular area from one data field to another. The area starts at ( The source area has to be completely contained in
If

Gets X resolution (number of columns) of a data field.

Gets Y resolution (number of rows) of the field.

Gets the X real (physical) size of a data field.

Gets the Y real (physical) size of a data field.

Sets X real (physical) size value of a data field.

Sets Y real (physical) size value of a data field.

Gets the X offset of data field origin.

Gets the Y offset of data field origin.

Sets the X offset of a data field origin. Note offsets don't affect any calculation, nor functions like DataField.rtoj().

Sets the Y offset of a data field origin. Note offsets don't affect any calculation, nor functions like DataField.rtoi().

Returns lateral SI unit of a data field.

Returns value SI unit of a data field.

Sets the SI unit corresponding to the lateral (XY) dimensions of a data field. It does not assume a reference on

Sets the SI unit corresponding to the "height" (Z) dimension of a data field. It does not assume a reference on

Finds value format good for displaying coordinates of a data field.

Finds value format good for displaying values of a data field.

Sets lateral and value units of a data field to match another data field.
Since: 2.49 
Sets lateral and value units of a data line to match a data field.

Transforms vertical pixel coordinate to real (physical) Y coordinate. That is it maps range [0..yresolution] to range [0..realysize]. It
is not suitable for conversion of matrix indices to physical coordinates,
you have to use DataField.itor(

Transforms horizontal pixel coordinate to real (physical) X coordinate. That is it maps range [0..xresolution] to range [0..realxsize]. It
is not suitable for conversion of matrix indices to physical coordinates,
you have to use DataField.jtor(

Transforms real (physical) Y coordinate to row. That is it maps range [0..realysize] to range [0..yresolution].

Transforms real (physical) X coordinate to column. That is it maps range [0..realxsize] to range [0..xresolution].

Gets value at given position in a data field. Do not access data with this function inside inner loops, it's slow.
Get the raw data buffer with

Sets value at given position in a data field. Do not set data with this function inside inner loops, it's slow. Get the raw data buffer with DataField.get_data() and write to it directly instead.

Gets interpolated value at arbitrary data field point indexed by pixel coordinates. Note pixel values are centered in pixels, so to get the same value as
DataField.get_val( See also DataField.get_dval_real() that does the same, but takes real coordinates.

Gets interpolated value at arbitrary data field point indexed by real coordinates. See also DataField.get_dval() that does the same, but takes pixel coordinates.

Rotates a data field by a given angle. This function is mostly obsolete. See DataField.new_rotated() and DataField.new_rotated_90(). Values that get outside of data field by the rotation are lost. Undefined values from outside of data field that get inside are set to data field minimum value. The rotation is performed in pixel space, i.e. it can be in fact a more general affine transform in the real coordinates when pixels are not square.

Creates a new data field by rotating a data field by an atribtrary angle. The returned data field can have pixel corresponding to exterior in
The rotation is performed in real space, i.e. it is a more general affine transform in the pixel space for data field with nonsquare pixels. See DataField.rotate() which rotates in the pixel space. The returned data field has always square pixels. If you want to
rotate by a multiple of
Since: 2.46 
Creates a new data field by rotating a data field by 90 degrees.
Since: 2.46 
Reflects amd/or inverts a data field. In the case of value reflection, it's inverted about the mean value.

Copies data from one data field to another with transposition. The destination data field is resized as necessary, its real
dimensions set to transposed
Since: 2.49 
Copies data from a rectangular part of one data field to another with transposition. The destination data field is resized as necessary, its real
dimensions set to transposed
Since: 2.49 
Fills a data field with given value.

Multiplies all values in a data field by given value.

Adds given value to all values in a data field.

Fills a rectangular part of a data field with given value.

Fills a masked rectangular part of a data field with given value.
Since: 2.44 
Fills a rectangular part of a data field with zeroes.

Multiplies values in a rectangular part of a data field by given value

Adds given value to all values in a rectangular part of a data field.

Extracts a possibly averaged profile from data field to a data line.

Extracts a data field row into a data line.

Extracts a data field column into a data line.

Sets a row in the data field to values of a data line. Data line length must be equal to width of data field.

Sets a column in the data field to values of a data line. Data line length must be equal to height of data field.

Extracts part of a data field row into a data line.

Extracts part of a data field column into a data line.

Puts a data line into a data field row. If data line length differs from

Puts a data line into data field column. If data line length differs from

Computes central derivative in X direction. On border points, oneside derivative is returned.

Computes central derivative in Y direction. On border points, oneside derivative is returned. Note the derivative is for legacy reasons calulcated for the opposite y direction than is usual elsewhere in Gwyddion, i.e. if values increase with increasing row number, the returned value is negative.

Computes derivative in direction specified by given angle.

Fills a data field with regularised XYZ data using a simple method. The real dimensions and offsets of This especially applies to reasonable views of the XYZ data.
Unreasonable views can be rendered unreasonably. In particular if the
rectangle does not contain any point from
Since: 2.44 
Performs steps of the Xdirection image wavelet decomposition. The smallest low pass coefficients block is equal to

Performs steps of the Ydirection image wavelet decomposition. The smallest low pass coefficients block is equal to

Performs steps of the 2D image wavelet decomposition. The smallest low pass coefficients block is equal to

Performs steps of the 2D image wavelet decomposition. The smallest low pass coefficients block is equal to

Fills an elliptic region of a data field with given value. The elliptic region is defined by its bounding box which must be completely contained in the data field.

Fills an elliptic region of a data field with given value.

Normalizes data in a data field to range 0.0 to 1.0. It is equivalent to DataField.renormalize( If 
Transforms data in a data field with linear function to given range. When When

Transforms data in a part of a data field with linear function to given range. When When
Since: 2.45 
Tresholds values of a data field. Values smaller than

Tresholds values of a rectangular part of a data field. Values smaller than

Limits data field values to a range.

Limits values in a rectangular part of a data field to a range.

Sums or averages values in reactangular areas around each sample in a data field. When the gathered area extends out of calculation area, only samples from their intersection are taken into the local sum (or average). There are no restrictions on values of The result is calculated by the means of twodimensional rolling sums.
One one hand it means the calculation time depends linearly on
(

Convolves a data field with given kernel.

Convolves a rectangular part of a data field with given kernel.

Convolve a field with a twodimensional kernel. Pixel dimensions of The convolution is performed with the kernel centred on the respective field pixels. For directions in which the kernel has an odd size this holds precisely. For an evensized kernel this means the kernel centre is placed 0.5 pixel left or up (towards lower indices) from the respective field pixel. See DataField.extend() for what constitutes the exterior and how it is handled. If If In either case, the lateral units and pixel size of
Since: 2.49 
Convolves a data field with given linear kernel.
Since: 2.4 
Convolves a rectangular part of a data field with given linear kernel. For large separable kernels it can be more efficient to use a sequence of horizontal and vertical convolutions instead one 2D convolution.
Since: 2.4 
Convolve a field rowwise with a onedimensional kernel. Pixel dimensions of The convolution is performed with the kernel centred on the respective field pixels. For an oddsized kernel this holds precisely. For an evensized kernel this means the kernel centre is placed 0.5 pixel to the left (towards lower column indices) from the respective field pixel. See DataField.extend() for what constitutes the exterior and how it is handled. If If In either case, the lateral units and pixel size of
Since: 2.49 
Filters a data field with median filter. This method uses a simple square kernel. Use the general function

Filters a rectangular part of a data field with median filter. This method uses a simple square kernel. Use the general function

Filters a data field with mean filter of size
This method is a simple DataField.area_gather() wrapper, so the kernel is square. Use convolution DataField.area_ext_convolve() to perform a mean filter with different, for instance circular, kernel.

Filters a rectangular part of a data field with mean filter of size
This method is a simple DataField.area_gather() wrapper, so the kernel is square. Use convolution DataField.area_ext_convolve() to perform a mean filter with different, for instance circular, kernel.

Filters a data field with conservative denoise filter.

Filters a rectangular part of a data field with conservative denoise filter.

Filters a rectangular part of a data field with Laplacian filter.

Filters a data field with Laplacian of Gaussians filter. Since: 2.23 
Filters a rectangular part of a data field with Laplacian of Gaussians filter.
Since: 2.23 
Filters a data field with a directional Sobel filter.

Filters a rectangular part of a data field with a directional Sobel filter.

Filters a data field with total Sobel filter. Since: 2.31 
Filters a data field with Prewitt filter.

Filters a rectangular part of a data field with a directional Prewitt filter.

Filters a data field with total Prewitt filter. Since: 2.31 
Calculates x and y derivaties for an entire field. The derivatives are calculated as the simple symmetrical differences (in physical units, not pixelwise), except at the edges where the differences are onesided.
Since: 2.37 
Filters a data field with 5x5 checker pattern removal filter. Since: 2.1 
Filters a rectangular part of a data field with 5x5 checker pattern removal filter.
Since: 2.1 
Filters a data field with a Gaussian filter.
Since: 2.4 
Filters a rectangular part of a data field with a Gaussian filter. The Gausian is normalized, i.e. it is sumpreserving.
Since: 2.4 
Filters a data field with minimum filter. This method uses a simple square kernel. Use the general function DataField.area_filter_min_max() to perform filtering with different, for instance circular, kernel.

Filters a rectangular part of a data field with minimum filter. This operation is often called erosion filter. This method uses a simple square kernel. Use the general function DataField.area_filter_min_max() to perform filtering with different, for instance circular, kernel.

Filters a data field with maximum filter. This method uses a simple square kernel. Use the general function DataField.area_filter_min_max() to perform filtering with different, for instance circular, kernel.

Filters a rectangular part of a data field with maximum filter. This operation is often called dilation filter. This method uses a simple square kernel. Use the general function DataField.area_filter_min_max() to perform filtering with different, for instance circular, kernel.

Applies a morphological operation with a flat structuring element to a part of a data field. Morphological operations with flat structuring elements can be expressed using minimum (erosion) and maximum (dilation) filters that are the basic operations this function can perform. The kernel field is a mask that defines the shape of the flat structuring element. It is reflected for all maximum operations (dilation). For symmetrical kernels this does not matter. You can use DataField.elliptic_area_fill() to create a true circular (or elliptical) kernel. The kernel is implicitly centered, i.e. it will be applied symmetrically to avoid unexpected data movement. Evensized kernels (generally not recommended) will extend farther towards the top left image corner for minimum (erosion) and towards the bottom right corner for maximum (dilation) operations due to the reflection. If you need offcenter structuring elements you can add empty rows or columns to one side of the kernel to counteract the symmetrisation. The operation is lineartime in kernel size for any convex kernel. Note DataField.area_filter_minimum() and DataField.area_filter_maximum(), which are limited to square structuring elements, are much faster for large sizes of the squares. The exterior is always handled as
Since: 2.43 
Applies an alternating sequential morphological filter with a flat disc structuring element to a part of a data field. Alternating sequential filter is a filter consisting of repeated
opening and closing (or closing and opening) with progressively larger
structuring elements. This function performs such filtering for sequence
of structuring elements consisting of true Euclidean discs with
increasing radii. The largest disc in the sequence fits into a
(2
Since: 2.43 
Filters a data field with RMS filter.

Filters a rectangular part of a data field with RMS filter of size
RMS filter computes root mean square in given area.

Filters a rectangular part of a data field with a Kuwahara (edgepreserving smoothing) filter.

Filters a rectangular part of a data field with canny edge detector filter.

Shades a data field.

Applies Harris corner detection filter to a pair of gradient data fields. All passed data field must have the same size. 
Performs deconvolution of a data field using a simple regularization. The operation can be used to deblur an image or conversely recover the point spread function from ideal response image. Convolving the result with the operand using DataField.area_ext_convolve() with
For recovery of transfer function,
Since: 2.51 
Finds regularization parameter for point spread function calculation using deconvolution. The estimated value should be suitable for reconstruction of the point spread function using DataField.deconvolve_regularized(). The estimation method is based on crossvalidation. Therefore, it is only suitable for PSF, it does not work for image sharpening using a known PSF.
Since: 2.51 
Computes data for loglog plot by partitioning. Data lines

Computes data for loglog plot by cube counting. Data lines

Computes data for loglog plot by triangulation. Data lines

Computes data for loglog plot by spectral density method. Data lines

Replaces data under mask with interpolated values using fractal interpolation.

Marks data that are above/below curvature threshold.

Performs watershed algorithm.

Removes one grain at given position.

Removes all grains except that one at given position. If there is no grain at (

Removes grain identified by
Since: 2.35 
Removes all grains below specified area.

Removes grains that are higher/lower than given threshold value.

Removes all grains that touch field borders. Since: 2.30 
Initializes the watershed algorithm. This iterator reports its state as

Marks data that are above/below height threshold.

Marks data that are above/below slope threshold.

Finds Otsu's height threshold for a data field. The Otsu's threshold is optimal in the sense that it minimises the interclass variances of two classes of pixels: above and below theshold.
Since: 2.37 
Adds Note: This function is equivalent to [ DataField.max_of_fields(grain_field, grain_field, add_field); ]

Performs intersection betweet two grain fields, result is stored in
Note: This function is equivalent to [ DataField.min_of_fields(grain_field, grain_field, intersect_field); ]

Inverts a data field representing a mask. All nonpositive values are transformed to 1.0. All positive values are transformed to 0.0. Since: 2.43 
Removes empty border rows and columns from a data field representing a mask. If there are border rows and columns filled completely with
nonpositive values the size of the data field is reduced, removing these
rows. The parameter When there is no positive value in the field the field size is reduced
to the smallest possible. This means 1x1 for
Since: 2.43 
Calculates threshold grain number distribution. This function is a simple DataField.area_grains_tgnd_range() that calculates the distribution in the full range.

Calculates threshold grain number distribution in given height range. This is the number of grains for each of

Performs Euclidean distance transform of a data field with grains. Each nonzero value will be replaced with Euclidean distance to the grain boundary, measured in pixels. See also DataField.grain_simple_dist_trans() for simple distance transforms such as cityblock or chessboard. Since: 2.36 
Performs a distance transform of a data field with grains. Each nonzero value will be replaced with a distance to the grain boundary, measured in pixels. Note this function can calculate the true Euclidean distance transform only since 2.43. Use DataField.grain_distance_transform() for the EDT if you need compatibility with older versions.
Since: 2.41 
Erodes a data field containing mask by specified amount using a distance measure. Nonzero pixels in
Since: 2.43 
Dilates a data field containing mask by specified amount using a distance measure. Nonpositive pixels in
Since: 2.43 
Performs thinning of a data field containing mask. The result of thinning is a ‘skeleton’ mask consisting of singlepixel thin lines. Since: 2.48 
Fills voids in grains in a data field representing a mask. Voids in grains are zero pixels in
Since: 2.37 
Marks local maxima or minima in a twodimensional field. Local (or regional) maximum is a contiguous set of pixels that have the same value and this value is sharply greater than the value of any pixel touching the set. A minimum is defined analogously. A field filled with a single value is considered to have neither minimum nor maximum.
Since: 2.37 
Transforms all rows or columns in a data field with Fast Fourier Transform. If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results.

Transforms all rows or columns in a rectangular part of a data field with Fast Fourier Transform. If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results.

Transforms all rows or columns in a data field with Fast Fourier Transform. No leveling, windowing nor scaling is performed. The normalisation of FFT is symmetrical, so transformations in both directions are unitary. Since 2.8 the dimensions need not to be from the set of sizes returned by gwy_fft_find_nice_size().
Since: 2.1 
Calculates 2D Fast Fourier Transform of a rectangular a data field. If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results. Lateral dimensions, offsets and units are unchanged. See DataField.fft_postprocess() for that.

Calculates 2D Fast Fourier Transform of a rectangular area of a data field. If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results.

Calculates 2D Fast Fourier Transform of a data field. No leveling, windowing nor scaling is performed. The normalisation of FFT is symmetrical, so transformations in both directions are unitary. Since 2.8 the dimensions need not to be from the set of sizes returned by gwy_fft_find_nice_size(). Lateral dimensions, offsets and units are unchanged. See DataField.fft_postprocess() for that.
Since: 2.1 
Rearranges 2D FFT output to a humanfriendly form. Topleft, topright, bottomleft and bottomright subrectangles are swapped to obtain a humanized 2D FFT output with (0,0) in the centre. More precisely, for even field dimensions the equallysized blocks starting with the Nyquist frequency and with the zero frequency (constant component) will exchange places. For odd field dimensions, the block containing the zero frequency is one item larger and the constant component will actually end up in the exact centre. Also note if both dimensions are even, this function is involutory and identical to DataField.fft2d_dehumanize(). However, if any dimension is odd, DataField.fft2d_humanize() and DataField.fft2d_dehumanize() are different, therefore they must be paired properly. 
Rearranges 2D FFT output back from the humanfriendly form. Topleft, topright, bottomleft and bottomright subrectangles are swapped to reshuffle a humanized 2D FFT output back into the natural positions. See DataField.fft2d_humanize() for discussion. Since: 2.8 
Updates units, dimensions and offsets for a 2D FFTprocessed field. The field is expected to have dimensions and units of the original directspace data. The lateral units and resolutions are updated to correspond to its Fourier transform. The real dimensions are set for spatial frequencies, not wavevectors.
For wavevector lateral coordinates, mutiply all real dimensions and
offsets by 2* If Value units are kept intact.
Since: 2.38 
Performs 1D FFT filtering of a data field.

Computes a continuous wavelet transform (CWT) at given scale and using given wavelet. @param interpolation: Interpolation type. Ignored since 2.8 as no resampling is performed. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} @param scale: Wavelet scale. I{(float)} @param wtype: Wavelet type. Expected values: C{B{2DCWT_GAUSS}}, C{B{2DCWT_HAT}}. I{(L{2DCWTWaveletType})} 
Fits a plane through a rectangular part of a data field. The coefficients can be used for plane leveling using the same relation as in DataField.fit_plane(), counting indices from area top left corner.

Fits a plane through a data field. The coefficients can be used for plane leveling using relation data[i] := data[i]  (pa + pby*i + pbx*j);

Calculates the inclination of a plane close to the dominant plane in a data field. The dominant plane is determined by taking into account larger local slopes with exponentially smaller weight. This is the basis of socalled facet levelling algorithm. Usually, the plane found by this method is subtracted using DataField.plane_level() and the entire process is repeated until it converges. A convergence criterion may be sufficiently small values of the x and y plane coefficients. Note that since DataField.plane_level() uses pixelbased lateral coordinates, the coefficients must be divided by DataField.get_xmeasure(data_field) and DataField.get_ymeasure(data_field) to obtain physical plane coefficients.
Since: 2.37 
Subtracts plane from a data field. See DataField.fit_plane() for details.

Performs rotation of plane along x and y axis.

Independently levels profiles on each row/column in a data field. Lines that have no intersection with area selected by

Convenience function to get just one quantity from

Convenience function to get just one quantity from

Calculates stray field for perpendicular media, based on a mask showing the magnetisation orientation.
Since: 2.51 
Calculates force as evaluated from zcomponent of the magnetic field for a given probe type.
Since: 2.51 
Shifts magnetic field to a different lift height above the surface. Positive
Since: 2.51 
Estimates the height difference between two magnetic field images. See DataField.mfm_shift_z() for the sign convention. It is
generally only meaningful to estimate the shift whe
Since: 2.51 
Calculates magnetic field or its derivatives above a simple medium
consisting of stripes of left and right direction magnetisation. Results
are added to the
Since: 2.51 
Calculates magnetic field or its derivatives above a flat current line
(stripe). Results are added to the
Since: 2.51 
Finds the maximum value of a data field. This quantity is cached.

Finds the minimum value of a data field. This quantity is cached.

Finds minimum and maximum values of a data field.

Computes average value of a data field. This quantity is cached.

Computes root mean square value of a data field. The root mean square value is calculated with respect to the mean value. See DataField.get_mean_square() for a similar function which does not subtract the mean value. This quantity is cached.

Computes mean square value of a data field. Unlike DataField.get_rms(), this function does not subtract the mean value beforehand. Therefore, it is useful to sum the squared values of data fields which can have the zero level set differently, for instance spectral densities.
Since: 2.52 
Sums all values in a data field. This quantity is cached.

Computes median value of a data field. This quantity is cached.

Computes surface area of a data field. This quantity is cached.

Computes the total variation of a data field. See DataField.area_get_variation() for the definition. This quantity is cached.
Since: 2.38 
Computes the entropy of a data field. See DataField.area_get_entropy() for the definition. This quantity is cached.
Since: 2.42 
Computes the entropy of a twodimensional point cloud. Each pair of corresponding
Since: 2.44 
Finds the maximum value in a rectangular part of a data field.

Finds the minimum value in a rectangular part of a data field.

Finds minimum and maximum values in a rectangular part of a data field. This function is equivalent to calling

Finds minimum and maximum values in a rectangular part of a data field.
Since: 2.18 
Computes average value of a rectangular part of a data field. This function is equivalent to calling

Computes average value of a rectangular part of a data field.
Since: 2.18 
Computes root mean square value of a rectangular part of a data field. The root mean square value is calculated with respect to the mean value. This function is equivalent to calling

Computes root mean square value of deviations of a rectangular part of a data field. The root mean square value is calculated with respect to the mean value.
Since: 2.18 
Computes grainwise root mean square value of deviations of a rectangular part of a data field. Grainwise means that the mean value is determined for each grain (i.e. cotinguous part of the mask or inverted mask) separately and the deviations are calculated from these mean values.
Since: 2.29 
Sums values of a rectangular part of a data field. This function is equivalent to calling

Sums values of a rectangular part of a data field.
Since: 2.18 
Computes median value of a data field area. This function is equivalent to calling

Computes median value of a data field area.
Since: 2.18 
Computes surface area of a rectangular part of a data field. This function is equivalent to calling

Computes surface area of a rectangular part of a data field. This quantity makes sense only if the lateral dimensions and values of
Since: 2.18 
Calculates estimates of value distribution entropy at various scales.
Since: 2.44 
Calculates estimates of entropy of twodimensional point cloud at various scales.
Since: 2.44 
Computes the total variation of a rectangular part of a data field. The total variation is estimated as the integral of the absolute value of local gradient. This quantity has the somewhat odd units of value unit times lateral unit. It can be envisioned as follows. If the surface has just two height levels (upper and lower planes) then the quantity is the length of the boundary between the upper and lower part, multiplied by the step height. If the surface is piecewise constant, then the variation is the step height integrated along the boundaries between the constant parts. Therefore, for nonfractal surfaces it scales with the linear dimension of the image, not with its area, despite being an area integral.
Since: 2.38 
Estimates the entropy of field data distribution. The estimate is calculated as
It should be noted that this estimate may be biased.
Since: 2.42 
Computes volume of a rectangular part of a data field.
Since: 2.3 
Computes value range with outliers cutoff. The purpose of this function is to find a range is suitable for false color mapping. The precise method how it is calculated is unspecified and may be subject to changes. However, it is guaranteed minimum <= This quantity is cached.

Computes basic statistical quantities of a data field.

Computes basic statistical quantities of a rectangular part of a data field. This function is equivalent to calling

Computes basic statistical quantities of a rectangular part of a data field.
Since: 2.18 
Counts data samples in given range. No assertion is made about the values of With this trick the common task of counting positive values can be realized: <informalexample><programlisting> DataField.area_count_in_range(data_field, None, col, row, width, height, 0.0, 0.0, &count, None); count = width*height  count; </programlisting></informalexample>

Calculates distribution of heights in a rectangular part of data field.

Calculates distribution of heights in a data field.

Calculates cumulative distribution of heights in a rectangular part of data field.

Calculates cumulative distribution of heights in a data field.

Calculates distribution of slopes in a rectangular part of data field.

Calculates distribution of slopes in a rectangular part of data field, with masking.
Since: 2.49 
Calculates distribution of slopes in a data field.

Calculates cumulative distribution of slopes in a rectangular part of data field.

Calculates cumulative distribution of slopes in a rectangular part of data field, with masking.
Since: 2.49 
Calculates cumulative distribution of slopes in a data field.

Calculates onedimensional autocorrelation function of a rectangular part of a data field.

Calculates onedimensional autocorrelation function of a data field.

Calculates the rowwise autocorrelation function (ACF) of a field. The calculated ACF has the natural number of points, i.e.
Masking is performed by omitting all terms that contain excluded pixels. Since different rows contain different numbers of pixels, the resulting ACF values are calculated as a weighted sums where weight of each row's contribution is proportional to the number of contributing terms. In other words, the weighting is fair: each contributing pixel has the same influence on the result.

Calculates onedimensional autocorrelation function of a rectangular part of a data field.

Calculates onedimensional autocorrelation function of a data field.

Calculates the rowwise heightheight correlation function (HHCF) of a rectangular part of a field. The calculated HHCF has the natural number of points, i.e.
Masking is performed by omitting all terms that contain excluded pixels. Since different rows contain different numbers of pixels, the resulting HHCF values are calculated as a weighted sums where weight of each row's contribution is proportional to the number of contributing terms. In other words, the weighting is fair: each contributing pixel has the same influence on the result.

Calculates onedimensional power spectrum density function of a rectangular part of a data field.

Calculates onedimensional power spectrum density function of a data field.

Calculates the rowwise power spectrum density function (PSDF) of a rectangular part of a field. The calculated PSDF has the natural number of points that follows from
DFT, i.e. The reduction of the total energy by windowing is compensated by multiplying the PSDF to make its sum of squares equal to the input data sum of squares. Masking is performed by omitting all terms that contain excluded pixels. Since different rows contain different numbers of pixels, the resulting PSDF is calculated as a weighted sum where each row's weight is proportional to the number of contributing pixels. In other words, the weighting is fair: each contributing pixel has the same influence on the result. Do not assume the PSDF values are all positive, when masking is in effect. The PSDF should still have the correct integral, but it will be contaminated with noise, both positive and negative.

Calculates radial power spectrum density function of a rectangular part of a data field.
Since: 2.7 
Calculates radial power spectrum density function of a data field.
Since: 2.7 
Calculates the rowwise area scale graph (ASG) of a rectangular part of a field. The calculated ASG has the natural number of points, i.e.
The ASG represents the apparent area excess (ratio of surface and projected area minus one) observed at given length scale. The quantity calculated by this function serves a similar purpose as ASME B46.1 area scale graph but is defined differently, based on the HHCF. See DataField.area_row_hhcf() for details of its calculation.

Calculates twodimensional autocorrelation function of a data field area. The resulting data field has the correlation corresponding to (0,0) in the centre. The maximum possible values of
Since: 2.7 
Calculates twodimensional autocorrelation function of a data field area. The resulting data field has the correlation corresponding to (0,0) in the centre. The maximum possible values of
Since: 2.50 
Calculates twodimensional autocorrelation function of a data field. See DataField.area_2dacf() for details. Parameters missing (not adjustable) in this function are set to their default values.
Since: 2.7 
Calculates twodimensional power spectrum density function of a data field area. The resulting data field has the spectrum density corresponding zero frequency (0,0) in the centre. The reduction of the total energy by windowing is compensated by multiplying the PSDF to make its sum of squares equal to the input data sum of squares. Do not assume the PSDF values are all positive, when masking is in effect. The PSDF should still have the correct integral, but it will be contaminated with noise, both positive and negative.
Since: 2.51 
Calculates twodimensional power spectrum density function of a data field. See DataField.area_2dpsdf_mask() for details and discussion.
Since: 2.51 
Calculates radially averaged autocorrelation function of a rectangular part of a data field.
Since: 2.22 
Calculates radially averaged autocorrelation function of a data field.
Since: 2.22 
Calculates Minkowski volume functional of a rectangular part of a data field. Volume functional is calculated as the number of values above each threshold value (,white pixels`) divided by the total number of samples in the area. Is it's equivalent to 1CDH.

Calculates Minkowski volume functional of a data field. See DataField.area_minkowski_volume() for details.

Calculates Minkowski boundary functional of a rectangular part of a data field. Boundary functional is calculated as the number of boundaries for each threshold value (the number of pixel sides where of neighouring pixels is ,white` and the other ,black`) divided by the total number of samples in the area.

Calculates Minkowski boundary functional of a data field. See DataField.area_minkowski_boundary() for details.

Calculates Minkowski connectivity functional (Euler characteristics) of a rectangular part of a data field. Connectivity functional is calculated as the number connected areas of pixels above threhsold (,white`) minus the number of connected areas of pixels below threhsold (,black`) for each threshold value, divided by the total number of samples in the area.

Calculates Minkowski connectivity functional (Euler characteristics) of a data field. See DataField.area_minkowski_euler() for details.

Computes angular slope distribution.

Computes average normal vector of a data field.

Computes average normal vector of an area of a data field.

Calculates the inclination of the image (polar and azimuth angle).

Calculates the inclination of the image (polar and azimuth angle).

Calculates a line quantity for each row or column in a data field area. Use DataField.get_line_stats_mask() for full masking type options.
Since: 2.2 
Calculates a line quantity for each row or column in a data field area.
Since: 2.46 
Calculates a line quantity for each row or column of a data field.
Since: 2.2 
Counts the number of regional maxima in a data field. See DataField.mark_extrema() for the definition of a regional maximum.
Since: 2.38 
Counts the number of regional minima in a data field. See DataField.mark_extrema() for the definition of a regional minimum.
Since: 2.38 
Performs angular averaging of a part of a data field. The result of such averaging is an radial profile, starting from the disc centre. The function does not guarantee that
Since: 2.42 
Sets lateral and value units of a surface to match a data field.
Since: 2.46 
Extract the data of a data field. The returned list contains a copy of the data. Changing its contents does not change the data field's data.

Sets the entire contents of a data field. The length of

Fits a twodimensional polynomial to a data field.

Fits a twodimensional polynomial to a rectangular part of a data field. The coefficients are stored by row into Note naive x^n y^m polynomial fitting is numerically unstable,
therefore this method works only up to

Subtracts a twodimensional polynomial from a data field.

Subtracts a twodimensional polynomial from a rectangular part of a data field.

Fits twodimensional Legendre polynomial to a data field. See DataField.area_fit_legendre() for details.

Fits twodimensional Legendre polynomial to a rectangular part of a data field. The The coefficients are organized exactly like in DataField.area_fit_polynom(), but they are not coefficients of x^n y^m, instead they are coefficients of P_n(x) P_m(x), where P are Legendre polynomials. The polynomials are evaluated in coordinates where first row (column) corresponds to 1.0, and the last row (column) to 1.0. Note the polynomials are normal Legendre polynomials that are not exactly orthogonal on a discrete point set (if their degrees are equal mod 2).

Subtracts a twodimensional Legendre polynomial fit from a data field.

Subtracts a twodimensional Legendre polynomial fit from a rectangular part of a data field. Due to the transform of coordinates to [1,1] x [1,1], this method can be used on an area of dimensions different than the area the coefficients were calculated for.

Fits twodimensional polynomial with limited total degree to a data field. See DataField.area_fit_poly_max() for details.

Fits twodimensional polynomial with limited total degree to a rectangular part of a data field. See DataField.area_fit_legendre() for description. This function differs by limiting the total maximum degree, while DataField.area_fit_legendre() limits the maximum degrees in horizontal and vertical directions independently.

Subtracts a twodimensional polynomial with limited total degree from a data field.

Subtracts a twodimensional polynomial with limited total degree from a rectangular part of a data field. Due to the transform of coordinates to [1,1] x [1,1], this method can be used on an area of dimensions different than the area the coefficients were calculated for.

Fit a given set of polynomial terms to a data field.
Since: 2.11 
Fit a given set of polynomial terms to a rectangular part of a data field. The polynomial coefficients correspond to normalized coordinates that are always from the interval [1,1] where 1 corresponds to the left/topmost pixel and 1 corresponds to the bottom/rightmost pixel of the area.
Since: 2.11 
Subtract a given set of polynomial terms from a data field.
Since: 2.11 
Subtract a given set of polynomial terms from a rectangular part of a data field.
Since: 2.11 
Extracts values from an elliptic region of a data field. The elliptic region is defined by its bounding box which must be completely contained in the data field.

Puts values back to an elliptic region of a data field. The elliptic region is defined by its bounding box which must be completely contained in the data field. This method does the reverse of DataField.elliptic_area_extract() allowing to implement
pixelwise filters on elliptic areas. Values from

Extracts values from a circular region of a data field.

Puts values back to a circular region of a data field. This method does the reverse of DataField.circular_area_extract() allowing to implement
pixelwise filters on circular areas. Values from

Extracts values with positions from a circular region of a data field. The row and column indices stored to
Since: 2.2 
Searches an elliptical area in a data field for local maximum. The area may stick outside the data field. The function first finds the maximum within the ellipse, intersected with the data field and then tries subpixel refinement. The maximum is considered successfully located if it is inside the data field, i.e. not on edge, there is no higher value in its 8neighbourhood, and the subpixel refinement of its position succeeds (which usually happens when the first two conditions are met, but not always). Even if the function returns The radii can be zero. A single pixel is then examined, but if it is indeed a local maximum, its position is refined.
Since: 2.49 
Performs an affine transformation of a data field in the horizontal plane. Note the transform The
Since: 2.34 
Resolves an affine transformation of a data field in the horizontal plane. This function calculates suitable arguments for DataField.affine() from given images and lattice vectors (in real coordinates). Data field Note that
Since: 2.49 
Performs the classical Vincent watershed segmentation of a data field. The segmentation always results in the entire field being masked with the exception of thin (8connectivity) lines separating the segments (grains). Compared to DataField.grains_mark_watershed(), this algorithm is very fast. However, when used alone, it typically results in a serious oversegmentation as each local minimum gives raise to a grain. Furthermore, the full segmentation means that also pixels which would be considered outside any grain in the topographical sense will be assigned to some catchment basin. Therefore, pre or postprocessing is usually necessary, using the gradient image or a more sophisticated method. The function does not assign pixels with value
Since the algorithm numbers the grains as a side effect, you can pass
a
Since: 2.37 
Estimates or improves estimate of lattice vectors from a 2D ACF field. Note that the 2D ACF of a data field has to be passed, not the data field itself. The correlation function can be for instance calculated by DataField.acf2d(). However, you can calculate and/or process the correlation function in any way you see fit. When the vectors in If the function return
Since: 2.49 
Estimates or improves estimate of lattice vectors from a 2D PSDF field. Note that the 2D PSDF of a data field has to be passed, not the data field itself. The spectral density can be for instance calculated by DataField.fft2d() and summing the squares of real and imaginary parts However, you can calculate and/or process the spectral density in any way you see fit. When the vectors in If the function return
Since: 2.49 
Locates local maxima in a data field. At most

Constructs an array with grain numbers from a mask data field.

Constructs an array with grain numbers from a mask data field treated as periodic.

Find sizes of all grains in a mask data field. Size is the number of pixels in the grain. The zeroth element of
Since: 2.47 
Finds bounding boxes of all grains in a mask data field. The array

Finds a speficied quantity for all grains in a data field. The array

Calculates the distribution of a speficied grain quantity. The array

Convenience macro doing gwy_serializable_duplicate() with all the necessary typecasting. Use DataField.new_alike() if you don't want to copy data, only resolutions and units.

A convenience macro to calculate DataField.get_xreal(data_field)/DataField.get_xres(data_field).

A convenience macro to calculate DataField.get_yreal(data_field)/DataField.get_yres(data_field).

Gets pointer to data which the data field contains.

Trees  Indices  Help 

Generated by Epydoc 3.0.1  http://epydoc.sourceforge.net 