[fitsbits] New routines for reading string keywords in CFITSIO
William Pence
William.Pence at nasa.gov
Thu Mar 24 10:24:22 EDT 2016
On 3/24/2016 5:40 AM, Peter Weilbacher wrote:
> you say that the new set of routines will be /added/ to CFITSIO. But
> since function (2) of the new routines has the same name as function (1)
> of the existing routines
opps, the new routine will have a different name and will be called
fits_read_str_key (as compared to the old routine name
fits_read_key_str). None of the old routines will be removed from
CFITSIO so as to not break any existing software that use them.
These new routines will help insulate programmers from the peculiarities
of how a particular string keyword is represented (or 'serialized' to
use the current buzz word) in the FITS header. For example, these 2
keywords represent exactly the same information:
KEY1 = 'AABBCCDDEEFF' / My Comment
KEY2 = 'AABBCC&'
CONTINUE 'DDEEFF' / My Comment
Similarly, consider the following 2 keywords
KEY3 = '1111111111222222222233333333334444444444&'
CONTINUE '5555555555666666666612345678'
KEY4 = '1111111111222222222233333333334444444444&'
CONTINUE '55555555556666666666123456789'
KEY3 and KEY4 are both character string keywords, and the only
difference is that KEY4 is 1 character longer (69 characters) than KEY3
(68 characters). So in fact, KEY3 could have been serialized as a
single keyword, but KEY4 would not fit on a single keyword. The main
point is that the CONTINUE convention is simply a different way of
serializing the character string in a FITS keyword.
-Bill
More information about the fitsbits
mailing list