ATL_MGFTS

Merge two FITS headers

Description:

This routine merges two FITS headers, each supplied in an AST FitsChan, in one of several different ways. The resulting merged list of headers is returned in a new FitsChan.

Invocation

CALL ATL_MGFTS( METHOD, FC1, FC2, FC3, STATUS )

Arguments

METHOD = INTEGER (Given)
Indicates how the two FITS headers should be merged:

1 - Concatenation. Store the contents of FC1 in the returned FitsChan, and then append the contents of FC2 to the end of the returned FitsChan. No checks are made for multiple occurences of the same keyword.

2 - Union (with priority given to FC2): For every header in FC1, see if FC2 contains the same keyword. If it does not, copy the FC1 header to the returned FitsChan. Then append the contents of FC2 to the end of the returned FitsChan.

3 - Overlap: For every header in FC1, see if FC2 contains the same keyword. If it does, and if the keyword value is the same in both FitsChans, copy the FC1 header to the returned FitsChan.

4 - Union (with priority given to FC1): Copy FC1 to the output, then for every header in FC2 append it to the end of the returned FitsChan unless the card already exists. This is similar to method 2 except that cards from FC2 are dropped instead of cards from FC1.

FC1 = INTEGER (Given)
Pointer to the first FitsChan.
FC2 = INTEGER (Given)
Pointer to the second FitsChan.
FC3 = INTEGER (Returned)
Pointer to the returned FitsChan.
STATUS = INTEGER (Given and Returned)
The global status.

Notes: