[fitswcs] NAXIS vs. WCSDIM

Doug Mink dmink at cfa.harvard.edu
Thu Sep 27 12:10:29 EDT 2001


William Pence responded to my suggestion of using BITPIX=0 for dataless
FITS files with a WCS in the header:
> 
> Yikes.  Producing FITS files with an illegal BITPIX value (the FITS standard
> is very unambiguous about the allowed values) ought to be a last resort,
> when there is no other reasonable solution that conforms to existing
> standards.  Why not use NAXISn = 0 and a legal BITPIX value in your output
> files?  The pixel to sky and sky to pixel conversions don't depend on the
> number of pixels actually in the image do they?

These header-only images are really place-holders for existing images with
real dimensions.  They are really only of use in holding WCS fits where the
actual image is either not available or too big to keep around.  One example
might be the creation of a FITS WCS for a plate solution based on a scanned
plate catalog. The image dimensions could be huge, but no real image would
exist.  It is also convenient when making multiple WCS solutions for an image
using different catalogs without taking up lots of disk space for image bits
or header space for multiple WCS's (which my software can read but not yet
write).  Since there is no data to display in a header-only image, having
display programs give error messages when encountering BITPIX=0 isn't too
big of a problem, though it would of course be nice if the programs crashed
gracefully, as they should when encountering any erroneous data.

And yes, the sky<->pixel conversions do like to know when the position
requested is off the image, the edges of which are given by the NAXISn
dimensions.

-Doug Mink



More information about the fitswcs mailing list