Class RFits::ColumnInformation
In: lib/rfits/rfits.rb
Parent: Object

A class that encapsulates knowledge about the name and type of a column in a table.

Methods

data_type   dim   display_width   name   naxes   naxis   new   repeat   size   width  

Constants

COLUMN_TYPE_MAP = { IO::Proxy::TBIT => :bit, IO::Proxy::TBYTE => :byte, IO::Proxy::TLOGICAL => :logical, IO::Proxy::TSTRING => :string, IO::Proxy::TSHORT => :short, IO::Proxy::TLONG => :long, IO::Proxy::TFLOAT => :float, IO::Proxy::TDOUBLE => :double, IO::Proxy::TCOMPLEX => :complex, IO::Proxy::TDBLCOMPLEX => :dblcomplex

Attributes

position  [R]  The position of the column in the table.
table  [R]  The table the column belongs to.

Public Class methods

Create a new ColumnInformation object on the specified table (of type AsciiTable or BinaryTable) at the specified location (a zero-based index).

 ci = ColumnInformation.new(tbl, 2)   # the third column in the table

Public Instance methods

The data type of the column. May be one of:

  :bit, :byte, :logical, :string, :short, :long, :float, :double, :complex, :dblcomplex

If the data type is unrecognized, an integer corresponding to the cfitsio data type will be returned instead.

 ci.data_type   # :string

The number of dimensions of the column. "maxdim" is the maximum number of dimensions to return and defaults to 1.

 ci.dim  # 1

The display width (i.e. the width of the column if it were to be converted into it‘s string representation).

 ci.display_width  # 10

The name of the column.

 ci.name   # 'column_3'

The vector repeat count of the column. An AsciiTable will always have a repeat of 1.

 ci.repeat  # 10

The size of the dimensions of the column. "maxdim" is the maximum number of dimensions to return and defaults to 1.

  ci.size  # [1]

The width, in bytes, of the column.

 ci.width  # 10

[Validate]