Wild card characters may be used when specifying the name of the keyword to be read.
1
Read the name, value (as a string), and comment of the nth keyword in CHU.
If a NULL comment pointer is given on input,
then the comment string will not be returned. A null value string
will be returned if the keyword has no defined value (i.e., if the
value field in the keyword is blank).
int fits_read_keyn / ffgkyn
(fitsfile *fptr, int keynum, > char *keyname, char *value,
char *comment, int *status)
2
Read the next keyword whose name matches one of the strings in
'inclist' but does not match any of the strings in 'exclist'.
The strings in inclist and exclist may contain wild card characters
(*, ?, and #) as described at the beginning of this section.
This routine searches from the current header position to the
end of the header, only, and does not continue the search from
the top of the header back to the original position. The current
header position may be reset with the ffgrec routine. Note
that nexc may be set = 0 if there are no keywords to be excluded.
This routine returns status = KEY_NO_EXIST if a matching
keyword is not found.
int fits_find_nextkey / ffgnxk
(fitsfile *fptr, char **inclist, int ninc, char **exclist,
int nexc, > char *card, int *status)
3
Read the literal keyword value as a character string. Regardless
of the datatype of the keyword, this routine simply returns the
string of characters in the value field of the keyword along with
the comment field. If a NULL comment pointer is given on input,
then the comment string will not be returned.
int fits_read_keyword / ffgkey
(fitsfile *fptr, char *keyname, > char *value, char *comment,
int *status)
4
Read a keyword value (with the appropriate datatype) and comment from
the CHU. If a NULL comment pointer is given on input, then the comment
string will not be returned. If the value of the keyword is not defined
(i.e., the value field is blank) then an error status = VALUE_UNDEFINED
will be returned and the input value will not be changed.
int fits_read_key_str / ffgkys
(fitsfile *fptr, char *keyname, > char *value, char *comment,
int *status);
NOTE: after calling the following routine, programs must explicitly free
the memory allocated for 'longstr' after it is no longer needed.
int fits_read_key_longstr / ffgkls
(fitsfile *fptr, char *keyname, > char **longstr, char *comment,
int *status)
int fits_read_key_[log, lng, flt, dbl, cmp, dblcmp] / ffgky[ljedcm]
(fitsfile *fptr, char *keyname, > DTYPE *numval, char *comment,
int *status)
5
Read a sequence of indexed keyword values. The starting index number
(nstart) must be greater than 0. If the value of any of
the keywords is not defined (i.e., the value field is blank) then an
error status = VALUE_UNDEFINED will be returned and the input
value for the undefined keyword(s) will not be changed.
int fits_read_keys_str / ffgkns
(fitsfile *fptr, char *keyname, int nstart, int nkeys,
> char **value, int *nfound, int *status)
int fits_read_keys_[log, lng, flt, dbl] / ffgkn[ljed]
(fitsfile *fptr, char *keyname, int nstart, int nkeys,
> DTYPE *numval, int *nfound, int *status)
6
Read the value of a floating point keyword, returning the integer and
fractional parts of the value in separate routine arguments.
This routine may be used to read any keyword but is especially
useful for reading the 'triple precision' keywords written by ffpkyt.
int fits_read_key_triple / ffgkyt
(fitsfile *fptr, char *keyname, > long *intval, double *frac,
char *comment, int *status)