[fitsbits] BINTABLE convention for >999 columns

Tom McGlynn (NASA/GSFC Code 660.1) tom.mcglynn at nasa.gov
Fri Jul 28 12:10:26 EDT 2017


Peter Weilbacher wrote:
> Hi Mark,
>
> On Fri, 28 Jul 2017, Mark Taylor wrote:
>
>> and the example header looks identical to my original example up
>> to TFORM999, but the remaining entries differ:
>>
>>     TTYPE998= 'var_min_s_2'        /  label for column 998
>>     TFORM998= 'D       '           /  format for column 998
>>     TUNIT998= 'counts/s'           /  units for column 998
>>     TTYPE999= 'XT_MORECOLS'        /  label for column 999
>>     TFORM999= '813I    '           /  format for column 999
>>     HIERARCH XT TTYPE999         = 'var_min_u_2' / label for column 999
>>     HIERARCH XT TFORM999         = 'D' / format for column 999
>>     HIERARCH XT TUNIT999         = 'counts/s' / units for column 999
>>     HIERARCH XT TTYPE1000        = 'var_prob_h_2' / label for column 1000
>>     HIERARCH XT TFORM1000        = 'D' / format for column 1000
>>      ...
>>     HIERARCH XT TTYPE1203        = 'var_prob_w_2' / label for column 1203
>>     HIERARCH XT TFORM1203        = 'D' / format for column 1203
>>     HIERARCH XT TTYPE1204        = 'var_sigma_w_2' / label for column 1204
>>     HIERARCH XT TFORM1204        = 'D' / format for column 1204
>>     HIERARCH XT TUNIT1204        = 'counts/s' / units for column 1204
>>     END
> Just curious: why are there extra spaces between the hierarch keyword
> name and the equal sign? In the FITS files that I'm dealing with on a
> daily basis (coming from ESO), " = " is directly following the keyword.
>
> Cheers,
>     Peter.
Channeling a somewhat younger version of myself, I suspect that this was an attempt to keep the 
keywords and values aligned
and make the header easier to read.  The whole idea of HIEARARCH keywords is that they can be of 
very different lengths. E.g.,

HIERARCH XYZ ABC DEF             = 1
HIERARCH XYB ABCDEF GHI          = 'ab'
HIERARCH XYZ S                   = 'de'
HIERARCH XYZ ABCDEFGHI ABCDEFGHIKLM = 4

might be thought easier to read than

HIERARCH XYZ ABC DEF = 1
HIERARCH XYZ ABCDEF GHI = 'ab'
HIERARCH XYZ S = 'de'
HIERARCH XYZ ABCDEFGHI ABCDEFGHIKLM = 4

Adding in extra spaces means that many -- if not all -- values may be aligned.
YMMV, but I think that was my rationale.

Since the HIERARCH keywords in the example above are nearly identical in length
it manifestly doesn't help much.

     Tom McGlynn



More information about the fitsbits mailing list