DREAM3D
DREAM3D copied to clipboard
StatsGenerator computes NaN values for standard deviation in the neighbor distribution if bincount is large enough
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).
https://github.com/BlueQuartzSoftware/DREAM3D/blob/2f6b5aeaa6e62672e1d65ec4557a261cfbdb8eed/Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/Presets/PrecipitateEquiaxedPreset.cpp#L157
https://github.com/BlueQuartzSoftware/DREAM3D/blob/2f6b5aeaa6e62672e1d65ec4557a261cfbdb8eed/Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/Presets/PrimaryRecrystallizedPreset.cpp#L155
https://github.com/BlueQuartzSoftware/DREAM3D/blob/2f6b5aeaa6e62672e1d65ec4557a261cfbdb8eed/Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/Presets/PrecipitateEquiaxedPreset.cpp#L157
https://github.com/BlueQuartzSoftware/DREAM3D/blob/2f6b5aeaa6e62672e1d65ec4557a261cfbdb8eed/Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/Presets/PrimaryRolledPreset.cpp#L154
https://github.com/BlueQuartzSoftware/DREAM3D/blob/2f6b5aeaa6e62672e1d65ec4557a261cfbdb8eed/Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/Presets/PrecipitateRolledPreset.cpp#L153
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:
https://github.com/BlueQuartzSoftware/DREAM3D/blob/2f6b5aeaa6e62672e1d65ec4557a261cfbdb8eed/Source/Plugins/SyntheticBuilding/SyntheticBuildingFilters/PackPrimaryPhases.cpp#L1376