[fitsbits] Interpretation of repeat count in binary tables
Paddy Leahy
j.p.leahy at manchester.ac.uk
Tue Apr 1 04:33:53 EDT 2008
Dear Bill,
Thanks for the explanation... follow-up questions below:
On Mon, 31 Mar 2008, William Pence wrote:
> Paddy,
>
> In the example you cite below, the binary table contains 12288 rows of data,
> and each row contains 3 vectors, containing 1024 single precision floating
> point numbers leash. There is no explicit relationship between the vectors
> in different rows of the table.
"No explicit relationship" sounds worrying. Does this mean that different
FITS readers can legitimately interpret the same table in different ways?
Or are there some keywords that clarify the relationship between rows?
<snip>
>
> The TDIMn keyword, if present in this case, would specify the dimensionality
> of each individual 1024 element vector in that column. For example, TDIM1 =
> '(16,64)', would mean that each vector in column 1 should be interpreted as a
> 16 x 64 2D array. If there is no TDIMn keyword, then the vector would be
> interpreted as a 1024 element 1-D array.
So, let me be clear: a fits reader is asked to return the data from column
2 of a table which has N_row rows and a repeat count of R for column 2.
This should definitely be returned as a 2-D array of (R, N_row) elements,
even if TDIM2 is not present? (Or maybe, given your "no explicit
relationship" comment, as something looser, like a linked list of arrays
of length R?).
The point being that, I guess because some fits readers are highly
inefficient at reading tables with short rows, it has become common
practice at least in the CMB field to use a repeat count just as a way of
packing data in a way that can be read efficiently. The writer of my
example intended each column to be read as 1 long vector of R*N_row
elements. Is that definitely contrary to the standard?
regards,
Paddy
More information about the fitsbits
mailing list