| 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.
| 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 |
| position | [R] | The position of the column in the table. |
| table | [R] | The table the column belongs to. |
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
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 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]