GBTStateTable.h

Classes

GBTStateTable -- Class for dealing with the STATE table in GBT FITS files. (full description)

class GBTStateTable

Interface

Public Members
GBTStateTable()
GBTStateTable(FITSTable &fitstab)
GBTStateTable(const GBTStateTable &other)
~GBTStateTable()
GBTStateTable &operator=(const GBTStateTable &other)
Bool reattach(FITSTable &fitstab)
void detach()
Bool isAttached() const
const Table &table() const
const String &master() const
Int numphase() const
Double swperiod() const
const Vector<Bool> &sigref() const
const Vector<Bool> &cal() const
Bool digestActState(const Table &actState, Vector<Int> &states, Bool &mixedSignals, Bool &multipleCal, Bool &multipleSigref, Bool oldCalState) const
Private Members
Bool examineColumn(const Table &actState, const String &colName, Vector<Int> &colValue, Int factor, Bool oldCalState) const

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

To Do

Member Description

GBTStateTable()

This constructs a GBTStateTable that is not attached to any table. reattach must be used to make such an object useful.

GBTStateTable(FITSTable &fitstab)

Make a GBTStateTable attached to the indicated FITSTable

GBTStateTable(const GBTStateTable &other)

uses copy semantics

~GBTStateTable()

GBTStateTable &operator=(const GBTStateTable &other)

uses copy semantics

Bool reattach(FITSTable &fitstab)

reattach this object to a new FITSTable. If there are problems with the file, the return value is False and appropriate warnings are sent to the logger. The resulting object is not attached to any FITSTable.

void detach()

detach from any table.

Bool isAttached() const

Is this object attached to a FITSTable.

const Table &table() const

the STATE table converted to a table

const String &master() const

the value of the MASTER keyword in this table

Int numphase() const

the value of the NUMPHASE keyword in this table

Double swperiod() const

the value of the SWPERIOD keyword in this table

const Vector<Bool> &sigref() const

The SIGREF values - converted to the MS convention T if signal being observed, F if reference. In original FITS, 0 -> signal and 1 -> reference

const Vector<Bool> &cal() const

The CAL values - converted to the MS convention T if CAL noise being observed, F if not. In original FITS, 0->no cal, 1->cal.

Bool digestActState(const Table &actState, Vector<Int> &states, Bool &mixedSignals, Bool &multipleCal, Bool &multipleSigref, Bool oldCalState) const

Digest an ACT_STATE table. Return False if one of the following rules are violated: 1) The changing columns must be either ICAL or ECAL and ISIGREF or ESIGREF. 2) Each row of STATE must have one and only one matching row in ACT_STATE. If the above are true, the return value will be true and mixedSignals will be False. states will contain the STATE row numbers corresponding to the rows of ACT_STATE (hence states will have the same number of elements as rows in ACT_STATE). For matching rows, the row number of the corresponding STATE row will appear in the location for that row in ACT_STATE (i.e. in order). ACT_STATE rows with no match in STATE will be indicated by a value of -1 at that location in states. Data corresponding to that ACT_STATE row should all be zero (not checked here, obviously). Hence states is resized so that it has the same number of rows as the ACT_STATE table. mixedSignals = T is not necessarily fatal. If multipleCal and multipleSigref are both false, that is okay. In that case, mixedSignals = True imples that there was a non-zero value in both an E and I column but not both *CAL or *SIGREF columns. If oldCalState is True, then this implies that the ECAL and ICAL columns in the ACT_STATE table have the wrong sense (i.e. 0->on and 1->off) instead of the sense in the STATE table (0->off and 1->on). It is expected that this will be fixed in a future version of the ACS FITS file. It is up to the GBTACSFiller class to decide how to set that argument.

Bool examineColumn(const Table &actState, const String &colName, Vector<Int> &colValue, Int factor, Bool oldCalState) const