pyspectral
pyspectral copied to clipboard
Investigate `np.nan_to_num` usage in Rayleigh correction
As discussed on slack and #159, there used to be a np.nan_to_num
call applied to the correction array returned by Rayleigh correction. The idea was that if the correction calculations failed we should just not apply any correction. In some cases it looks better though to mask the pixels entirely (by keeping them NaN). This allows the user to determine what they want to do with the correction (mask or make 0).
The question is, what cases was @adybbroe coding for in PR #140 when np.nan_to_num
was first added? And do the other np.nan_to_num
calls added in that PR suffice for those cases (extreme angles)?