HEXRD / hexrd

A cross-platform, open-source library for the analysis of X-ray diffraction data.
Other
56 stars 26 forks source link

Better handling of invalid `cellIndices` values #730

Open psavery opened 2 hours ago

psavery commented 2 hours ago

The cellIndices() function is used in the interpolation functions that we use for generating the polar view (for example, here).

However, sometimes nan values are produced within the function (as demonstrated in #729). These nan values, however, get converted to valid index values (like -1 or 0).

We should probably make sure we don't use invalid index values at all, rather than converting them to valid values.

Our best guess is that this bad handling of invalid cellIndices() values is resulting in bad interpolation values near detector borders. This is probably something that should be corrected.

psavery commented 2 hours ago

We should set up some tests to see what this is actually doing, and how it is affecting results.