Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/people/mcalabre/WCS/wcslib/structfitskey.html
Дата изменения: Unknown Дата индексирования: Mon Apr 11 00:37:50 2016 Кодировка: Поисковые слова: lmc |
WCSLIB
5.15
|
Keyword/value information. More...
#include <fitshdr.h>
Data Fields | |
int | keyno |
int | keyid |
int | status |
char | keyword [12] |
int | type |
int | padding |
union { | |
int i | |
int64 k | |
int l [8] | |
double f | |
double c [2] | |
char s [72] | |
} | keyvalue |
int | ulen |
char | comment [84] |
fitshdr() returns an array of fitskey structs, each of which contains the result of parsing one FITS header keyrecord. All members of the fitskey struct are returned by fitshdr(), none are given by the user.
int fitskey::keyno |
(Returned) Keyrecord number (1-relative) in the array passed as input to fitshdr(). This will be negated if the keyword matched any specified in the keyids[] index.
int fitskey::keyid |
(Returned) Index into the first entry in keyids[] with which the keyrecord matches, else -1.
int fitskey::status |
(Returned) Status flag bit-vector for the header keyrecord employing the following bit masks defined as preprocessor macros:
END
keyrecord with trailing text. END
keyrecord. The header keyrecord is syntactically correct if no bits are set.
char fitskey::keyword |
(Returned) Keyword name, null-filled for keywords of less than eight characters (trailing blanks replaced by nulls).
Use
to copy it to a character array with null-termination, or
to blank-fill to eight characters followed by null-termination.
int fitskey::type |
(Returned) Keyvalue data type:
A negative type indicates that a syntax error was encountered when attempting to parse a keyvalue of the particular type.
Comments on particular data types:
64-bit signed integers lie in the range
A native 64-bit data type may be defined via preprocessor macro WCSLIB_INT64 defined in wcsconfig.h, e.g. as 'long long int'; this will be typedef'd to 'int64' here. If WCSLIB_INT64 is not set, then int64 is typedef'd to int[3] instead and fitskey::keyvalue is to be computed as
and may reported via
where keyvalue.k[0] and keyvalue.k[1] range from -999999999 to +999999999.
Very long integers, up to 70 decimal digits in length, are encoded in keyvalue.l as an array of int[8], each of which stores 9 decimal digits. fitskey::keyvalue is to be computed as
int fitskey::padding |
(An unused variable inserted for alignment purposes only.)
int fitskey::i |
(Returned) Logical (fitskey::type == 1) and 32-bit signed integer (fitskey::type == 2) data types in the fitskey::keyvalue union.
int64 fitskey::k |
(Returned) 64-bit signed integer (fitskey::type == 3) data type in the fitskey::keyvalue union.
int fitskey::l |
(Returned) Very long integer (fitskey::type == 4) data type in the fitskey::keyvalue union.
double fitskey::f |
(Returned) Floating point (fitskey::type == 5) data type in the fitskey::keyvalue union.
double fitskey::c |
(Returned) Integer and floating point complex (fitskey::type == 6 || 7) data types in the fitskey::keyvalue union.
char fitskey::s |
(Returned) Null-terminated string (fitskey::type == 8) data type in the fitskey::keyvalue union.
union fitskey::keyvalue |
(Returned) A union comprised of
used by the fitskey struct to contain the value associated with a keyword.
int fitskey::ulen |
(Returned) Where a keycomment contains a units string in the standard form, e.g. [m/s], the ulen member indicates its length, inclusive of square brackets. Otherwise ulen is zero.
char fitskey::comment |
(Returned) Keycomment, i.e. comment associated with the keyword or, for keyrecords rejected because of syntax errors, the compete keyrecord itself with null-termination.
Comments are null-terminated with trailing spaces removed. Leading spaces are also removed from keycomments (i.e. those immediately following the '/
' character), but not from COMMENT
or HISTORY
keyrecords or keyrecords without a value indicator (''=
'' in columns 9-80).