[AstroPy] pyfits query: how to include a bit mask?

John Blakeslee jpb at pha.jhu.edu
Tue Oct 11 16:19:57 CDT 2005


Hi all,

Just a minor note on this -

>> Sounds like what FITS needs is a BITPIX=1 extension,

There is sort of an 'informal standard' for this, that's been
around for quite a while.  John Tonry distributes a version of
Vista that allows BITPIX=1 (FITS bitmap), which is used for mask
images. It's not quite as space efficient as the iraf pixel list
representation, but it's nice because it's an image that you
can display and pan around (though things like ds9 choke on it).

He distributes the code at -
   http://www.ifa.hawaii.edu/~jt/soft.html
and the relevant source file is called fitsdisk.c (which 
also defines a format for unsigned integer FITS, of course).
It's easy to compile it into other programs if you want them
to read this FITS bitmap format.  Ultimately, it would be
nice to integrate this economical standard into numarray,
but this is the stuff that dreams are made of....

John




More information about the AstroPy mailing list