![]() |
![]() |
Gwyddion Data Processing Library Reference Manual | ![]() |
|
---|---|---|---|---|
Top | Description |
#include <libprocess/gwyprocess.h> void (*GwyCoordTransform2DFunc) (gdouble x
,gdouble y
,gdouble *px
,gdouble *py
,gpointer user_data
); void gwy_data_field_correct_laplace_iteration (GwyDataField *data_field
,GwyDataField *mask_field
,GwyDataField *buffer_field
,gdouble corrfactor
,gdouble *error
); void gwy_data_field_correct_average (GwyDataField *data_field
,GwyDataField *mask_field
); void gwy_data_field_mask_outliers (GwyDataField *data_field
,GwyDataField *mask_field
,gdouble thresh
); void gwy_data_field_mask_outliers2 (GwyDataField *data_field
,GwyDataField *mask_field
,gdouble thresh_low
,gdouble thresh_high
); void gwy_data_field_distort (GwyDataField *source
,GwyDataField *dest
,GwyCoordTransform2DFunc invtrans
,gpointer user_data
,GwyInterpolationType interp
,GwyExteriorType exterior
,gdouble fill_value
); GwyPlaneSymmetry gwy_data_field_unrotate_find_corrections (GwyDataLine *derdist
,gdouble *correction
);
void (*GwyCoordTransform2DFunc) (gdouble x
,gdouble y
,gdouble *px
,gdouble *py
,gpointer user_data
);
The type of two-dimensional coordinate transform function.
|
Old x coordinate. |
|
Old y coordinate. |
|
Location to store new x coordinate. |
|
Location to store new y coordinate. |
|
User data passed to the caller function. |
Since 2.5
void gwy_data_field_correct_laplace_iteration (GwyDataField *data_field
,GwyDataField *mask_field
,GwyDataField *buffer_field
,gdouble corrfactor
,gdouble *error
);
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 error
is reached.
|
Data field to be corrected. |
|
Mask of places to be corrected. |
|
Initialized to same size as mask and data. |
|
Correction factor within step. |
|
Maximum change within last step. |
void gwy_data_field_correct_average (GwyDataField *data_field
,GwyDataField *mask_field
);
Fills data under mask with average value.
Simply puts average value of all the data_field
values into
points in data_field
lying under points where mask_field
values
are nonzero.
|
A data field. |
|
Mask of places to be corrected. |
void gwy_data_field_mask_outliers (GwyDataField *data_field
,GwyDataField *mask_field
,gdouble thresh
);
Creates mask of data that are above or below thresh
*sigma from average
height.
Sigma denotes root-mean square deviation of heights. This criterium
corresponds to the usual Gaussian distribution outliers detection if
thresh
is 3.
|
A data field. |
|
A data field to be filled with mask. |
|
Threshold value. |
void gwy_data_field_mask_outliers2 (GwyDataField *data_field
,GwyDataField *mask_field
,gdouble thresh_low
,gdouble thresh_high
);
Creates mask of data that are above or below multiples of rms from average height.
Data that are below mean
-thresh_low
*sigma
or above
mean
+thresh_high
*sigma
are marked as outliers, where sigma
denotes the
root-mean square deviation of heights.
|
A data field. |
|
A data field to be filled with mask. |
|
Lower threshold value. |
|
Upper threshold value. |
Since 2.26
void gwy_data_field_distort (GwyDataField *source
,GwyDataField *dest
,GwyCoordTransform2DFunc invtrans
,gpointer user_data
,GwyInterpolationType interp
,GwyExteriorType exterior
,gdouble fill_value
);
Distorts a data field in the horizontal plane.
Note the transform function invtrans
is the inverse transform, in other
words it calculates the old coordinates from tne new coordinates (the
transform would not be uniquely defined the other way round).
|
Source data field. |
|
Destination data field. |
|
Inverse transform function, that is the transformation from
new coordinates to old coordinates. It gets
(j +0.5, i +0.5), where i and j are the new row and column
indices, passed as the input coordinates. The output coordinates
should follow the same convention. Unless a special exterior
handling is requires, the transform function does not need to
concern itself with coordinates being outside of the data. |
|
Pointer passed as user_data to invtrans . |
|
Interpolation type to use. |
|
Exterior pixels handling. |
|
The value to use with GWY_EXTERIOR_FIXED_VALUE . |
Since 2.5
GwyPlaneSymmetry gwy_data_field_unrotate_find_corrections (GwyDataLine *derdist
,gdouble *correction
);
Finds rotation corrections.
Rotation correction is computed for for all symmetry types. In addition an estimate is made about the prevalent one.
|
Angular derivation distribution (normally obrained from
gwy_data_field_slope_distribution() ). |
|
Corrections for particular symmetry types will be stored
here (indexed by GwyPlaneSymmetry). correction [0] contains
the most probable correction. All angles are in radians. |
Returns : |
The estimate type of prevalent symmetry. |