fits-dump-hdr - dump FITS keywords
fits-dump-hdr options filename
fits-dump-hdr reads a header from a FITS file and outputs it in a variety of formats.
Options are specified using a getopt style interface. Long names are available when preceded with double hyphens "--", in which case only the minimal number of characters are required. Options which take values may be separated from those values with the "=" character.
The output format. Run
fits-dump-hdr --fmt=list
to list the available formats. If no format is given, and a filename is specified with --output
, the filename extension is used to determine the output format.
The extension to dump, either an integer or an extension name.
Specify a keyword pattern or filter. This option may be repeated, and allows one to build up a complex set of filters.
fits-dump-hdr process the --key
options in sequence, building up a list of header keywords. Specifying a pattern adds it to the list. Filters are used to remove items from the list.
If the first --key
option specifies a filter, the list is initialized with all of the possible header keywords. Otherwise, keywords are added by specifying keyword patterns.
A pattern may have one of the following forms:
The exact name of the keyword. Case is not significant.
-k tstart -k TSTOP
A wildcard expression (also known as a glob) as used by shells.
-k 'tst*'
A Perl regular expression.
-k '/tst.*'
A filter is a pattern which begins with a -
or +
. If -
, items which match the pattern are removed. If a +
, items which match the pattern are kept (all others are removed).
Keywords are case insensitive. By default all interesting keywords are shown. See also --show-uninteresting
.
Add extra fields to output streams supporting named fields (e.g. rdb
, json
, yml
). This may be repeated.
If attr is specified, it is passed on the formatter as is. See the formatter documentation for more information.
By default "uninteresting" (i.e. COMMENT
and HISTORY
) keywords are not output if the output keyword list is initially populated with all of the keywords in the FITS header. Specifying this option enables output of these keywords.
Lower-case the keyword names upon output.
A string with which to prefix output keywords.
Where to write the output. By default it is written to the standard output stream.
If the file name contains a %
it is assumed to be a sprintf
compatible format and is used to create a new file for every HDU, with the zero-based HDU index as the formatted data. For example
foo_%0d.rdb
Would generate
foo_01.rdb foo_02.rdb ...
If --fmt
is not specified, and --output
is, the extension of the specified file is used to determine the output format.
Output fits-dump-hdr's version information and exit.
Output abbreviated help information and exit.
Output the full manual and exit.
Attributes attached to extra fields specified by the --define
option are interpreted as rdb column types (e.g. N
, S
). To insert an extra numeric field named OBSID
into each record:
fits-dump-hdr -f rdb -D OBSID:N=22 ...
Diab Jerius <djerius@head.cfa.harvard.edu>