> What's happening is that fits2ndf is getting the size of the JCMTSTATE
> _CHAR arrays wrong. The number of elements in each _CHAR array is
> being set to the correct number times the length of the character
> string.
> RTS_TASKS(480) <_CHAR*80> 'RTS FE_A PTCS SMU CONTROLLER CORRTASK1...'
>
> (i.e. an array of 480 strings each of length 80 characters), then
> fits2ndf is creating:
>
> RTS_TASKS(38400) <_CHAR*80> 'RTS FE_A PTCS SMU CONTROLLER CORRTASK1...'
>
> i.e. an array of 38400 (=480*80) strings each of length 80 characters.
It was a generic issue dealing with one-dimensional character arrays in
binary tables when the TDIMn keyword is absent. While I had previously
calculated the correct dimension, a subsequent call to a FITSIO routine
trampled over the correct value. That routine determines the shape
and number of dimensions of the array from the TDIMn keyword. However,
if TDIMn is absent, as in the JCMT data, the routine returns the first
dimension as the repeat count, e.g. 38400 in the example.
Malcolm
|