casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
OldGBTBackendTable Class Reference

Attach a FITSTabular to a GBT backend FITS file. More...

#include <OldGBTBackendTable.h>

List of all members.

Public Member Functions

 OldGBTBackendTable (const String &fileName)
 The file name.
 ~OldGBTBackendTable ()
Bool reopen (const String &fileName)
 Attach this OldGBTBackendTable to a new file name.
virtual const Stringname () const
virtual Bool isValid () const
virtual const TableRecord & keywords () const
virtual const RecordDesc & description () const
virtual const Record & units () const
virtual const Record & displayFormats () const
virtual const Record & nulls () const
virtual Bool pastEnd () const
virtual void next ()
virtual const Record & currentRow () const

Private Member Functions

 OldGBTBackendTable ()
 Undefined and inaccessible.
 OldGBTBackendTable (const OldGBTBackendTable &)
OldGBTBackendTableoperator= (const OldGBTBackendTable &)
void fill_row ()
void clear_self ()
void putField (void *fieldPtr, FitsBase &base, DataType dtype, Int nelements=-1, uInt offset=0)
void putColumn (void *fieldPtr, const ROTableColumn &tabCol, uInt tabRow, DataType dtype, uInt index=0)
Double utcstart () const
Double utdate () const
Double scalarFieldAsDouble (Int whichField) const
void init_ignoredFITS ()
RecordDesc descriptionFromOKKeys (const TableRecord &kwset)
 these should probably be made public/static members of the RecordDesc class?
RecordDesc descriptionFromTableDesc (const TableDesc &tabDesc)

Private Attributes

Bool isValid_p
String name_p
Int row_nr_p
Int max_row_nr_p
uInt phase_offset_p
 Used by dataOffset to convert phase number and receiver nr to an offset in the data array.
uInt rec_offset_p
Table * phase_table_p
 one table phase and one for receiver info, these are held in memory that may need to be changed if these supporting table get to be too large
Table * rec_table_p
Block< Int > phase_map_p
 Similarly, we need a map of table column number to row field number for each supporting table, this holds that info, if a value is < 0 then that column is not in use in the row.
Block< Int > rec_map_p
RecordFieldPtr< Int > * phase_id_p
 and this is the field that will hold the current row number for each support table
RecordFieldPtr< Int > * rec_id_p
Block< Bool > rcvrIndexed_p
 SP (and possibly other?) types of backends have most of the columns indexed by receiver number - we need to make that transparent so here we determine which Fields are so indexed.
Double duration_p
 The total duration of a subscan (individual row in data table)
Double duration_offset_p
 this is a cumulative duration offset
Matrix< Double > center_phase_time_p
 the time at the center of each phase averaged over all cycles relative to UTCSTART at the start of the integration
RecordFieldPtr< Double > * time_p
 the time
Int utcstartField_p
 the UTCSTART and UTDATE field numbers
Int utdateField_p
Double ut_factor_p
 sometime utcstart is in RADIANS (spectral processor), but mostly it is in seconds - this factor is usually 1 but is sometimes seconds/radian
Bool utcIsColumn_p
 We need to know if the utcstart column is a keyword or an actual column.
Int dmjdField_p
 only the Holo backend has this, but use it when available
BinaryTable * data_table_p
 one table for the DATA table, this is the only fitsio kept active throughout the life of the object
Block< Int > data_map_p
 this is the map from table column to row field Int is < 0 for DATA since that is handled sepearately
FitsInput * fitsIO_p
 This is needed to prevent a memory leak, it corresponds to the above binary table.
Int dataCol_p
 the field number in the data_table_p of the DATA column
Int dataField_p
 this field in row_fields_p holds the data
uInt datalength_p
 the number of elements of data to write at a time
TableRecord keywords_p
 This is a merged collection from all the tables, it may not be that useful.
RecordDesc description_p
 This is a merged description from all the tables, it also contains some things that are in the keywords, it corresponds to the description actually seen for each row.
Record units_p
 These are only the units of the for data table columns.
Record disps_p
 these are also from the data table columns only.
Record nulls_p
Record row_p
 The current row.
Block< void * > row_fields_p
 One per field in row_p, of the right type.
Double oldStart_p
 this is needed strictly for a bug in the SP FITS files involving utcstart and utdate
Vector< StringignoredFITS
 This is ugly - These are the reserved FITS keywords that I think do NOT belong in the output table - essentially these are keywords that describe the FITS file as opposed to the data therin.

Detailed Description

Attach a FITSTabular to a GBT backend FITS file.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

OldGBTBackendTable is a FITSTabular which is attached to a GBT FITS backend file. GBT FITS backend files contain a DATA table and several anciliary tables that correspond to the axes of the data column in the DATA table. This class makes such a file appear as a single table.

Example

Motivation

To Do

Definition at line 92 of file OldGBTBackendTable.h.


Constructor & Destructor Documentation

The file name.

Undefined and inaccessible.

An alternative would be to use reference semantics like Table.


Member Function Documentation

void OldGBTBackendTable::clear_self ( ) [private]
virtual const Record& OldGBTBackendTable::currentRow ( ) const [inline, virtual]

Definition at line 114 of file OldGBTBackendTable.h.

References row_p.

virtual const RecordDesc& OldGBTBackendTable::description ( ) const [inline, virtual]

Definition at line 105 of file OldGBTBackendTable.h.

References description_p.

RecordDesc OldGBTBackendTable::descriptionFromOKKeys ( const TableRecord &  kwset) [private]

these should probably be made public/static members of the RecordDesc class?

RecordDesc OldGBTBackendTable::descriptionFromTableDesc ( const TableDesc &  tabDesc) [private]
virtual const Record& OldGBTBackendTable::displayFormats ( ) const [inline, virtual]

Definition at line 107 of file OldGBTBackendTable.h.

References disps_p.

void OldGBTBackendTable::fill_row ( ) [private]

Referenced by next().

virtual Bool OldGBTBackendTable::isValid ( ) const [inline, virtual]

Definition at line 102 of file OldGBTBackendTable.h.

References isValid_p.

Referenced by next(), and pastEnd().

virtual const TableRecord& OldGBTBackendTable::keywords ( ) const [inline, virtual]

Definition at line 104 of file OldGBTBackendTable.h.

References keywords_p.

virtual const String& OldGBTBackendTable::name ( ) const [inline, virtual]

Definition at line 101 of file OldGBTBackendTable.h.

References name_p.

virtual void OldGBTBackendTable::next ( ) [inline, virtual]

Definition at line 113 of file OldGBTBackendTable.h.

References fill_row(), and isValid().

virtual const Record& OldGBTBackendTable::nulls ( ) const [inline, virtual]

Definition at line 108 of file OldGBTBackendTable.h.

References nulls_p.

OldGBTBackendTable& OldGBTBackendTable::operator= ( const OldGBTBackendTable ) [private]
virtual Bool OldGBTBackendTable::pastEnd ( ) const [inline, virtual]

Definition at line 110 of file OldGBTBackendTable.h.

References isValid(), max_row_nr_p, and row_nr_p.

void OldGBTBackendTable::putColumn ( void *  fieldPtr,
const ROTableColumn &  tabCol,
uInt  tabRow,
DataType  dtype,
uInt  index = 0 
) [private]
void OldGBTBackendTable::putField ( void *  fieldPtr,
FitsBase &  base,
DataType  dtype,
Int  nelements = -1,
uInt  offset = 0 
) [private]
Bool OldGBTBackendTable::reopen ( const String fileName)

Attach this OldGBTBackendTable to a new file name.

Double OldGBTBackendTable::scalarFieldAsDouble ( Int  whichField) const [private]

Referenced by utcstart(), and utdate().

virtual const Record& OldGBTBackendTable::units ( ) const [inline, virtual]

Definition at line 106 of file OldGBTBackendTable.h.

References units_p.

Double OldGBTBackendTable::utcstart ( ) const [inline, private]

Definition at line 211 of file OldGBTBackendTable.h.

References scalarFieldAsDouble(), and utcstartField_p.

Double OldGBTBackendTable::utdate ( ) const [inline, private]

Definition at line 212 of file OldGBTBackendTable.h.

References scalarFieldAsDouble(), and utdateField_p.


Member Data Documentation

Matrix<Double> OldGBTBackendTable::center_phase_time_p [private]

the time at the center of each phase averaged over all cycles relative to UTCSTART at the start of the integration

Definition at line 161 of file OldGBTBackendTable.h.

Block<Int> OldGBTBackendTable::data_map_p [private]

this is the map from table column to row field Int is < 0 for DATA since that is handled sepearately

Definition at line 180 of file OldGBTBackendTable.h.

BinaryTable* OldGBTBackendTable::data_table_p [private]

one table for the DATA table, this is the only fitsio kept active throughout the life of the object

Definition at line 177 of file OldGBTBackendTable.h.

the field number in the data_table_p of the DATA column

Definition at line 184 of file OldGBTBackendTable.h.

this field in row_fields_p holds the data

Definition at line 186 of file OldGBTBackendTable.h.

the number of elements of data to write at a time

Definition at line 188 of file OldGBTBackendTable.h.

RecordDesc OldGBTBackendTable::description_p [private]

This is a merged description from all the tables, it also contains some things that are in the keywords, it corresponds to the description actually seen for each row.

Definition at line 196 of file OldGBTBackendTable.h.

Referenced by description().

Record OldGBTBackendTable::disps_p [private]

these are also from the data table columns only.

Definition at line 200 of file OldGBTBackendTable.h.

Referenced by displayFormats().

only the Holo backend has this, but use it when available

Definition at line 173 of file OldGBTBackendTable.h.

this is a cumulative duration offset

Definition at line 158 of file OldGBTBackendTable.h.

The total duration of a subscan (individual row in data table)

Definition at line 156 of file OldGBTBackendTable.h.

FitsInput* OldGBTBackendTable::fitsIO_p [private]

This is needed to prevent a memory leak, it corresponds to the above binary table.

Definition at line 182 of file OldGBTBackendTable.h.

This is ugly - These are the reserved FITS keywords that I think do NOT belong in the output table - essentially these are keywords that describe the FITS file as opposed to the data therin.

They are fundamental to FITS, not the data.

Definition at line 218 of file OldGBTBackendTable.h.

Definition at line 130 of file OldGBTBackendTable.h.

Referenced by isValid().

TableRecord OldGBTBackendTable::keywords_p [private]

This is a merged collection from all the tables, it may not be that useful.

Definition at line 192 of file OldGBTBackendTable.h.

Referenced by keywords().

Definition at line 135 of file OldGBTBackendTable.h.

Referenced by pastEnd().

Definition at line 132 of file OldGBTBackendTable.h.

Referenced by name().

Record OldGBTBackendTable::nulls_p [private]

Definition at line 201 of file OldGBTBackendTable.h.

Referenced by nulls().

this is needed strictly for a bug in the SP FITS files involving utcstart and utdate

Definition at line 209 of file OldGBTBackendTable.h.

RecordFieldPtr<Int>* OldGBTBackendTable::phase_id_p [private]

and this is the field that will hold the current row number for each support table

Definition at line 149 of file OldGBTBackendTable.h.

Block<Int> OldGBTBackendTable::phase_map_p [private]

Similarly, we need a map of table column number to row field number for each supporting table, this holds that info, if a value is < 0 then that column is not in use in the row.

Definition at line 146 of file OldGBTBackendTable.h.

Used by dataOffset to convert phase number and receiver nr to an offset in the data array.

Definition at line 138 of file OldGBTBackendTable.h.

one table phase and one for receiver info, these are held in memory that may need to be changed if these supporting table get to be too large

Definition at line 142 of file OldGBTBackendTable.h.

Block<Bool> OldGBTBackendTable::rcvrIndexed_p [private]

SP (and possibly other?) types of backends have most of the columns indexed by receiver number - we need to make that transparent so here we determine which Fields are so indexed.

Definition at line 153 of file OldGBTBackendTable.h.

RecordFieldPtr<Int> * OldGBTBackendTable::rec_id_p [private]

Definition at line 149 of file OldGBTBackendTable.h.

Block<Int> OldGBTBackendTable::rec_map_p [private]

Definition at line 146 of file OldGBTBackendTable.h.

Definition at line 138 of file OldGBTBackendTable.h.

Definition at line 142 of file OldGBTBackendTable.h.

Block<void *> OldGBTBackendTable::row_fields_p [private]

One per field in row_p, of the right type.

i.e. casting required.

Definition at line 205 of file OldGBTBackendTable.h.

Definition at line 134 of file OldGBTBackendTable.h.

Referenced by pastEnd().

Record OldGBTBackendTable::row_p [private]

The current row.

Definition at line 203 of file OldGBTBackendTable.h.

Referenced by currentRow().

RecordFieldPtr<Double>* OldGBTBackendTable::time_p [private]

the time

Definition at line 164 of file OldGBTBackendTable.h.

Record OldGBTBackendTable::units_p [private]

These are only the units of the for data table columns.

Definition at line 198 of file OldGBTBackendTable.h.

Referenced by units().

sometime utcstart is in RADIANS (spectral processor), but mostly it is in seconds - this factor is usually 1 but is sometimes seconds/radian

Definition at line 169 of file OldGBTBackendTable.h.

We need to know if the utcstart column is a keyword or an actual column.

Definition at line 171 of file OldGBTBackendTable.h.

the UTCSTART and UTDATE field numbers

Definition at line 166 of file OldGBTBackendTable.h.

Referenced by utcstart().

Definition at line 166 of file OldGBTBackendTable.h.

Referenced by utdate().


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