casacore
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::FITSTimedTable Class Reference

More...

#include <FITSTimedTable.h>

Public Member Functions

 FITSTimedTable ()
 This is not connected to any data, isValid always returns True, keywords and description return the default versions hasChanged returns False, name returns an empty string pastEnd returns False and next does nothing. More...
 
 FITSTimedTable (FITSTabular *originalTable, uInt whichColumnIsTime=0)
 Note, originalTable cannot be destructed, reopened,...,during the lifetime of this object. More...
 
 ~FITSTimedTable ()
 
virtual Bool isValid () const
 isValid() returns False if this object isn't a valid Tabular data structure. More...
 
virtual const TableRecordkeywords () const
 Returns keywords which are associated with the underlying FITS files. More...
 
virtual const RecordDescdescription () const
 Returns the description of the underlying FITS table. More...
 
virtual const Recordunits () const
 Returns any TUNITnnn associated with a column (the field names are the column names, each field value is the TUNITnnn value for that field). More...
 
virtual const RecorddisplayFormats () const
 Returns any TDISPnnn associated with a column (the field names are the column names, each field value is the TDISPnnn value for that field). More...
 
virtual const Recordnulls () const
 Returns any TNULLnnn associated with a column (the field names are the column names, each field value is the TNULLnnn value for that field). More...
 
virtual Bool hasChanged () const
 Has the description changed since construction, default is False. More...
 
virtual void resetChangedFlag ()
 reset the changed flag, default do nothing More...
 
virtual const Stringname () const
 return the name More...
 
virtual Bool pastEnd () const
 Returns True if we have advanced past the end of data. More...
 
virtual Bool pastEnd ()
 
virtual void next ()
 Advance the row if possible (guaranteed harmless if pastEnd() is True. More...
 
virtual void setTime (Double time)
 interpolate to the desired time which must be >= the currentTime() This uses a linear interpolation between adjacent floating point values. More...
 
virtual const RecordcurrentRow () const
 Return the currentRow. More...
 
virtual RecordcurrentRow ()
 
Double currentTime () const
 What is the time of the current row? More...
 
Bool ok () const
 this is True if the last setTime() finished as expected It is False only if the requested time is before the current time and the timed table as just been opened More...
 
Double nextTime ()
 What will the time of the next row be? Returns a very large number if it is past the end of the table. More...
 
- Public Member Functions inherited from casacore::FITSTabular
virtual ~FITSTabular ()
 
virtual Bool reopen (const String &)
 Reopen the table, default behavior is to do nothing, return False. More...
 

Private Member Functions

void initNowRecord (const RecordDesc &desc)
 
void initNextRecord (const RecordDesc &desc)
 

Private Attributes

Bool atStart_p
 
Bool ok_p
 
Bool hasChanged_p
 
Bool changePending_p
 
FITSTabulartable_p
 
Recordrow_now_p
 
Recordrow_next_p
 
RORecordFieldPtr< Doubletime_now_p
 
RORecordFieldPtr< Doubletime_next_p
 
RecordDesc rowDesc_p
 
Int how_past_end_p
 
uInt timeColumn_p
 
TableRecord dummyKeywords
 
Record dummyUnits
 
Record dummyDisps
 
Record dummyNulls
 

Additional Inherited Members

- Static Public Member Functions inherited from casacore::FITSTabular
static TableRecord keywordsFromHDU (HeaderDataUnit &hdu, Bool allKeywords=False)
 Helper function for retrieving keywords from a native-FITS hdu. More...
 
static RecordDesc descriptionFromHDU (BinaryTableExtension &hdu)
 Helper function for retrieving a description from a native-FITS hdu. More...
 
static Record subStringShapeFromHDU (BinaryTableExtension &hdu)
 Help function for retrieving any shape information from String columns using the SubString convention. More...
 
static Record unitsFromHDU (BinaryTableExtension &hdu)
 Helper function for retrieving the TUNITnnn from a native-FITS hdu. More...
 
static Record displayFormatsFromHDU (BinaryTableExtension &hdu)
 Helper function for retrieving the TDISPnnn from a native-FITS hdu. More...
 
static Record nullsFromHDU (BinaryTableExtension &hdu)
 Helper function for retrieving the TNULLnnn from a native-FITS hdu. More...
 
static TableDesc tableDesc (const FITSTabular &fitstabular)
 Get a TableDesc appropriate to hold a FITSTabular the keywords, description, units, displayFormats, and nulls are all used. More...
 

Detailed Description

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

FITSTimedTable is used to look at FITS tables which have a time column. In particular, it peeks ahead, and knows the time of the currentRow and of the nextRow.

It is constructed with a pointer to any FITSTabular. Presently, no memory management is imposed to ensure that the pointer remains valid.

Example

Motivation

To Do

Definition at line 73 of file FITSTimedTable.h.

Constructor & Destructor Documentation

◆ FITSTimedTable() [1/2]

casacore::FITSTimedTable::FITSTimedTable ( )

This is not connected to any data, isValid always returns True, keywords and description return the default versions hasChanged returns False, name returns an empty string pastEnd returns False and next does nothing.

setTime does nothing, currentRow returns an empty record and currentTime returns 0.0 and ok returns True and nextTime returns 0.0

◆ FITSTimedTable() [2/2]

casacore::FITSTimedTable::FITSTimedTable ( FITSTabular originalTable,
uInt  whichColumnIsTime = 0 
)

Note, originalTable cannot be destructed, reopened,...,during the lifetime of this object.

◆ ~FITSTimedTable()

casacore::FITSTimedTable::~FITSTimedTable ( )

Member Function Documentation

◆ currentRow() [1/2]

virtual Record& casacore::FITSTimedTable::currentRow ( )
virtual

◆ currentRow() [2/2]

virtual const Record& casacore::FITSTimedTable::currentRow ( ) const
virtual

Return the currentRow.

This is guaranteed to be valid so long as only member functions of this base class are called (so you can safely attach RecordFieldPtr objects to it. The result is undefined if pastEnd() is True.

Implements casacore::FITSTabular.

◆ currentTime()

Double casacore::FITSTimedTable::currentTime ( ) const

What is the time of the current row?

◆ description()

virtual const RecordDesc& casacore::FITSTimedTable::description ( ) const
virtual

Returns the description of the underlying FITS table.

Implements casacore::FITSTabular.

◆ displayFormats()

virtual const Record& casacore::FITSTimedTable::displayFormats ( ) const
virtual

Returns any TDISPnnn associated with a column (the field names are the column names, each field value is the TDISPnnn value for that field).

Note that only those columns with a non-empty TDISPnnn have an entry in the displayFormats() Record.

Implements casacore::FITSTabular.

◆ hasChanged()

virtual Bool casacore::FITSTimedTable::hasChanged ( ) const
inlinevirtual

Has the description changed since construction, default is False.

Reimplemented from casacore::FITSTabular.

Definition at line 96 of file FITSTimedTable.h.

References hasChanged_p.

◆ initNextRecord()

void casacore::FITSTimedTable::initNextRecord ( const RecordDesc desc)
private

◆ initNowRecord()

void casacore::FITSTimedTable::initNowRecord ( const RecordDesc desc)
private

◆ isValid()

virtual Bool casacore::FITSTimedTable::isValid ( ) const
virtual

isValid() returns False if this object isn't a valid Tabular data structure.

Implements casacore::FITSTabular.

◆ keywords()

virtual const TableRecord& casacore::FITSTimedTable::keywords ( ) const
virtual

Returns keywords which are associated with the underlying FITS files.

Implements casacore::FITSTabular.

◆ name()

virtual const String& casacore::FITSTimedTable::name ( ) const
inlinevirtual

return the name

Implements casacore::FITSTabular.

Definition at line 98 of file FITSTimedTable.h.

References casacore::FITSTabular::name(), and table_p.

◆ next()

virtual void casacore::FITSTimedTable::next ( )
virtual

Advance the row if possible (guaranteed harmless if pastEnd() is True.

Implements casacore::FITSTabular.

◆ nextTime()

Double casacore::FITSTimedTable::nextTime ( )

What will the time of the next row be? Returns a very large number if it is past the end of the table.

◆ nulls()

virtual const Record& casacore::FITSTimedTable::nulls ( ) const
virtual

Returns any TNULLnnn associated with a column (the field names are the column names, each field value is the TNULLnnn value for that field).

Note that only those columns with a specific entry for TNULLnnn and which have not been promoted to doubles due TSCAL and TZERO values will have an entry in the nulls() Record. The meaning of TNULL is only defined for integer and byte columns. When a column is promoted to a double because of scaling, any TNULL values will be assigned a value of NaN.

Implements casacore::FITSTabular.

◆ ok()

Bool casacore::FITSTimedTable::ok ( ) const
inline

this is True if the last setTime() finished as expected It is False only if the requested time is before the current time and the timed table as just been opened

Definition at line 117 of file FITSTimedTable.h.

References ok_p.

◆ pastEnd() [1/2]

virtual Bool casacore::FITSTimedTable::pastEnd ( )
virtual

◆ pastEnd() [2/2]

virtual Bool casacore::FITSTimedTable::pastEnd ( ) const
virtual

Returns True if we have advanced past the end of data.

Implements casacore::FITSTabular.

◆ resetChangedFlag()

virtual void casacore::FITSTimedTable::resetChangedFlag ( )
inlinevirtual

reset the changed flag, default do nothing

Reimplemented from casacore::FITSTabular.

Definition at line 97 of file FITSTimedTable.h.

References casacore::False, and hasChanged_p.

◆ setTime()

virtual void casacore::FITSTimedTable::setTime ( Double  time)
virtual

interpolate to the desired time which must be >= the currentTime() This uses a linear interpolation between adjacent floating point values.

Non-floating point values are NOT interpolated but have the value of the most recent actual row. On the last row of the table, not interpolation is done.

◆ units()

virtual const Record& casacore::FITSTimedTable::units ( ) const
virtual

Returns any TUNITnnn associated with a column (the field names are the column names, each field value is the TUNITnnn value for that field).

Note that only those columns with a non-empty TUNITnnn have an entry in the units() Record.

Implements casacore::FITSTabular.

Member Data Documentation

◆ atStart_p

Bool casacore::FITSTimedTable::atStart_p
private

Definition at line 123 of file FITSTimedTable.h.

◆ changePending_p

Bool casacore::FITSTimedTable::changePending_p
private

Definition at line 126 of file FITSTimedTable.h.

◆ dummyDisps

Record casacore::FITSTimedTable::dummyDisps
private

Definition at line 137 of file FITSTimedTable.h.

◆ dummyKeywords

TableRecord casacore::FITSTimedTable::dummyKeywords
private

Definition at line 135 of file FITSTimedTable.h.

◆ dummyNulls

Record casacore::FITSTimedTable::dummyNulls
private

Definition at line 138 of file FITSTimedTable.h.

◆ dummyUnits

Record casacore::FITSTimedTable::dummyUnits
private

Definition at line 136 of file FITSTimedTable.h.

◆ hasChanged_p

Bool casacore::FITSTimedTable::hasChanged_p
private

Definition at line 125 of file FITSTimedTable.h.

Referenced by hasChanged(), and resetChangedFlag().

◆ how_past_end_p

Int casacore::FITSTimedTable::how_past_end_p
private

Definition at line 133 of file FITSTimedTable.h.

◆ ok_p

Bool casacore::FITSTimedTable::ok_p
private

Definition at line 124 of file FITSTimedTable.h.

Referenced by ok().

◆ row_next_p

Record* casacore::FITSTimedTable::row_next_p
private

Definition at line 129 of file FITSTimedTable.h.

◆ row_now_p

Record* casacore::FITSTimedTable::row_now_p
private

Definition at line 128 of file FITSTimedTable.h.

◆ rowDesc_p

RecordDesc casacore::FITSTimedTable::rowDesc_p
private

Definition at line 132 of file FITSTimedTable.h.

◆ table_p

FITSTabular* casacore::FITSTimedTable::table_p
private

Definition at line 127 of file FITSTimedTable.h.

Referenced by name().

◆ time_next_p

RORecordFieldPtr<Double> casacore::FITSTimedTable::time_next_p
private

Definition at line 131 of file FITSTimedTable.h.

◆ time_now_p

RORecordFieldPtr<Double> casacore::FITSTimedTable::time_now_p
private

Definition at line 130 of file FITSTimedTable.h.

◆ timeColumn_p

uInt casacore::FITSTimedTable::timeColumn_p
private

Definition at line 134 of file FITSTimedTable.h.


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