![]() | ![]() | Gwyddion Data Processing Library Reference Manual | ![]() |
---|
correct — Data correction
enum GwyPlaneSymmetry; void gwy_data_field_correct_laplace_iteration (GwyDataField *data_field, GwyDataField *mask_field, GwyDataField *buffer_field, gdouble *error, gdouble *corfactor); 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); GwyPlaneSymmetry gwy_data_field_unrotate_find_corrections (GwyDataLine *derdist, gdouble *correction);
typedef enum { GWY_SYMMETRY_AUTO = 0, GWY_SYMMETRY_PARALLEL, GWY_SYMMETRY_TRIANGULAR, GWY_SYMMETRY_SQUARE, GWY_SYMMETRY_RHOMBIC, GWY_SYMMETRY_HEXAGONAL, GWY_SYMMETRY_LAST } GwyPlaneSymmetry;
void gwy_data_field_correct_laplace_iteration (GwyDataField *data_field, GwyDataField *mask_field, GwyDataField *buffer_field, gdouble *error, gdouble *corfactor);
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 : | data field to be corrected |
mask_field : | mask of places to be corrected |
buffer_field : | initialized to same size aa mask and data |
error : | maximum change within last step |
corfactor : | correction factor within step. |
void gwy_data_field_correct_average (GwyDataField *data_field, GwyDataField *mask_field);
Function simply puts average value of all the data_field into points in data_field lying under points where mask_field values are nonzero.
data_field : | data field |
mask_field : | mask to be used for changes |
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 usual Gaussian distribution outliers detection for thresh = 3.
data_field : | data field |
mask_field : | mask to be changed |
thresh : | threshold value |
GwyPlaneSymmetry gwy_data_field_unrotate_find_corrections (GwyDataLine *derdist, gdouble *correction);
Finds corrections for all possible symmetries and guess which one should be used.
derdist : | Angular derivation distribution (normally obrained from gwy_data_field_slope_distribution()). |
correction : | Corrections for particular symmetry types will be stored here (indexed by GwyPlaneSymmetry). correction[0] contains the most probable correction. The angles are in radians. |
Returns : | The guessed type of symmetry. |
Since 1.4.
<< cdline | correlation >> |