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

int qfits_col_fill ( qfits_col qc,
int  atom_nb,
int  atom_dec_nb,
int  atom_size,
tfits_type  atom_type,
const char *  label,
const char *  unit,
const char *  nullval,
const char *  disp,
int  zero_present,
float  zero,
int  scale_present,
float  scale,
int  offset_beg 

Fill a column object with some provided informations.

qc Pointer to the column that has to be filled
unit Unit of the data
label Label of the column
disp Way to display the data
nullval Null value
atom_nb Number of atoms per field. According to the type, an atom is a double, an int, a char, ...
atom_dec_nb Number of decimals as specified in TFORM
atom_size Size in bytes of the field for ASCII tables, and of an atom for BIN tables. ASCII tables only contain 1 atom per field (except for A type where you can of course have more than one char per field)
atom_type Type of data (11 types for BIN, 5 for ASCII)
zero_present Flag to use or not zero
zero Zero value
scale_present Flag to use or not scale
scale Scale value
offset_beg Gives the position of the column
-1 in error case, 0 otherwise

Definition at line 343 of file qfits_table.c.

References qfits_col::atom_dec_nb, qfits_col::atom_nb, qfits_col::atom_size, qfits_col::atom_type, qfits_col::nullval, qfits_col::off_beg, qfits_col::readable, qfits_col::scale, qfits_col::scale_present, qfits_col::tdisp, qfits_col::tlabel, qfits_col::tunit, qfits_col::zero, and qfits_col::zero_present.

Referenced by qfits_table_open().

    /* Number of atoms per column */
    qc->atom_nb = atom_nb ;
    /* Number of decimals in a field in ASCII table (0 in BINTABLE) */
    qc->atom_dec_nb = atom_dec_nb ;
    /* Size in bytes of an atom  */
    qc->atom_size = atom_size ;
    /* Data type in the column */
    qc->atom_type = atom_type ;
    /* Label of the column */
    (void)strcpy(qc->tlabel, label) ;
    /* Unit of the column data */
    (void)strcpy(qc->tunit, unit) ;
    /* Null value*/
    (void)strcpy(qc->nullval, nullval) ;

    /* How to display the data */
    (void)strcpy(qc->tdisp, disp) ;

    /* Default values for zero and scales */
    qc->zero_present = zero_present ;
    qc->scale_present = scale_present ;
    qc->zero = zero ;
    qc->scale = scale ;

    /* Number of bytes between two consecutive fields of the same column */
    qc->off_beg = offset_beg ;
    /* A column is a priori readable */
    qc->readable = 1 ;

    return 0 ;

Generated by  Doxygen 1.6.0   Back to index