[fitswcs] Re: WCS activity
Steve Allen
sla at ucolick.org
Thu Aug 9 12:15:08 EDT 2001
On Thu 2001-08-09T18:21:05 +1000, Mark Calabretta hath writ:
> 12) Encapsulation
> One solution would be that on reading the NAXIS keyword the FITS parser
> should allocate an array to hold the PVj_ms and initialize each element
> with a non-signalling NaN value (any "magic" value will do). As the
> parser reads each PVj_ms card the corresponding array element is
> initialized; when the parser has finished reading the header, defaulting
> PVj_ms will leave NaNs in the array. Later, when the WCS interpreter
> software first encounters one of these NaN values it would substitute the
> WCS-specific default value (e.g. this would be done by the wcsset
> routines). This means that non-zero defaults can be defined and that FITS
> header parsers don't need to know any of the details of the WCS.
NaNs may be problematic, but if so there are other alternatives.
The FITS file writer that I've created for UCO/Lick's first CCD mosaic
contains some C code that handles subsets of the proposed multiple WCS
keywords. It uses pointers for storage of most of the WCS parameters.
If a parameter has not been initialized its pointer is NULL. The same
sort of trick is possible even in Fortran 77.
Either way, if the reader leaves things NULL or NaN, the subsequent
WCS interpreter may need to preserve that information when it fills in
the default values. Otherwise a minimally-processed output image may
contain explicit values for such keywords which were not in the original
input image. This sort of editorial correction may not always be
a good thing.
--
Steve Allen UCO/Lick Observatory Santa Cruz, CA 95064
sla at ucolick.org Voice: +1 831 459 3046 http://www.ucolick.org/~sla
PGP: 1024/E46978C5 F6 78 D1 10 62 94 8F 2E 49 89 0E FE 26 B4 14 93
More information about the fitswcs
mailing list