[fitsbits] Packed binary values

Thierry Forveille Thierry.Forveille at obs.ujf-grenoble.fr
Mon Apr 30 11:19:45 EDT 2007


Mike Nolan a écrit :
> We're trying to data formats a new spectral instrument. It will produce
> binary tables in a vaguely SDFITS-like format, with a table column
> that contains a data array. The array will have multiple axes: time,
> frequency, polarization, etc., usually with only the frequency axis
> being nondegenerate, with table rows generated (say) once per second.
> At moderate data rates, the header information changes slowly compared
> to the spectral dump rate, and the time axis may become nondegenerate
> within a record.  However, at the highest data rates packed binary data
> (say 2 bits per sample) will have to be stored, and we're trying to figure
> out how to best describe those in a way consistent with "principle of
> least astonishment". Do others have experience or suggestions with this?
> 
If you need that functionality, and as long as you can live
with integer number of bits per sample, I'd say that using
BITPIX=2, 3, 4 is probably the least disruptive path. It certainly
isn't standard (at least for now ;-)), but well written readers
will hopefully have graceful failures on that construct, and the
intent should be reasonably clear to all (modulo the signed/unsigned
ambiguity). Setting SIMPLE =     F would perhaps be a good idea,
though ;-).

If you'd also need to store 1.5 bit per sample (3 level sampling) and
the like, then I'd have no useful suggestion...



More information about the fitsbits mailing list