fitshead(1)

NAME
fitshead - list, add, modify and remove records of FITS header

SYNOPSIS
fitshead [options] file

DESCRIPTION
This utility is designed to do any manipulation with records in FITS header. All general information about FITS file as dimensions or a date of exposure are included in FITS headers as 80-character text records. Every record begins with 8-character keyword followed by the equal sign (=) and some value. A description (comment) can follow the value and they must be separated by slash (/). The values can be of logical, integer, real and character type (see any FITS for an example). The records have no terminating characters (like \r, \n,..).

Any logical value must be specified as T (true) or F (false). Any integer values must be specified by a number(s) without period (.). Any real number must be specified by a numbers including period. Any character value must be enclosed to apostrophes (').

By another word. The utility recognise integer and real numbers by the period. The number 123 is not equivalent to 123.0 because first is integer whilst second is real.

There are special keywords COMMENT and HISTORY which contains only a comment without value.

The utility operates in two modes. The read mode is a basic and a safe operation and lists of all or specified records by its keywords.

The write mode, which is really DANGEROUS, has possibility to modify already existing record and add or delete records in FITS header.

The options are as follows:

-k  Specify a keyword. Use CAPITAL letters.

-a  Add record specified by a new keyword in -k.

-e  Modify (update) a value with keyword specified by -k.

-l  Rename an keyword specified by -k to a new value.

-d  Delete a record with keyword specified by -k.

-c  Add an optional comment (description). In cases: -a,-e.

-w  Add a perfectly formated FITS record(s) reading of standard input.

-h,--help,-V,--version
    Print help or version.

EXAMPLES
List all keywords:

fitshead file.fits

List selected keywords:

fitshead -k DATE-OBS,OBJECT file.fits

Modify a selected record:

fitshead -k OBJECT -e 'Sirius' file.fits

Add a new record:

fitshead -k IDENTIFIER -a 'MCG+02-60-010' file.fits

Delete a selected record:

fitshead -k IDENTIFIER -d file.fite

Add COMMENT (also HISTORY) record:

fitshead -k COMMENT -a 'Modified by fitshead.' file.fits

ADVANCED USAGE
fitshead -k OBJECT file.fits | sed 's/sirius/M31/' | fitshead -w - fits.fits

BUGS
None of modify operations does not check presence of previously existing keywords. Therefore, some records can be presented repeatery, leading to violate FITS standard.

SEE ALSO
http://integral.physics.muni.cz/munipack

AUTHORS
F.Hroch <hroch@physics.muni.cz>