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

int qfits_table_append_xtension ( FILE *  outfile,
const qfits_table t,
const void **  data 
)

Appends a std extension header + data to a FITS table file.

Parameters:
outfile Pointer to (opened) file ready for writing.
t Pointer to qfits_table
data Table data to write
Returns:
int 0 if Ok, -1 otherwise
Dumps a FITS table to a file. The whole table described by qfits_table, and the data arrays contained in 'data' are dumped to the file. An extension header is produced with all keywords needed to describe the table, then the data is dumped to the file. The output is then padded to reach a multiple of 2880 bytes in size. Notice that no main header is produced, only the extension part.

Definition at line 1539 of file qfits_table.c.

References tab_t.

{
    /* Append the extension */
    if (t->tab_t == QFITS_BINTABLE) {
        if (qfits_table_append_bin_xtension(outfile, t, data) == -1) {
            qfits_error("in writing fits table") ;
            return -1 ;
        }
    } else if (t->tab_t == QFITS_ASCIITABLE) {
        if (qfits_table_append_ascii_xtension(outfile, t, data) == -1) {
            qfits_error("in writing fits table") ;
            return -1 ;
        }
    } else {
        qfits_error("Unrecognized table type") ;
        return -1 ;
    }
    return 0 ;
}


Generated by  Doxygen 1.6.0   Back to index