[fitsbits] Associating ancillary data with primary HDU

Thierry.Forveille at ujf-grenoble.fr Thierry.Forveille at ujf-grenoble.fr
Sat May 10 04:58:37 EDT 2014



Quoting William Thompson <William.T.Thompson at nasa.gov>:

> 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.
Not that I'd necessarily advocate that, because it would be somewhat
of a hack, but one even simpler approach would be to store both in
a datacube, with a NAXISi=2 describing the (data,time) doublets.
That could be NAXIS3=2 if your access patterns prefer one array
then the other, or NAXIS1=2 if you'd rather keep the two quantities
for one pixel close together.

One obvious downside is that this forces the same BITPIX for both
quantities, but I'd argue that data values are intrinsically just as
much of a float as time :-) Both probably come out of your
electronics as ints (from an ADC on one side and a counter on
the other), and one probably wants comparable accuracies on
the two quantities to compute the flux as their ratio.

This is mostly for completeness and I'd personally go with
the binary table solution, but your mileage may vary :-)

Thierry




More information about the fitsbits mailing list