mkheader: Append/replace header parameters

Package: artdata

Usage

mkheader images headers

Parameters

images
List of images in which header information is to be added or modified.
append = yes
Append to existing keywords? If no then the existing header is replaced.
verbose = no
Verbose output?

Description

The image headers in the list of input images may be replaced or appended with information from images or data files specified by the header parameter list. If the header list is shorter than the list of images to be modified the last header file is repeated. Depending on the value of the append parameter, new parameters will be appended or replace the existing image header parameters.

A header keyword data file consists of lines of FITS format cards. Leading whitespace is ignored. Lines not recognized as FITS cards are ignored. A valid FITS card is defined as beginning with a keyword of up to 8 uppercase, digit, hyphen, or underscore characters. If less than 8 characters the remaining characters are blanks. The ninth character may be an equal sign but must be immediately followed by a blank. Such value cards should be in FITS format though no attempt is made to enforce this. Any other ninth character is also acceptable and the line will be treated as a comment. Note that this way of recognizing FITS parameters excludes the case of comments in which the first 8 characters are blank. The reason for allowing leading whitespace and eliminating the blank keyword case is so that the long output of imheader may be used directly as input.

Header files are also used by several of the tasks in the artificial data package with a standard default file "artdata$stdheader.dat". To edit image headers also see hedit.

Examples

1. Add some standard keywords from a file to an image.

ar> type myheader
# MY header list
INSTRUME= 'bspec mark II'           / B Spectrograph
LENS    =                  3        / Lens number
FOCRATIO=                5.2        / Focal ratio
ar> mkheader *.imh myheader

2. Copy an image header.

ar> mkheader new dev$pix append-

3. Edit the image header with a text editor and replace the old header with the edited header.

ar> imheader myimage l+ > temp
ar> edit temp
ar> mkheader myimage temp append-

See also

hedit, mkobjects, mknoise, mk1dspec, mk2dspec