- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This routine searches a buffer containing the
header card images from a FITS file for card with keyword %NAME; and, if found, override
its original value or with the given character value %VALUE. The keyword can have a
comment string leading by the character specified by %CMTBGN. In addition comment-type
keywords—those with keywords COMMENT, HISTORY, and blank, or argument COMCAR is
.TRUE.—may also have their comments revised by %COMNT (whereupon %VALUE is
ignored). Selection of the desired card (especially important for commentary cards) can
be controlled by the starting the search at card numbered %STCARD. The search ends
when the next end of a header block, marked by the END keyword, is encountered or
the buffer is exhausted. If the keyword is present %THERE is true, otherwise it is false. If
the parameter is present more than once in the header, only the first occurence will be
used.
The name may be compound to permit writing of hierarchical keywords.
The buffer of FITS header card image should be mapped in the ’
UPDATE’
mode.
Invocation
CALL FTS1_UKEYC( NCARD, BUFFER, STCARD, NAME, VALUE, CMTBGN,
COMNT, COMCAR, THERE, CARD, STATUS )
Arguments
NCARD = INTEGER (Given)
The number of card images in the buffer.
BUFFER( NCARD ) = CHARACTER
∗ (
∗ )
(Given and Returned)
The buffer containing the header card images.
STCARD = INTEGER
(Given)
The number of the card from which to start search.
NAME = CHARACTER
∗ (
∗ ) (Given)
The name of the keyword to be written a new value. This may be a compound name to handle
hierarchical keywords, and it has the form keyword1.keyword2.keyword3 etc. The maximum number
of keywords per FITS card is 20. Comparisons are performed in uppercase and blanks are removed.
Each keyword must be no longer than 8 characters. The total length must not exceed 48 characters.
This is to allow for the value, and indentation into a blank-keyword card (as hierarchical keywords are
not standard and so cannot be part of the standard keyword name).
VALUE = CHARACTER
∗ (
∗ )
(Given)
The value to be used to override the original value of the keyword. It is ignored
when the keyword is COMMENT, HISTORY, or blank.
CMTBGN = CHARACTER
∗ ( 1 )
(Given)
The character which indicates the beginning of the comment string of to be appended to the
keyword. Normally it is ’
/’
. when it is blank, no comment will be appended to the keyword. It is
ignored when the keyword is COMMENT, HISTORY, or blank.
COMNT = CHARACTER
∗ (
∗ )
(Given)
The comment string of the keyword. It may be truncated at the end to put into the space left
after writing keyword value for non-commentary keywords.
COMCAR = LOGICAL (Given)
If
.TRUE., the supplied card is a comment and thus the value and comment delimiter are ignored, and
just the keyword and comment string are used to generate the header card.
THERE = LOGICAL
(Returned)
If true, the specified keyword is present.
CARD = INTEGER (Returned)
The number of the last continuation comment card whose contents are included in the
returned string.
STATUS = INTEGER (Given and Returned)
The global status.
Notes:
-
The comments are written from column 32 or higher if the value demands more than the customary 20
characters for the value. A comment may be omitted if the value is so long to leave no
room.
-
The BUFFER appears out of standard order because when this routine is called, BUFFER is expected
to be a mapped array. This order prevents having to append several %VAL(length) arguments instead
of just the one.
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑