-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GZIP_2 compression of a flat-sky map seems lossy in some cases #135
Comments
I think this isn't surprising, since floating-point data are difficult to compress without loss. See for example, the astropy fits documentation:
One solution would be to expose the |
Thank you, Sasha, for looking into this. Adding new options sounds good to me, or perhaps we can just edit some of the things said in the docstring unless most people want to save compressed maps. For example, the docstring says |
Yeah that's a good point, definitely should update the documentation. @menanteau I believe you changed the default compression for |
Thanks @arahlin for keeping me in the loop. I do not remembering changing the default compression in |
Compression of floating point data using the GZIP_2 fits compression algorithm is *not* lossless. To avoid pitfalls with this algorithm, compression is disabled by default. Also expose the `quantize_level` keyword argument to enable adjustment of the compression algorithm, if compression is desired. See the astropy FITS image documentation for further information: https://docs.astropy.org/en/stable/io/fits/api/images.html Closes #135.
Compression of floating point data using the GZIP_2 fits compression algorithm is *not* lossless. To avoid pitfalls with this algorithm, compression is disabled by default. Also expose the `quantize_level` keyword argument to enable adjustment of the compression algorithm, if compression is desired. See the astropy FITS image documentation for further information: https://docs.astropy.org/en/stable/io/fits/api/images.html Closes #135.
When we save a flat-sky map in a FITS file via
maps.fitsio.save_skymap_fits
, the default option for the argumentcompress
is'GZIP_2'
. This compression scheme is supposed to be lossless, but that does not seem to be the case when I tested the compression scheme on an SPT-3G winter field coadd.Here is an example:
The text was updated successfully, but these errors were encountered: