Open mileslucas opened 4 years ago
I've checked using the fitsio
python package (which also wraps libcfitsio)-
>>> import fitsio
>>> f = fitsio.FITS("502nmos.zip")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/fitsio/fitslib.py", line 477, in __init__
self._FITS = _fitsio_wrap.FITS(filename, self.intmode, create)
OSError: FITSIO status = 414: error uncompressing image
failed to uncompress file into memory (compress_open)
failed to find or open the following file: (ffopen)
502nmos.zip
I'll keep digging a little- this seems like a trivial operation that's failing
We can access files compressed with the algorithms supported by cfitsio, which doesn't include zip: https://heasarc.gsfc.nasa.gov/docs/software/fitsio/compression.html. See #125, where a user is able to open compressed files (but they have a problem because of a cfitsio bug).
My guess is that Astropy high-level interface automatically uncompresses the files, even those not supported internally by cfitsio
My guess is that Astropy high-level interface automatically uncompresses the files, even those not supported internally by cfitsio
Oh well: https://github.com/astropy/astropy/tree/a45af44fdd406cd7b53f3e7a48ff4d22dca3b67e/astropy/io/fits/src
Would it be worth trying to parse the file for zips and decompress ourselves?
We could use CodecZlib.jl
for decompressing in memory the files compressed with the algorithms not supported by cfitsio. The annoying part is that we should handle also writing back to disk.
I cannot open a zipped FITS file (astropy has no problem, though).
relevant manifest info:
Details
``` [525bcba6] FITSIO v0.14.0 [438e738f] PyCall v1.91.4 ```