FTS1_INKEY

Inserts keywords to a FITS card array

Description:

This subroutine inserts a number of keyword cards into a FITS-header array just before some given keywords, and returns the position of these newly inserted cards in the FITS array after insertion. If a given position keyword is not in the FITS header or is blank, its corresponding keyword card will be inserted just before the end card or appended to the present FITS array when end card does not exist. If a keyword card to be inserted already exists in the FITS array, that card will be deleted and moved to the specified position. For those new keyword cards, an equals sign = will be put at the 9th column for simple keyword or immediately after keywords for compound ones; and a character value {undefined} will be given to them.

The following reserved keywords are not modified: SIMPLE, BITPIX, NAXIS, NAXISn, EXTEND, PCOUNT, GCOUNT, XTENSION, BLOCKED, and END.

Invocation

CALL FTS1_INKEY( NOLDCA, NKEY, NAMES, PSTNS, FTSCAR, : ACTNUM, IARY1, IARY2, CARY, STATUS )

Arguments

NOLDCA = INTEGER (Given)
Number of cards in the original FITS array.
NKEY = INTEGER (Given)
The number of keyword cards to be inserted into the FITS-header array.
NAMES( NKEY ) = CHARACTER ( ) (Given)
The keywords to be inserted into FITS card array.
PSTNS( NKEY ) = CHARACTER ( ) (Given)
The position keyword names, before them the new keywords is inserted. If any name in it does not exit in FITS array, its corresponding keyword will be inserted just before the end card or appended to FITS array when end card does not exist. If two or more new cards have the same position name, they will all be put just before the position name in the same order as they are in NAMES.
FTSCAR( NOLDCA + NKEY ) = CHARACTER ( ) (Given and Returned)
On entry its first NOLDCA elements hold the original FITS cards. On exit, its first ACTNUM elements hold the FITS cards after the insersion.
ACTNUM = INTEGER (Returned)
The actual number of cards in the FITS array after inserting.
IARY1( NOLDCA + NKEY ) = INTEGER (Returned)
The first temporary working space.
IARY2( NOLDCA + NKEY ) = INTEGER (Returned)
The second temporary working space.
CARY( NOLDCA + NKEY ) = CHARACTER ( ) (Returned)
A temporary working space.
STATUS = INTEGER (Given and Returned)
The global status.