[fitsbits] Associating ancillary data with primary HDU
Paul Hirst
phirst at gemini.edu
Fri May 9 16:39:03 EDT 2014
Bill, all,
I think this is very analogous to the practice of storing variance and
data quality in image extensions following the data values.
I may be wrong, but I believe it's more common to have an header only PHU
and to store all the pixel values (be they data value, variance, quality
flags, object masks, exposure time, etc etc) as subsequent extensions. We
do this at Gemini, STSci does similar I believe. I guess the reason we go
for the header only PHU and put everything in extensions is that it keeps
it more symmetric when you have multiple data arrays, for example multiple
detectors in the same instrument, each of which generate a primary data
array and zero or more ancillary data arrays.
Of course with multi-extension FITS in this manner you have to keep track
yourself of which of the arrays are associated with which others, as the
MEF structure is intrinsically flat rather than hierarchal. We do this
using the EXTNAME and EXTVER keywords.
Paul.
On 9/5/14, 10:24 , "William Thompson" <William.T.Thompson at nasa.gov> wrote:
>To the general FITS community:
>
>I've been asked if there are any specific conventions for associating
>ancillary
>data with primary data arrays. The specific application is one where the
>exposure time differs from pixel to pixel (something that can be done
>with
>Active Pixel Sensors), but which could easily apply to other parameters
>which
>vary between pixels.
>
>The simplest and most obvious approach would be to store the actual data
>in the
>primary HDU, and then store the exposure times in an extension with the
>same
>dimensionality. For example, if the primary HDU had
>
>SIMPLE = T
>BITPIX = 16
>NAXIS = 2
>NAXIS1 = 1024
>NAXIS2 = 1024
>EXTEND = T
>
>The extension would have
>
>XTENSION= 'IMAGE'
>BITPIX = -32
>NAXIS = 2
>NAXIS1 = 1024
>NAXIS2 = 1024
>EXTNAME = 'XPOSURE'
>
>In essence, this is similar to the Green Bank Convention, but applied to
>the
>individual pixels in a data array rather than to rows in a binary table.
>
>Is this a commonly used method for associating ancillary data with
>primary
>images? Are there any additional conventions that are appropriate to
>this
>situation? I tried looking in
>
>http://fits.gsfc.nasa.gov/fits_conventions.html
>
>but couldn't find anything that seemed relevant.
>
>One could also imagine binary tables where the primary data array is in
>one
>column, and the array of exposure times is in another column. However,
>for the
>present application, the use of IMAGE extensions is far simpler, and more
>likely
>to be actually adopted.
>
>Thank you,
>
>Bill Thompson
>
>
>--
>William Thompson
>NASA Goddard Space Flight Center
>Code 671
>Greenbelt, MD 20771
>USA
>
>301-286-2040
>William.T.Thompson at nasa.gov
>
>_______________________________________________
>fitsbits mailing list
>fitsbits at listmgr.cv.nrao.edu
>http://listmgr.cv.nrao.edu/mailman/listinfo/fitsbits
More information about the fitsbits
mailing list