Logo Search packages:      
Sourcecode: qfits version File versions  Download package

FITS header handling


Detailed Description

This file contains definition and related methods for the FITS header structure. This structure is meant to remain opaque to the user, who only accesses it through the dedicated functions.

The 'keytuple' type is strictly internal to this module. It describes FITS cards as tuples (key,value,comment,line), where key is always a non-NULL character string, value and comment are allowed to be NULL. 'line' is a string containing the line as it has been read from the input FITS file (raw). It is set to NULL if the card is modified later. This allows in output two options: either reconstruct the FITS lines by printing key = value / comment in a FITS-compliant way, or output the lines as they were found in input, except for the modified ones.

The following functions are associated methods to this data structure:


Functions

void qfits_header_add (qfits_header *hdr, const char *key, const char *val, const char *com, const char *lin)
 Add a new card to a FITS header.
void qfits_header_add_after (qfits_header *hdr, const char *after, const char *key, const char *val, const char *com, const char *lin)
 add a new card to a FITS header
void qfits_header_append (qfits_header *hdr, const char *key, const char *val, const char *com, const char *lin)
 Append a new card to a FITS header.
qfits_headerqfits_header_copy (const qfits_header *src)
 Copy a FITS header.
qfits_headerqfits_header_default (void)
 FITS header default constructor.
void qfits_header_del (qfits_header *hdr, const char *key)
 Delete a card in a FITS header.
void qfits_header_destroy (qfits_header *hdr)
 qfits_header destructor
int qfits_header_dump (const qfits_header *hdr, FILE *out)
 Dump a FITS header to an opened file.
int qfits_header_getboolean (const qfits_header *hdr, const char *key, int errval)
 Return the value associated to a key, as a boolean (int).
char * qfits_header_getcom (const qfits_header *hdr, const char *key)
 Return the comment associated to a key, as a string.
double qfits_header_getdouble (const qfits_header *hdr, const char *key, double errval)
 Return the value associated to a key, as a double.
int qfits_header_getint (const qfits_header *hdr, const char *key, int errval)
 Return the value associated to a key, as an int.
int qfits_header_getitem (const qfits_header *hdr, int idx, char *key, char *val, char *com, char *lin)
 Return the i-th key/val/com/line tuple in a header.
char * qfits_header_getstr (const qfits_header *hdr, const char *key)
 Return the value associated to a key, as a string.
void qfits_header_mod (qfits_header *hdr, const char *key, const char *val, const char *com)
 Modifies a FITS card.
qfits_headerqfits_header_new (void)
 FITS header constructor.
int qfits_header_sort (qfits_header **hdr)
 Sort a FITS header.


Generated by  Doxygen 1.6.0   Back to index