qfits_col Struct Reference

Column object. More...


Data Fields

int atom_nb
int atom_dec_nb
int atom_size
tfits_type atom_type
char tlabel [FITSVALSZ]
char tunit [FITSVALSZ]
char nullval [FITSVALSZ]
char tdisp [FITSVALSZ]
int zero_present
float zero
int scale_present
float scale
int off_beg
int readable


Detailed Description

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.


Field Documentation

int qfits_col::atom_dec_nb
 

Number of decimals in a ASCII field. This value is always 0 for BIN tables

int qfits_col::atom_nb
 

Number of atoms in one field. In ASCII tables, it is the number of characters in the field as defined in TFORM%d keyword. In BIN tables, it is the number of atoms in each field. For type 'A', it is the number of characters. A field with two complex object will have atom_nb = 4.

int qfits_col::atom_size
 

Size of one element in bytes. In ASCII tables, atom_size is the size of the element once it has been converted in its 'destination' type. For example, if "123" is contained in an ASCII table in a column defined as I type, atom_nb=3, atom_size=4. In ASCII tables:

  • type 'A' : atom_size = atom_nb = number of chars
  • type 'I', 'F' or 'E' : atom_size = 4
  • type 'D' : atom_size = 8 In BIN tables :
  • type 'A', 'L', 'X', 'B': atom_size = 1
  • type 'I' : atom_size = 2
  • type 'E', 'J', 'C', 'P' : atom_size = 4
  • type 'D', 'M' : atom_size = 8 In ASCII table, there is one element per field. The size in bytes and in number of characters is atom_nb, and the size in bytes after conversion of the field is atom_size. In BIN tables, the size in bytes of a field is always atom_nb*atom_size.

tfits_type qfits_col::atom_type
 

Type of data in the column as specified in TFORM keyword In ASCII tables : TFITS_ASCII_TYPE_* with *=A, I, F, E or D In BIN tables : TFITS_BIN_TYPE_* with *=L, X, B, I, J, A, E, D, C, M or P

char qfits_col::nullval[FITSVALSZ]
 

Null value

int qfits_col::off_beg
 

Offset between the beg. of the table and the beg. of the column.

int qfits_col::readable
 

Flag to know if the column is readable. An empty col is not readable

float qfits_col::scale
 

int qfits_col::scale_present
 

char qfits_col::tdisp[FITSVALSZ]
 

Display format

char qfits_col::tlabel[FITSVALSZ]
 

Label of the column

char qfits_col::tunit[FITSVALSZ]
 

Unit of the data

float qfits_col::zero
 

int qfits_col::zero_present
 

zero and scale are used when the quantity in the field does not represent a true physical quantity. Basically, thez should be used when they are present: physical_value = zero + scale * field_value They are read from TZERO and TSCAL in the header


The documentation for this struct was generated from the following file: