The --fix-nan-and-inf option will replace all the nan and inf values in the new value specified in --fix-nan-and-inf-value. It will also replace any values above the new value with the new value itself, effectively chopping off the top end of the histogram (
|
data[data > params.fix_nan_and_inf_value] = params.fix_nan_and_inf_value |
). This is not mentioned in the help string for this option, and so if I choose, for example, the median value in the sinogram as my new value, I will not get a sensible reconstruction but with indication why.
I think we should either (in order of preference):
- Get rid of this one line. Does anyone still use this feature? It was originally added by Alan during my 7-BM-B beamtime in Feb 2020.
- Add a separate option to cap the allowed values in the sinogram.
- Indicate in the help string for the
--fix-nan-and-inf option that it will cap the values in the sinogram so at least this clear when using that option.
Thoughts?