This PR fixes desihub/desispec#906 by catching flux=NaN and resetting to flux=ivar=0.0 instead. The NaNs can occur when the input pixels are entirely masked for a particular spectrum/wavelength.
and confirming that the output frame doesn't have NaN; example in /global/cfs/cdirs/desi/users/sjbailey/spectro/redux/testnan/exposures/20200306/00053630.
This PR fixes desihub/desispec#906 by catching flux=NaN and resetting to flux=ivar=0.0 instead. The NaNs can occur when the input pixels are entirely masked for a particular spectrum/wavelength.
Tested with
and confirming that the output frame doesn't have NaN; example in /global/cfs/cdirs/desi/users/sjbailey/spectro/redux/testnan/exposures/20200306/00053630.