GalSim-developers / GalSim

The modular galaxy image simulation toolkit. Documentation:
http://galsim-developers.github.io/GalSim/
Other
224 stars 105 forks source link

Add option to get warning about WCS defaulting to PixelScale (#1120) #1122

Closed rmjarvis closed 3 years ago

rmjarvis commented 3 years ago

If a FITS file doesn't have any WCS information in it, we default to a PixelScale. This is currently done silently.

This PR adds a warning that is emitted by default when reading this via FitsWCS(file), but is suppressed by default when reading via galsim.fits.read(file).

If you want to get the warning, you can now do galsim.fits.read(file, suppress_warning=False), and it will emit the warning. (So you can potentially catch it and do something particular if this happened.)

rmjarvis commented 3 years ago

Thanks Josh! One to go... :)