[fitsbits] FITS nit: variable length arrays and TDIM.

tam tam at silk.gsfc.nasa.gov
Tue Jan 11 09:54:56 EST 2000


[Tried to send this to sci.astro.fits but GSFC's news service
seems to be a victim of the Y2K transition.  My apologies
is anyone receives this twice.  TAM]

There's a bit of an inconsistency/incompleteness in the NOST appendices 
for conventions for binary tables.

In appendix B.1 on varying length columns we have:

    Conventions such  as TDIMn (see Appendix B.2) apply equally to 
    both variable length and static arrays. 

and in appendix B.2 we have:

    The size implied by the TDIMn keyword will equal the element
    count specified in the TFORMn keyword.

Now I'm a little confused as to what it would mean to have a variable length
array with a TDIM keyword.  What is the element count specified in TFORM for that?
Is it the 0 or 1 at the beginning of the TFORM or the potentially absent maximum size
specified in the at the end?

What happens when the actual length of the column varies from 
the product of the TDIM factors?  Are we supposed to extend the array
with 0's to fill up the array?  Do we mean that the first or last dimension
is variable [but then what if the actual size is relatively prime to the
TDIM factors]?  I can imagine a number of reasonable solutions, but for
the moment I don't believe one can use TDIM with varying length columns
since there doesn't seem to be a definition of what that means.

Does anyone actually have any example of where TDIM was used intelligently with
a variable length array?

Would it be better to have B.1 say that variable length arrays are always
one dimensional?  Or do we need to add something to B.2 to specify what TDIM means
in the context of a variable length element?

	Regards,
	Tom McGlynn



More information about the fitsbits mailing list