I wrote a simple standalone Pygwy script which applies align_rows, fix_zero, and grain_wshed in the same order and with the same settings (per the log window) as in interactive mode. However, some (but not all—26 of the 47 GrainQuantity value sets do match) of the value columns obtained from the script do not match the values obtained from interactive mode.
GrainQuantity value sets which DO NOT match between the two approaches: GRAIN_VALUE_MINIMUM, GRAIN_VALUE_MAXIMUM, GRAIN_VALUE_MEAN, GRAIN_VALUE_MEDIAN, GRAIN_VALUE_RMS, GRAIN_VALUE_BOUNDARY_MINIMUM, GRAIN_VALUE_BOUNDARY_MAXIMUM, GRAIN_VALUE_SURFACE_AREA, GRAIN_VALUE_HALF_HEIGHT_AREA, GRAIN_VALUE_VOLUME_0, GRAIN_VALUE_VOLUME_MIN, GRAIN_VALUE_VOLUME_LAPLACE, GRAIN_VALUE_SLOPE_THETA, GRAIN_VALUE_SLOPE_PHI, GRAIN_VALUE_CURVATURE_CENTER_X, GRAIN_VALUE_CURVATURE_CENTER_Y, GRAIN_VALUE_CURVATURE_CENTER_Z, GRAIN_VALUE_CURVATURE1, GRAIN_VALUE_CURVATURE2, GRAIN_VALUE_CURVATURE_ANGLE1, GRAIN_VALUE_CURVATURE_ANGLE2 In some cases (e.g., GRAIN_VALUE_MINIMUM, GRAIN_VALUE_MAXIMUM, GRAIN_VALUE_MEAN, …), the value I get from the Pygwy script is “1” for every grain. In other cases (e.g., GRAIN_VALUE_SURFACE_AREA), each grain does have a unique value from the Pygwy script, but it does not match (in the specific case of GRAIN_VALUE_SURFACE_AREA, the Pygwy script value is on the order of magnitude of one dimension (i.e., it is as though it was not multiplied by another value to give something on the order of magnitude to be expected for area)). Let me know if there is anything that I can provide you to help with this. This was encountered with Gwyddion 2.66, just in case it is something that has been addressed in the latest version. Side Note 1: When doing “Export raw data” with “Add informational commend header” from the [Data Process > Grains > Distributions…] window, the exported tab-separated file contains one more header than the number of data columns; the “#” column is not prepended to match the data with the headers). Side Note 2: This may be intended behavior (and it is easy for me to work around if so), but the first entry in all arrays of GrainQuantity values does not correspond to a grain (the size of the array is 1 larger than the number of grains); most of the values here are ~0, and CENTER_X and CENTER_Y correspond to the center of the image.
_______________________________________________ Gwyddion-users mailing list Gwyddion-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gwyddion-users