- ←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 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. Since all cards images are in character format, type conversion is performed. An
error status will be returned if the conversion has failed. If the keyword 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. This routine will
probably only work for HISTORY, COMMENT and ’
’
(blank) if there is just one value
given on the line, i.e. only one "
keyword = value"
before any comment marker. An error
will result otherwise.
Invocation
CALL FTS1_GKEYx( 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 = ? (Returned)
The value of the keyword.
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.
Notes:
-
There is a routine for each of the data types logical, integer, 64-bit integer, real, and double precision:
replace "
x"
in the routine name by L, I, K, R or D as appropriate.
-
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.
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑