BlueQuartzSoftware / BlueQuartzSoftware/DREAM3D

StatsGenerator computes NaN values for standard deviation in the neighbor distribution if bincount is large enough

Open
#987 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
189
Forks
78
PR merge metrics
No merged PRs in 30d

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).

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.