Data Structures | |
struct | qfits_col |
Column object. More... | |
struct | qfits_header |
FITS header object. More... | |
struct | qfits_table |
Table object. More... | |
struct | qfitsdumper |
qfits dumper control object. More... | |
struct | qfitsloader |
qfits loader control object. More... | |
Typedefs | |
typedef struct qfits_header | qfits_header |
FITS header object. More... | |
typedef unsigned char | byte |
Alias for unsigned char. More... | |
typedef struct qfitsloader | qfitsloader |
qfits loader control object. More... | |
typedef struct qfitsdumper | qfitsdumper |
qfits dumper control object. More... | |
typedef enum _TFITS_DATA_TYPE_ | tfits_type |
Column data type. | |
typedef struct qfits_col | qfits_col |
Column object. More... | |
typedef struct qfits_table | qfits_table |
Table object. More... | |
Enumerations | |
enum | _TFITS_DATA_TYPE_ { TFITS_ASCII_TYPE_A, TFITS_ASCII_TYPE_D, TFITS_ASCII_TYPE_E, TFITS_ASCII_TYPE_F, TFITS_ASCII_TYPE_I, TFITS_BIN_TYPE_A, TFITS_BIN_TYPE_B, TFITS_BIN_TYPE_C, TFITS_BIN_TYPE_D, TFITS_BIN_TYPE_E, TFITS_BIN_TYPE_I, TFITS_BIN_TYPE_J, TFITS_BIN_TYPE_L, TFITS_BIN_TYPE_M, TFITS_BIN_TYPE_P, TFITS_BIN_TYPE_X, TFITS_BIN_TYPE_UNKNOWN } |
Column data type. More... | |
Functions | |
char* | qfits_version (void) |
void | qfits_cache_purge (void) |
Purge the qfits cache. More... | |
char* | qfits_expand_keyword (char *keyword) |
Expand a keyword from shortFITS to HIERARCH notation. More... | |
qfits_header* | qfits_header_new (void) |
FITS header constructor. More... | |
qfits_header* | qfits_header_default (void) |
FITS header default constructor. More... | |
void | qfits_header_add (qfits_header *hdr, char *key, char *val, char *com, char *lin) |
Add a new card to a FITS header. More... | |
void | qfits_header_add_after (qfits_header *hdr, char *after, char *key, char *val, char *com, char *lin) |
add a new card to a FITS header. More... | |
void | qfits_header_append (qfits_header *hdr, char *key, char *val, char *com, char *lin) |
Append a new card to a FITS header. More... | |
void | qfits_header_del (qfits_header *hdr, char *key) |
Delete a card in a FITS header. More... | |
void | qfits_header_mod (qfits_header *hdr, char *key, char *val, char *com) |
Modifies a FITS card. More... | |
int | qfits_header_sort (qfits_header **hdr) |
Sort a FITS header. More... | |
qfits_header* | qfits_header_copy (qfits_header *src) |
Copy a FITS header. More... | |
void | qfits_header_touchall (qfits_header *hdr) |
Touch all cards in a FITS header. More... | |
void | qfits_header_consoledump (qfits_header *hdr) |
Dump a FITS header to stdout. More... | |
void | qfits_header_destroy (qfits_header *hdr) |
qfits_header destructor. More... | |
char* | qfits_header_getstr (qfits_header *hdr, char *key) |
Return the value associated to a key, as a string. More... | |
char* | qfits_header_findmatch (qfits_header *hdr, char *key) |
Find a matching key in a header. More... | |
int | qfits_header_getitem (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. More... | |
char* | qfits_header_getline (qfits_header *hdr, char *key) |
Return the FITS line associated to a key, as a string. More... | |
char* | qfits_header_getcom (qfits_header *hdr, char *key) |
Return the comment associated to a key, as a string. More... | |
int | qfits_header_getint (qfits_header *hdr, char *key, int errval) |
Return the value associated to a key, as an int. More... | |
double | qfits_header_getdouble (qfits_header *hdr, char *key, double errval) |
Return the value associated to a key, as a double. More... | |
int | qfits_header_getboolean (qfits_header *hdr, char *key, int errval) |
Return the value associated to a key, as a boolean (int). More... | |
void | keytuple2str (char *line, char *key, char *val, char *com) |
Write out a key tuple to a string on 80 chars. More... | |
int | qfits_header_dump (qfits_header *hdr, FILE *out) |
Dump a FITS header to an opened file. More... | |
int | qfits_header_dump_hdr (qfits_header *hdr, FILE *out) |
Dump a FITS header to an opened file (one card per line). More... | |
char* | qfits_header_to_memblock (qfits_header *fh, int *hsize) |
Dump a fits header into a memory block. More... | |
char* | qfits_datamd5 (char *filename) |
Compute the MD5 hash of data zones in a FITS file. More... | |
char* | qfits_getkey (char *line) |
Find the keyword in a key card (80 chars). More... | |
char* | qfits_getvalue (char *line) |
Find the value in a key card (80 chars). More... | |
char* | qfits_getcomment (char *line) |
Find the comment in a key card (80 chars). More... | |
qfits_header* | qfits_header_read (char *filename) |
Read a FITS header from a file to an internal structure. More... | |
qfits_header* | qfits_header_read_hdr (char *filename) |
Read a FITS header from a 'hdr' file. More... | |
qfits_header* | qfits_header_readext (char *filename, int xtnum) |
Read an extension header from a FITS file. More... | |
void | qfits_zeropad (char *filename) |
Pad an existing file with zeros to a multiple of 2880. More... | |
int | is_fits_file (char *filename) |
Identify if a file is a FITS file. More... | |
char* | qfits_get_dir_name (char *filename) |
Find the directory name in the given string. More... | |
char* | qfits_get_base_name (const char *filename) |
Find out the base name of a file (i.e. without prefix path). More... | |
char* | qfits_get_root_name (char *filename) |
Find out the root part of a basename (name without extension). More... | |
char* | qfits_get_ext_name (char *filename) |
Find out the extension of a file name. More... | |
char* | qfits_get_login_name (void) |
Returns the user login name. More... | |
int | _qfits_isnanf (float f) |
int | _qfits_isinff (float f) |
int | _qfits_isnand (double d) |
int | _qfits_isinfd (double d) |
FILE* | qfits_paf_print_header (char *filename, char *paf_id, char *paf_desc, char *login_name, char *datetime) |
Open a new PAF file, output a default header. More... | |
char* | qfits_paf_query (char *filename, char *key) |
Query a PAF file for a value. More... | |
int | qfits_is_paf_file (char *filename) |
returns 1 if file is in PAF format, 0 else. More... | |
int | qfitsloader_init (qfitsloader *ql) |
Initialize a qfitsloader control object. More... | |
int | qfits_loadpix (qfitsloader *ql) |
Load a pixel buffer for one image. More... | |
float* | qfits_pixin_float (byte *, int, int, double, double) |
Load a pixel buffer as floats. More... | |
int* | qfits_pixin_int (byte *, int, int, double, double) |
Load a pixel buffer as ints. More... | |
double* | qfits_pixin_double (byte *, int, int, double, double) |
Load a pixel buffer as doubles. More... | |
int | qfits_pixdump (qfitsdumper *qd) |
Dump a pixel buffer to an output FITS file in append mode. More... | |
byte* | qfits_pixdump_float (float *buf, int npix, int ptype) |
Convert a float pixel buffer to a byte buffer. More... | |
byte* | qfits_pixdump_int (int *buf, int npix, int ptype) |
Convert an int pixel buffer to a byte buffer. More... | |
byte* | qfits_pixdump_double (double *buf, int npix, int ptype) |
Convert a double pixel buffer to a byte buffer. More... | |
int | qfits_err_statget (void) |
Get the current status of error display. More... | |
int | qfits_err_statset (int sta) |
Set the current status of error display. More... | |
int | qfits_err_register (void(*dispfn)(char *)) |
Register a function to display error/warning messages. More... | |
char* | qfits_query_hdr (char *filename, char *keyword) |
Retrieve the value of a key in a FITS header. More... | |
char* | qfits_query_ext (char *filename, char *keyword, int xtnum) |
Retrieve the value of a keyin a FITS extension header. More... | |
int | qfits_query_n_ext (char *filename) |
Counts the number of extensions in a FITS file. More... | |
int | qfits_query_nplanes (char *filename, int extnum) |
Counts the number of planes in a FITS extension. More... | |
char* | qfits_pretty_string (char *s) |
Clean out a FITS string value. More... | |
int | qfits_is_boolean (char *s) |
Identify if a FITS value is boolean. More... | |
int | qfits_is_int (char *s) |
Identify if a FITS value is an int. More... | |
int | qfits_is_float (char *s) |
Identify if a FITS value is float. More... | |
int | qfits_is_complex (char *s) |
Identify if a FITS value is complex. More... | |
int | qfits_is_string (char *s) |
Identify if a FITS value is string. More... | |
int | qfits_get_type (char *s) |
Identify the type of a FITS value given as a string. More... | |
int | qfits_get_hdrinfo (char *filename, int xtnum, int *seg_start, int *seg_size) |
Retrieve offset to start and size of a header in a FITS file. More... | |
int | qfits_get_datinfo (char *filename, int xtnum, int *seg_start, int *seg_size) |
Retrieve offset to start and size of a data section in a file. More... | |
char* | qfits_query_card (char *filename, char *keyword) |
Query a card in a FITS (main) header by a given key. More... | |
int | qfits_replace_card (char *filename, char *keyword, char *substitute) |
Replace a card in a FITS (main) header by a given card. More... | |
long | qfits_date_now (void) |
Returns the current date as a long (CCYYMMDD). More... | |
long | qfits_time_now (void) |
Returns the current time as a long (HHMMSSCC). More... | |
char* | qfits_get_date_iso8601 (void) |
Returns the current date as a static string. More... | |
char* | qfits_get_datetime_iso8601 (void) |
Returns the current date and time as a static string. More... | |
int | qfits_is_table (char *filename, int xtnum) |
Identify a file as containing a FITS table in extension. More... | |
qfits_header* | qfits_table_prim_header_default (void) |
Generate a default primary header to store tables. More... | |
qfits_header* | qfits_table_ext_header_default (qfits_table *) |
Generate a default extension header to store tables. More... | |
qfits_table* | qfits_table_new (char *filename, int table_type, int table_width, int nb_cols, int nb_raws) |
Table object constructor. More... | |
int | qfits_col_fill (qfits_col *qc, int atom_nb, int atom_dec_nb, int atom_size, tfits_type atom_type, char *label, char *unit, char *nullval, char *disp, int zero_present, float zero, int scale_present, float scale, int offset_beg) |
Fill a column object with some provided informations. More... | |
qfits_table* | qfits_table_open (char *filename, int xtnum) |
Read a FITS extension. More... | |
void | qfits_table_close (qfits_table *t) |
Free a FITS table and associated pointers. More... | |
unsigned char* | qfits_query_column (qfits_table *th, int colnum, int *selection) |
Extract data from a column in a FITS table. More... | |
unsigned char* | qfits_query_column_seq (qfits_table *th, int colnum, int start_ind, int nb_rows) |
Extract consequtive values from a column in a FITS table. More... | |
int | qfits_compute_table_width (qfits_table *th) |
Compute the table width in bytes from the columns infos. More... | |
void* | qfits_query_column_data (qfits_table *th, int colnum, int *selection, void *null_value) |
Extract binary data from a column in a FITS table. More... | |
void* | qfits_query_column_seq_data (qfits_table *th, int colnum, int start_ind, int nb_rows, void *null_value) |
Extract binary data from a column in a FITS table. More... | |
int* | qfits_query_column_nulls (qfits_table *th, int colnum, int *selection, int *nb_vals, int *nb_nulls) |
Detect NULL values in a column. More... | |
int | qfits_save_table_hdrdump (void **array, qfits_table *table, qfits_header *fh) |
Save a table to a FITS file with a given FITS header. More... | |
int | qfits_table_append_xtension (FILE *outfile, qfits_table *t, void **data) |
Appends a std extension header + data to a FITS table file. More... | |
int | qfits_table_append_xtension_hdr (FILE *outfile, qfits_table *t, void **data, qfits_header *hdr) |
Appends a specified extension header + data to a FITS table file. More... | |
char* | qfits_table_field_to_string (qfits_table *table, int col_id, int row_id, int use_zero_scale) |
given a col and a row, find out the string to write for display. More... |
|
Alias for unsigned char.
A 'byte' is just an alias for an unsigned char. It is only defined for readability. |
|
Column object.
This structure contains all information needed to read a column in a table. These informations come from the header. The qfits_table object contains a list of qfits_col objects. This structure has to be created from scratch and filled if one want to generate a FITS table. |
|
FITS header object.
This structure represents a FITS header in memory. It is actually no more than a thin layer on top of the keytuple object. No field in this structure should be directly modifiable by the user, only through accessor functions. |
|
Table object.
This structure contains all information needed to read a FITS table. These information come from the header. The object is created by qfits_open(). To read a FITS table, here is a code example: int main(int argc, char* argv[]) { qfits_table * table ; int n_ext ; int i ; // Query the number of extensions n_ext = qfits_query_n_ext(argv[1]) ; // For each extension for (i=0 ; i<n_ext ; i++) { // Read all the infos about the current table table = qfits_table_open(argv[1], i+1) ; // Display the current table dump_extension(table, stdout, '|', 1, 1) ; } return ; } |
|
qfits dumper control object.
This structure offers various control parameters to dump a pixel buffer to a FITS file. The buffer will be dumped as requested to the requested file in append mode. Of course, the requested file must be writeable for the operation to succeed. The following example demonstrates how to save a linear ramp sized 100x100 to a FITS file with BITPIX=16. Notice that this code only dumps the pixel buffer, no header information is provided in this case.
int i, j ; int * ibuf ; qfitsdumper qd ; // Fill a buffer with 100x100 int pixels ibuf = malloc(100 * 100 * sizeof(int)); for (j=0 ; j<100 ; j++) { for (i=0 ; i<100 ; i++) { ibuf[i+j*100] = i+j ; } } qd.filename = "out.fits" ; // Output file name qd.npix = 100 * 100 ; // Number of pixels qd.ptype = PTYPE_INT ; // Input buffer type qd.ibuf = ibuf ; // Set buffer pointer qd.out_ptype = BPP_16_SIGNED ; // Save with BITPIX=16 // Dump buffer to file (error checking omitted for clarity) qfits_pixdump(&qd); free(ibuf); If the provided output file name is "STDOUT" (all capitals), the function will dump the pixels to the stdout steam (usually the console, could have been re-directed). |
|
qfits loader control object.
This structure serves two purposes: input and output for the qfits pixel loading facility. To request pixels from a FITS file, you need to allocate (statically or dynamically) such a structure and fill up the input fields (filename, xtension number, etc.) to specify the pixels you want from the file. Before performing the actual load, you must pass the initialized structure to qfitsloader_init() which will check whether the operation is feasible or not (check its returned value). If the operation was deemed feasible, you can proceed to load the pixels, passing the same structure to qfits_loadpix() which will fill up the output fields of the struct. Notice that a pixel buffer will have been allocated (through malloc or mmap) and placed into the structure. You need to call free() on this pointer when you are done with it, typically in the image or cube destructor. The qfitsloader_init() function is also useful to probe a FITS file for useful informations, like getting the size of images in the file, the pixel depth, or data offset. Example of a code that prints out various informations about a plane to load, without actually loading it:
int main(int argc, char * argv[]) { qfitsloader ql ; ql.filename = argv[1] ; ql.xtnum = 0 ; ql.pnum = 0 ; if (qfitsloader_init(&ql)!=0) { printf("cannot read info about %s\n", argv[1]); return -1 ; } printf( "file : %s\n" "xtnum : %d\n" "pnum : %d\n" "# xtensions : %d\n" "size X : %d\n" "size Y : %d\n" "planes : %d\n" "bitpix : %d\n" "datastart : %d\n" "datasize : %d\n" "bscale : %g\n" "bzero : %g\n", ql.filename, ql.xtnum, ql.pnum, ql.exts, ql.lx, ql.ly, ql.np, ql.bitpix, ql.seg_start, ql.seg_size, ql.bscale, ql.bzero); return 0 ; } |
|
Column data type.
|
|
|
Test a double variable for Inf value. Do not call directly, call qfits_isinf(). |
|
Test a float variable for Inf value. Do not call directly, call qfits_isinf(). |
|
Test a double variable for NaN value. Do not call directly, call qfits_isnan(). |
|
Test a float variable for NaN value. Do not call directly, call qfits_isnan(). |
|
Identify if a file is a FITS file.
|
|
Write out a key tuple to a string on 80 chars.
|
|
Purge the qfits cache.
|
|
Fill a column object with some provided informations.
|
|
Compute the table width in bytes from the columns infos.
|
|
Compute the MD5 hash of data zones in a FITS file.
The returned string is statically allocated inside this function, so do not free it or modify it. This function returns NULL in case of error. |
|
Returns the current date as a long (CCYYMMDD).
Example: 19 Oct 2000 is returned as 20001019 |
|
Register a function to display error/warning messages.
void display_function(char * msg); They are simple functions that expect a ready-made error message and return void. They can do whatever they want with the message (log it to a file, send it to a GUI, to the syslog, ...). The message is built using a printf-like statement in qfits_error and qfits_warning, then passed to all registered display functions. A maximum of QFITS_ERR_MAXERRDISP can be registered (see source code). If the limit has been reached, this function will signal it by returning -1. |
|
Get the current status of error display.
|
|
Set the current status of error display.
\begin{verbatim} int prev_stat = qfits_err_statset(0) ; function_call() ; qfits_err_statset(prev_stat); \end{verbatim} |
|
Expand a keyword from shortFITS to HIERARCH notation.
Examples:
det.dit expands to HIERARCH ESO DET DIT ins.filt1.id expands to HIERARCH ESO INS FILT1 ID If the input keyword is a regular FITS keyword (i.e. it contains not dots '.') the result is identical to the input. |
|
Find out the base name of a file (i.e. without prefix path).
This function does not check for the existence of the path or the file. Examples: qfits_get_base_name("/cdrom/data/image.fits") returns "image.fits" qfits_get_base_name("filename.fits") returns "filename.fits" |
|
Returns the current date as a static string.
|
|
Returns the current date and time as a static string.
|
|
Retrieve offset to start and size of a data section in a file.
You must provide an extension number for the header, 0 meaning the main header in the file. |
|
Find the directory name in the given string.
This function does not check for the existence of the path or the file. Examples: get_dir_name("/cdrom/data/image.fits") returns "/cdrom/data" get_dir_name("filename.fits") returns "." |
|
Find out the extension of a file name.
qfits_get_base_name) .
Works with all kinds of extensions: returns the part of the string after the last dot. If no dot is found in the input string, NULL is returned. Examples: get_ext_name("filename.fits") returns "fits" get_ext_name("hello.c") returns "c" get_ext_name("readme") returns NULL |
|
Retrieve offset to start and size of a header in a FITS file.
You must provide an extension number for the header, 0 meaning the main header in the file. |
|
Returns the user login name.
If the user name cannot be determined, the returned pointer will point to a string which first character is a null character. |
|
Find out the root part of a basename (name without extension).
Examples: get_root_name("/cdrom/filename.fits") returns "/cdrom/filename" get_root_name("filename.paf") returns "filename" get_root_name("filename") returns "filename" get_root_name("filename.ext") returns "filename.ext" Since the returned string is statically allocated in this module, do not try to free it or modify its contents. |
|
Identify the type of a FITS value given as a string.
|
|
Find the comment in a key card (80 chars).
|
|
Find the keyword in a key card (80 chars).
|
|
Find the value in a key card (80 chars).
|
|
Add a new card to a FITS header.
|
|
add a new card to a FITS header.
|
|
Append a new card to a FITS header.
|
|
Dump a FITS header to stdout.
|
|
Copy a FITS header.
|
|
FITS header default constructor.
|
|
Delete a card in a FITS header.
|
|
qfits_header destructor.
|
|
Dump a FITS header to an opened file.
|
|
Dump a FITS header to an opened file (one card per line).
|
|
Find a matching key in a header.
Examples:
s = qfits_header_findmatch(hdr, "SIMP") returns "SIMPLE" s = qfits_header_findmatch(hdr, "HIERARCH ESO DET") returns the first detector keyword among the HIERACH keys. |
|
Return the value associated to a key, as a boolean (int).
errval is returned if no matching key is found or no value is attached. A true value is any character string beginning with a 'y' (yes), a 't' (true) or the digit '1'. A false value is any character string beginning with a 'n' (no), a 'f' (false) or the digit '0'. |
|
Return the comment associated to a key, as a string.
Returns NULL if no matching key is found or no comment is attached. |
|
Return the value associated to a key, as a double.
|
|
Return the value associated to a key, as an int.
|
|
Return the i-th key/val/com/line tuple in a header.
int i ; char key[FITS_LINESZ+1] ; char val[FITS_LINESZ+1] ; char com[FITS_LINESZ+1] ; char lin[FITS_LINESZ+1] ; for (i=0 ; i<hdr->n ; i++) { qfits_header_getitem(hdr, i, key, val, com, lin); printf("card[%d] key[%s] val[%s] com[%s]\n", i, key, val, com); } This function has primarily been written to interface a qfits_header object to other languages (C++/Python). If you are working within a C program, you should use the other header manipulation routines available in this module. |
|
Return the FITS line associated to a key, as a string.
Returns NULL if no matching key is found or no line is attached. |
|
Return the value associated to a key, as a string.
Returns NULL if no matching key is found or no value is attached. |
|
Modifies a FITS card.
|
|
FITS header constructor.
|
|
Read a FITS header from a file to an internal structure.
Value, comment, and original line might be NULL pointers. |
|
Read a FITS header from a 'hdr' file.
|
|
Read an extension header from a FITS file.
Returns NULL in case of error. |
|
Sort a FITS header.
|
|
Dump a fits header into a memory block.
The returned block size is indicated in the passed output variable 'hsize'. The returned block must be deallocated using free(). |
|
Touch all cards in a FITS header.
|
|
Identify if a FITS value is boolean.
|
|
Identify if a FITS value is complex.
|
|
Identify if a FITS value is float.
|
|
Identify if a FITS value is an int.
|
|
returns 1 if file is in PAF format, 0 else.
|
|
Identify if a FITS value is string.
|
|
Identify a file as containing a FITS table in extension.
|
|
Load a pixel buffer for one image.
This function will fill up the ibuf/fbuf/dbuf field, depending on the requested pixel type (resp. int, float or double). The returned buffer has been allocated using one of the special memory operators present in xmemory.c. To deallocate the buffer, you must call the version of free() offered by xmemory, not the usual system free(). It is enough to include "xmemory.h" in your code before you make calls to the pixel loader here. |
|
Open a new PAF file, output a default header.
A default header is produced according to the VLT DICB standard. You need to provide an identificator (paf_id) of the producer of the file. Typically, something like "ISAAC/zero_point". The PAF description (paf_desc) is meant for humans. Typically, something like "Zero point computation results". This function returns an opened file pointer, ready to receive more data through fprintf's. The caller is responsible for fclose()ing the file. |
|
Query a PAF file for a value.
If the key is not found, this function returns NULL. |
|
Dump a pixel buffer to an output FITS file in append mode.
The minimum fields to fill are:
If the given output file name is "STDOUT" (all caps), the dump will be performed to stdout. |
|
Convert a double pixel buffer to a byte buffer.
|
|
Convert a float pixel buffer to a byte buffer.
|
|
Convert an int pixel buffer to a byte buffer.
|
|
Load a pixel buffer as doubles.
The returned buffer must be deallocated using the free() offered by xmemory. It is enough to include "xmemory.h" before calling free on the returned pointer. |
|
Load a pixel buffer as floats.
The returned buffer must be deallocated using the free() offered by xmemory. It is enough to include "xmemory.h" before calling free on the returned pointer. |
|
Load a pixel buffer as ints.
The returned buffer must be deallocated using the free() offered by xmemory. It is enough to include "xmemory.h" before calling free on the returned pointer. |
|
Clean out a FITS string value.
Examples:
|
|
Query a card in a FITS (main) header by a given key.
|
|
Extract data from a column in a FITS table.
Extract a column from a FITS table and return the data as a bytes array. The returned array type and size are determined by the column object in the qfits_table and by the selection parameter. Returned array size in bytes is: nbselected * col->natoms * col->atom_size Numeric types are correctly understood and byte-swapped if needed, to be converted to the local machine type. NULL values have to be handled by the caller. The returned buffer has been allocated using one of the special memory operators present in xmemory.c. To deallocate the buffer, you must call the version of free() offered by xmemory, not the usual system free(). It is enough to include "xmemory.h" in your code before you make calls to the pixel loader here. |
|
Extract binary data from a column in a FITS table.
Returned array size in bytes is: nb_selected * col->atom_nb * col->atom_size NULL values are recognized and replaced by the specified value. The returned buffer has been allocated using one of the special memory operators present in xmemory.c. To deallocate the buffer, you must call the version of free() offered by xmemory, not the usual system free(). It is enough to include "xmemory.h" in your code before you make calls to the pixel loader here. |
|
Detect NULL values in a column.
|
|
Extract consequtive values from a column in a FITS table.
|
|
Extract binary data from a column in a FITS table.
|
|
Retrieve the value of a keyin a FITS extension header.
|
|
Retrieve the value of a key in a FITS header.
The input keyword is first converted to upper case and expanded to the HIERARCH scheme if given in the shortFITS notation. This function is pretty fast due to the mmapping. Due to buffering on most Unixes, it is possible to call many times this function in a row on the same file and do not suffer too much from performance problems. If the file contents are already in the cache, the file will not be re-opened every time. It is possible, though, to modify this function to perform several searches in a row. See the source code. Returns NULL in case the requested keyword cannot be found. |
|
Counts the number of extensions in a FITS file.
|
|
Counts the number of planes in a FITS extension.
|
|
Replace a card in a FITS (main) header by a given card.
The input keyword is first converted to upper case and expanded to the HIERARCH scheme if given in the shortFITS notation. Returns 0 if everything worked Ok, -1 otherwise. |
|
Save a table to a FITS file with a given FITS header.
|
|
Appends a std extension header + data to a FITS table file.
|
|
Appends a specified extension header + data to a FITS table file.
|
|
Free a FITS table and associated pointers.
|
|
Generate a default extension header to store tables.
|
|
given a col and a row, find out the string to write for display.
|
|
Table object constructor.
|
|
Read a FITS extension.
|
|
Generate a default primary header to store tables.
|
|
Returns the current time as a long (HHMMSSCC).
|
|
|
|
Pad an existing file with zeros to a multiple of 2880.
|
|
Initialize a qfitsloader control object.
This function is basically a probe sent on a FITS file to ask qfits if loading these data would be Ok or not. The actual loading is performed by qfits_loadpix() afterwards. |