[fitsbits] Any bad pixel mask convention?
Arnold Rots
arots at cfa.harvard.edu
Wed Dec 4 16:11:11 EST 2013
Chandra data products contain bad pixel files that use the (local)
Region convention to indicate the location of groups of bad pixels.
- Arnold
-------------------------------------------------------------------------------------------------------------
Arnold H. Rots Chandra X-ray
Science Center
Smithsonian Astrophysical Observatory tel: +1 617 496
7701
60 Garden Street, MS 67 fax: +1 617
495 7356
Cambridge, MA 02138
arots at cfa.harvard.edu
USA
http://hea-www.harvard.edu/~arots/
--------------------------------------------------------------------------------------------------------------
On Wed, Dec 4, 2013 at 3:58 PM, Rob Seaman <seaman at noao.edu> wrote:
> Hi Richard,
>
> > Is there something like a bad pixel mask FITS standard that stores bad
> pixels
> > with a boolen value or perhaps a float where 1=good, NaN=bad in FITS
> images?
> > Should one use a BLANK value combined with a byte or integer image or is
> > it best to invent a private ASCII format for this purpose?
>
> I guess I'm not entirely sure what's being requested here. Are you
> looking for a way to represent a separate full size array of flags, one per
> pixel? Or a way to embed special values within a particular data array
> itself? I guess a "private ASCII format" would be something like a pixel
> list concept?
>
> As others have said there isn't really a mask standard in FITS since the
> concept is too generalized, e.g., support for MEFs and world coordinates
> and other features would have to be factored in. However, the IRAF pixel
> list format was created to efficiently represent per-pixel masks, and this
> algorithm is supported by FPACK:
>
> http://heasarc.nasa.gov/fitsio/fpack/fpackguide.pdf
>
> If the general concept of a mask is a separate array of per-pixel integer
> flags mapped one-to-one with one or more data arrays in an MEF, then the
> default FPACK Rice algorithm is pretty efficient itself. Just create an
> integer array the same size as your data array(s) and fill it with whatever
> values make sense. Copy over the WCS and other metadata as needed from
> your data arrays. NOAO uses zeroes for good pixels and non-zero for bad.
> Perhaps use different values to represent different kinds of bad - which
> is something that will vary from project to project. Compress it using
> FPACK and it will get dramatically smaller since such a file will be very
> low entropy. Try the -p flag to compare PLIO versus Rice for your
> application, both speed and size.
>
> Without compression of some sort such a mask will be the same size as data
> image of the same BITPIX. But Rice will squeeze a 32-bit image into the
> same output size as a 16-bit image containing the same pixel values.
>
> Rob
>
>
> _______________________________________________
> fitsbits mailing list
> fitsbits at listmgr.cv.nrao.edu
> http://listmgr.cv.nrao.edu/mailman/listinfo/fitsbits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/fitsbits/attachments/20131204/0d1c38ba/attachment.html>
More information about the fitsbits
mailing list