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

Shashikiran Ganesh shashi at prl.res.in
Mon Oct 10 22:21:16 CDT 2005

On Mon, 10 Oct 2005, Russell E Owen wrote:

> If I add an extension then it will have to be at least 16 bits/pixel,
> right? The two masks I want to add are only 1 bit/pixel each (I could
> combine them into one, but they'd just have to be separated out again
> at the other end).

If your data are not using the entire 16bit/pixel range then you could use
the highest two bits to store  your flags.  They would have to be
extracted out at the other end though..

The other option would be to add a list of x and y locations with flag1
and another list corresponding to flag2 to the fits file.

These are options only in the case where you want to minimize the size of
the file.  I think the previous suggestions are definitely more
appropriate when size is not a constraint (easier to visualize with
software like ds9 etc).


2005-10-11 at 8:50am IST
Shashikiran Ganesh                  |  shashi at prl.res.in
Physical Research Laboratory        |  http://www.prl.res.in/~shashi
Astronomy and Astrophysics Division |  http://sarovar.org/users/shashi
Ahmedabad 380 009, India            |  http://www.iap.fr/users/shashi

More information about the AstroPy mailing list