[fitsbits] COMMENT and HISTORY keywords in fitsTcl
Tom Kuiper
kuiper at dsnra.jpl.nasa.gov
Thu Oct 12 11:41:41 EDT 2000
> Date: Wed, 11 Oct 2000 15:29:50 -0700
> From: Steve Allen <sla at ucolick.org>
> To: FITSbits <fitsbits at nrao.edu>
> Subject: Re: [fitsbits] COMMENT and HISTORY keywords in fitsTcl
...
> On Wed 2000-10-11T15:04:05 -0700, Tom Kuiper hath writ:
> > The User's Guide for fitsTcl states
> > "objName get keyword ?keyList?
> > Return a list of {keyword value comment} for all the keywords in keyList
> > (supports regular expressions).... (HISTORY and COMMENT keywords are never
> > returned.)"
> >
> > Can anyone tell me why the HISTORY and COMMENT keywords are not returned?
> > Is there a way around this? I find these keywords most useful.
>
> The answer may be within this question:
>
> What does fitsTcl return if some of the keywords in keyList occur
> more than once in the FITS header?
>
It looks like it takes the last occurrence. (I've prettied up the formatting
in the example below.)
However, your question did lead me to realize that the "dump" subcommand.
provides the work-around. It will need a little extra work in parsing the
records.
Thanks and regards
Tom
% package require fitsTcl
2.002
% fits open new_file 2
fitsObj0
% fitsObj0 insert image -p 16 1 10
% fitsObj0 put image 1 10 {1 2 3 4 5 6 7 8 9 10}
% fitsObj0 dump
{SIMPLE = T / file does conform to FITS standard}
{BITPIX = 16 / number of bits per data pixel}
{NAXIS = 1 / number of data axes}
{NAXIS1 = 10 / length of data axis 1}
{EXTEND = T / FITS dataset may contain extensions}
{COMMENT FITS (Flexible Image Transport System) format defined in Astronomy and}
{COMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.}
{COMMENT Contact the NASA Science Office of Standards and Technology for the}
{COMMENT FITS Definition document #100 and other FITS information.}
% fitsObj0 get keyword
{EXTEND T {FITS dataset may contain extensions}}
{NAXIS1 10 {length of data axis 1}}
{BITPIX 16 {number of bits per data pixel}}
{SIMPLE T {file does conform to FITS standard}}
{NAXIS 1 {number of data axes}}
% fitsObj0 put keyword {CTYPE1 Frequency MHz}
CTYPE1 = 'Frequency' / MHz
% fitsObj0 dump
{SIMPLE = T / file does conform to FITS standard}
{BITPIX = 16 / number of bits per data pixel}
{NAXIS = 1 / number of data axes}
{NAXIS1 = 10 / length of data axis 1}
{EXTEND = T / FITS dataset may contain extensions}
{COMMENT FITS (Flexible Image Transport System) format defined in Astronomy and}
{COMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.}
{COMMENT Contact the NASA Science Office of Standards and Technology for the}
{COMMENT FITS Definition document #100 and other FITS information.}
{CTYPE1 = 'Frequency' / MHz}
% fitsObj0 put keyword {Comment This is another comment}
COMMENT This is another comment
% fitsObj0 dump
{SIMPLE = T / file does conform to FITS standard}
{BITPIX = 16 / number of bits per data pixel}
{NAXIS = 1 / number of data axes}
{NAXIS1 = 10 / length of data axis 1}
{EXTEND = T / FITS dataset may contain extensions}
{COMMENT FITS (Flexible Image Transport System) format defined in Astronomy and}
{COMMENT This is another comment}
{COMMENT Contact the NASA Science Office of Standards and Technology for the}
{COMMENT FITS Definition document #100 and other FITS information.}
{CTYPE1 = 'Frequency' / MHz}
% fitsObj0 insert keyword 5 {CTYPE1 Freq Hz}
CTYPE1 = 'Freq ' / Hz
% fitsObj0 dump
{SIMPLE = T / file does conform to FITS standard}
{BITPIX = 16 / number of bits per data pixel}
{NAXIS = 1 / number of data axes}
{NAXIS1 = 10 / length of data axis 1}
{CTYPE1 = 'Freq ' / Hz}
{EXTEND = T / FITS dataset may contain extensions}
{COMMENT FITS (Flexible Image Transport System) format defined in Astronomy and}
{COMMENT This is another comment}
{COMMENT Contact the NASA Science Office of Standards and Technology for the}
{COMMENT FITS Definition document #100 and other FITS information.}
{CTYPE1 = 'Frequency' / MHz}
% fitsObj0 get keyword
{EXTEND T {FITS dataset may contain extensions}}
{NAXIS1 10 {length of data axis 1}}
{BITPIX 16 {number of bits per data pixel}}
{CTYPE1 'Frequency' MHz}
{SIMPLE T {file does conform to FITS standard}}
{NAXIS 1 {number of data axes}}
--
Internet: kuiper at DSNra.JPL.NASA.gov (137.79.89.31)
SnailMail: Jet Propulsion Lab 169-506, Pasadena, CA 91109
Phone/fax: (818) 354-5623/8895
WWW: http://DSNra.JPL.NASA.gov/~kuiper/
More information about the fitsbits
mailing list