fitskey Struct Reference

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]


Detailed Description

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.


Field Documentation

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:

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

        sprintf(dst, "%.8s", keyword)

to copy it to a character array with null-termination, or

        sprintf(dst, "%8.8s", keyword)

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:

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).


Generated on Mon Sep 14 17:03:56 2009 for WCSLIB 4.4 by  doxygen 1.5.1