- ←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 a keyword NAME; and returns its
value (as a character string) and comment, and the number of the card image within the
buffer array that contains the named keyword. 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 keyword is expected to be
present more than once then the argument NOCCUR controls which occurrence will be
retrieved. If a keyword is not found then no error results and the argument VALUE remains
unmodified.
The name may be compound to permit reading of hierarchical keywords (with a blank regulation
keyword). This routine will also work for HISTORY, COMMENT and the ’
’
(blank) keyword
comment cards. Cards without an equals sign present are also regarded as comment cards. Comment
cards have no returned value, only a comment.
Invocation
CALL FTS1_GKEYC( NCARD, BUFFER,
SCARD, NAME, NOCCUR, THERE, VALUE, COMENT, CARD, STATUS )
Arguments
NCARD =
INTEGER (Given)
The number of card images in the buffer.
BUFFER( NCARD ) = CHARACTER
80
(Given)
The buffer containing the header card images.
SCARD = INTEGER (Given)
The number of the card from where the search will begin. This is needed because the
headers may contain a dummy header prior to an extension.
NAME = CHARACTER
(
)
(Given)
The name of the keyword whose value is required. 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.
NOCCUR = INTEGER (Given)
The value of this argument specifies which occurrence of a
keyword should be used, if multiple ones are expected. Any value less than or equal to 1
indicates the first occurrence.
THERE = LOGICAL (Returned)
If .TRUE., the keyword given
by argument NAME is present, regardless of the exit status.
VALUE = CHARACTER
(
)
(Returned)
The value of the keyword. The string is truncated to the length of VALUE
if the FITS value contains more characters than that.
COMENT = CHARACTER
(
)
(Returned)
The comment associated with the keyword.
CARD = INTEGER (Returned)
The
number of the card containing the named keyword. If the card could not be found this is set to zero.
STATUS = INTEGER (Given)
Global status value.
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑