-
Notifications
You must be signed in to change notification settings - Fork 78
Description
The StatsGenerator filter computes NaN values for the standard deviation within the neighbor distribution when the number of bins is 14 or more (in the case of equiaxed grains) or 8 or more (in the case of rolled grains). The problem occurs in the following areas where the log of a negative number is evaluated giving a NaN value (or log(0) = -inf).
Line 157 in 2f6b5ae
| mu = log(14.0 + (2.0 * float(i - middlebin))); |
Line 155 in 2f6b5ae
| mu = log(14.0 + (2.0 * float(i - middlebin))); |
Line 157 in 2f6b5ae
| mu = log(14.0 + (2.0 * float(i - middlebin))); |
DREAM3D/Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/Presets/PrimaryRolledPreset.cpp
Line 154 in 2f6b5ae
| mu = log(8.0 + (1.0 * float(i - middlebin))); |
Line 153 in 2f6b5ae
| mu = log(8.0 + (1.0 * float(i - middlebin))); |
I'm not sure how this carries forward beyond the Stats Generator filter as the Pack Primary Phases filter still works with these NaN values, but I figured it was worth noting as a potential issue. I believe these neighbor distribution statistics are used here:
DREAM3D/Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/PackPrimaryPhases.cpp
Line 1376 in 2f6b5ae
| VectorOfFloatArray Neighdist = pp->getFeatureSize_Neighbors(); |