Closed teutoburg closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 75.99%. Comparing base (
1f8c746
) to head (eb7ed1e
). Report is 4 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Closes #419
Simple example to illustrate:
shows:
and prints:
The resulting image has a clear hole in the middle where the NaNs were, but still has some noise in there, as would be expected when setting the pixel values in the source to zero.
Setting the fill value to something intentionally ridiculously high:
cmds["!SIM.computing.nan_fill_value"] = 1e20
results in:Also added a test with a similar setup to at least run that new code and make sure no NaNs remain.
I picked this particular place ScopeSim to put this because that's where the actually used part of the image is created. Any NaNs outside the FOV can be ignored anyway as they don't affect the final result. Note that this now applies only to ImageHDU-type source fields, so Tables are not checked. However, one would have to be particularly dense to create a source table with NaNs, I guess. Most of the NaN cases will come from users loading mythical FITS files from God-knows-where...