Get a named keyword value from a FitsChan
CF - Complex floating point values.
CI - Complex integer values.
F - Floating point values.
I - Integer values.
L - Logical (i.e. boolean) values.
S - String values.
CN - A "
CONTINUE"
value, these are treated like string values, but are encoded without an equals
sign.
The data type of the "
value"
argument
depends on <X> as follows:
CF - DOUBLE PRECISION(2) (a 2 element array to hold the real and imaginary parts of the complex value).
CI - INTEGER(2) (a 2 element array to hold the real and imaginary parts of the complex value).
F - DOUBLE PRECISION.
I - INTEGER
L - LOGICAL
S - CHARACTER
CN - CHARACTER
’
.’
is supplied, the value of the current card is returned. If a name is supplied, 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.
If the requested card is found, it becomes the current card, otherwise the current card is left pointing at
the "
end-of-file"
.
If the stored keyword value is not of the requested type, it is converted into the requested type.
If the keyword is found in the FitsChan, but has no associated value, an error is reported. If necessary, the AST_TESTFITS function can be used to determine if the keyword has a defined value in the FitsChan prior to calling this function.
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.
The FITS standard says that string keyword values should be padded with trailing spaces if they are shorter than 8 characters. For this reason, trailing spaces are removed from the string returned by AST_GETFITSS if the original string (including any trailing spaces) contains 8 or fewer characters. Trailing spaces are not removed from longer strings.