[AstroPy] Producing tile compressed FITS files

Stephen Bailey stephenbailey at lbl.gov
Fri Jun 17 01:24:40 EDT 2016


+1 on this topic.  DESI has had the same problem, but we have not succeeded
in boiling it down to a simple test case for a bug report.  It seems
related to the compressed image HDU, but we have other files using
CompImageHDU that do not have this problem and we don't know what the
difference is.

Stephen

On Thu, Jun 16, 2016 at 8:48 PM, John K. Parejko <parejkoj at uw.edu> wrote:

> cc:ing William Pence, as this may be an odd interaction between
> astropy.io.fits and cfitsio.
>
> In an effort to reduce the size of some LSST test data, I converted the
> three image HDUs in a file to compressed image HDUs like so:
>
> from astropy.io import fits
> data = fits.open('somefile.fits')
> for i in [1,2,3]:
>     data[i] = fits.CompImageHDU(data=data[i].data,header=data[i].header)
> data.writeto(f, clobber=True)
>
> If I open the new file with pyfits, all of the HDUs seem fine, but now
> cfitsio doesn't appear to like the files. Erin Sheldon's fitsio only sees
> the first 2 HDUs. So does the online FITS tester webpage:
>
> http://fits.gsfc.nasa.gov/fits_verify.html
>
> DS9 seems to read it ok: I can specify "-mecube" and see all three image
> planes.
>
> Is what I did above not allowed for some reason, or did I do something
> wrong?
>
> I've put up the original file, the file with 3 HDUs tile-compressed, and
> (the original goal of this) a file with the 3 image HDUs zeroed out and
> then compressed (I wanted a file with the structure of the original, but
> taking minimal space):
>
> http://staff.washington.edu/parejkoj/lsst/
>
> Ideas and suggestions welcome!
>
> Thanks in advance,
> John
>
> --
> *************************
> John Parejko
> parejkoj at uw.edu
> http://staff.washington.edu/parejkoj/
> Department of Physics and Astronomy
> University of Washington
> Seattle, WA
> **************************
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> https://mail.scipy.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20160616/c9b38fb8/attachment.html>


More information about the AstroPy mailing list