Re: FITS Image compression, is it portable?



On Wed, 31 May 2006 16:05:48 +0200, "Carsten A. Arnholm"
<arnholm@xxxxxxxxxx> wrote:

I am writing some software to read, process and write FITS files. I was
wondering about the options for FITS image compression, i.e.
<http://heasarc.gsfc.nasa.gov/docs/software/fitsio/c/c_user/node40.html>

Does anyone know if other popular programs implement this? I.e. MaximDL,
AstroArt, Photoshop (via FITS Liberator) and the like?

If no-one implements such compression, then it makes no sense for me to do
it either, because the FITS files must be portable between applications.

I've found that support for compressed files is inconsistent. Some apps
use their own compression, which isn't compatible with the FITS
standard. I assume you are using the CFITSIO library, and
comression/decompression functions are included, so there is little
reason not to include support- just be aware that apps using their own
FITS engines will likely not be compatible.

In general, there is very little reason to use FITS compression. If you
want to compress image files, IMO you are better of doing it externally
by simply zipping them into an archive using a third party app, or the
folder compression built into most operating systems.

A single image file compressed as .ZIP, .Z, or .GZ will be expanded and
opened automatically by CFITSIO.

_________________________________________________

Chris L Peterson
Cloudbait Observatory
http://www.cloudbait.com
.



Relevant Pages

  • Re: [fitsbits] Potential new compression method for FITS tables
    ... Although a table encoded according to this convention ... myself) have been experimenting with a new compression method for FITS ...
    (sci.astro.fits)
  • Re: [fitsbits] Potential new compression method for FITS tables
    ... Although a table encoded according to this convention ... The most directly relevant example is the Tiled Image Compression convention which is also stored in binary table form. ... myself) have been experimenting with a new compression method for FITS binary tables that appears to be significantly more effective than the usual method of simply compressing the whole FITS file with gzip. ...
    (sci.astro.fits)
  • Re: [fitsbits] Rice compression from the command line
    ... The latter should allow output from most any algorithm to be embedded in a FITS file complete with readable headers and transparent access to the pixels. ... In the absence of further suggestions for tile-compression options beyond the cfitsio example imcopy program, I've decided to proceed to roll my own. ... Fpack will be able to compress a list of FITS files in place, or to create a single large output compressed MEF. ... I see these commands as combining features from the FITS tile- compression, checksum and foreign encapsulation conventions, and benefiting from various cfitsio functionality such as HDU validation. ...
    (sci.astro.fits)
  • Re: [fitsbits] Potential new compression method for FITS tables
    ... This new compression method is intended as an improvement over simply gzipping the whole FITS file, which is the current practice in many data archives. ... it is usually necessary to uncompress the table before the application reads or writes data in the table. ...
    (sci.astro.fits)
  • Re: FITS Image compression, is it portable?
    ... apps use their own compression, which isn't compatible with the FITS ... it makes standard compliant programs fail. ... FITS engines will likely not be compatible. ...
    (sci.astro.amateur)