- ←Prev
- AST
A Library for Handling
World Coordinate Systems
in Astronomy - Next→
- TOC ↑
Description:
This
function serches for a named keyword in a
FitsChan. If found, and if the keyword has a value associated
with it, a .TRUE. value is returned. If the keyword is not found, or if it does not have an associated
value, a .FALSE. value is returned.
Invocation
RESULT = AST_TESTFITS( THIS, NAME, THERE,
STATUS )
Arguments
THIS = INTEGER (Given)
Pointer to the FitsChan.
NAME = CHARACTER
(
)
(Given)
A character string containing the FITS keyword name. This may be a complete FITS header
card, in which case the keyword to use is extracted from it. No more than 80 characters are read from
this string. If a single dot ’
.’
is supplied, the current card is tested.
THERE = LOGICAL (Returned)
A value of .TRUE. will be returned if the keyword was found in the header, and .FALSE. otherwise.
This parameter allows a distinction to be made between the case where a keyword is not
present, and the case where a keyword is present but has no associated value.
STATUS =
INTEGER (Given and Returned)
The global status.
Returned Value
AST_TESTFITS
= LOGICAL
A value of zero .FALSE. is returned if the keyword was not found in the
FitsChan or has no associated value. Otherwise, a value of .TRUE. is returned.
Notes:
-
The current card is left unchanged by this function.
-
The card following the current card is checked first. If this is not the required card, then the rest of the
FitsChan is searched, starting with the first card added to the FitsChan. Therefore cards should be
accessed in the order they are stored in the FitsChan (if possible) as this will minimise the time spent
searching for cards.
-
An error will be reported if the keyword name does not conform to FITS requirements.
-
.FALSE. is returned as the function value if an error has already occurred, or if this function should fail
for any reason.
Copyright (C) 2021 East Asian Observatory
- ←Prev
- AST
A Library for Handling
World Coordinate
Systems
in Astronomy - Next→
- TOC ↑