C Standard Library Extensions: qfits_col Struct Reference

C Standard Library Extensions 6.2.0

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Members

Public Attributes
qfits_col Struct Reference

Column object. More...

`#include <qfits_table.h>`

List of all members.

## Public Attributes
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
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.

## Member Data Documentation

int qfits_col::atom_dec_nb

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

Referenced by qfits_col_fill(), qfits_query_column_data(), and qfits_query_column_seq_data().

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 TFORMd 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.

Referenced by qfits_col_fill(), qfits_query_column(), qfits_query_column_data(), qfits_query_column_nulls(), qfits_query_column_seq(), qfits_query_column_seq_data(), and qfits_table_ext_header_default().

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.

Referenced by qfits_col_fill(), qfits_query_column(), qfits_query_column_data(), qfits_query_column_seq(), and qfits_query_column_seq_data().

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

Referenced by qfits_col_fill(), qfits_query_column_data(), qfits_query_column_nulls(), and qfits_query_column_seq_data().

char qfits_col::nullval[FITSVALSZ]

Null value

Referenced by qfits_col_fill(), qfits_query_column_data(), qfits_query_column_nulls(), and qfits_query_column_seq_data().

int qfits_col::off_beg

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

Referenced by qfits_col_fill(), qfits_query_column(), and qfits_query_column_seq().

int qfits_col::readable

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

Referenced by qfits_col_fill(), qfits_query_column(), qfits_query_column_data(), qfits_query_column_nulls(), qfits_query_column_seq(), and qfits_query_column_seq_data().

char qfits_col::tdisp[FITSVALSZ]

Display format

Referenced by qfits_col_fill().

char qfits_col::tlabel[FITSVALSZ]

Label of the column

Referenced by qfits_col_fill(), and qfits_table_ext_header_default().

char qfits_col::tunit[FITSVALSZ]

Unit of the data

Referenced by qfits_col_fill(), and qfits_table_ext_header_default().

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

Referenced by qfits_col_fill(), and qfits_table_ext_header_default().

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

- qfits_table.h