Loading...
Searching...
No Matches
casacore::FITSTimedTable Class Reference
fits package (libcasa_fits) » FITS_module

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.
| FITSTimedTable (FITSTabular *originalTable, uInt whichColumnIsTime=0)
| Note, originalTable cannot be destructed, reopened,...,during the lifetime of this object.
| ~FITSTimedTable ()
virtual Bool | isValid () const
| isValid() returns False if this object isn't a valid Tabular data structure.
virtual const TableRecord & | keywords () const
| Returns keywords which are associated with the underlying FITS files.
virtual const RecordDesc & | description () const
| Returns the description of the underlying FITS table.
virtual const Record & | units () 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).
virtual const Record & | displayFormats () 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).
virtual const Record & | nulls () 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).
virtual Bool | hasChanged () const
| Has the description changed since construction, default is False.
virtual void | resetChangedFlag ()
| reset the changed flag, default do nothing
virtual const String & | name () const
| return the name
virtual Bool | pastEnd () const
| Returns True if we have advanced past the end of data.
virtual Bool | pastEnd ()
virtual void | next ()
| Advance the row if possible (guaranteed harmless if pastEnd() is True.
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.
virtual const Record & | currentRow () const
| Return the currentRow.
virtual Record & | currentRow ()
Double | currentTime () const
| What is the time of the current row?
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
Double | nextTime ()
| What will the time of the next row be?
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.

## 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
FITSTabular * | table_p
Record * | row_now_p
Record * | row_next_p
RORecordFieldPtr< Double > | time_now_p
RORecordFieldPtr< Double > | time_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.
static RecordDesc | descriptionFromHDU (BinaryTableExtension &hdu)
| Helper function for retrieving a description from a native-FITS hdu.
static Record | subStringShapeFromHDU (BinaryTableExtension &hdu)
| Help function for retrieving any shape information from String columns using the SubString convention.
static Record | unitsFromHDU (BinaryTableExtension &hdu)
| Helper function for retrieving the TUNITnnn from a native-FITS hdu.
static Record | displayFormatsFromHDU (BinaryTableExtension &hdu)
| Helper function for retrieving the TDISPnnn from a native-FITS hdu.
static Record | nullsFromHDU (BinaryTableExtension &hdu)
| Helper function for retrieving the TNULLnnn from a native-FITS hdu.
static TableDesc | tableDesc (const FITSTabular &fitstabular)
| Get a TableDesc appropriate to hold a FITSTabular the keywords, description, units, displayFormats, and nulls are all used.

## 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 70 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

References casacore::Record().

## 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.

References casacore::Record().

## 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.

References casacore::Record().

## hasChanged()

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

inline virtual

Has the description changed since construction, default is False.

Reimplemented from casacore::FITSTabular.

Definition at line 93 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

inline virtual

return the name

Implements casacore::FITSTabular.

Definition at line 95 of file FITSTimedTable.h.

References 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.

References casacore::Record().

## 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 114 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 | ( |  | ) |

inline virtual

reset the changed flag, default do nothing

Reimplemented from casacore::FITSTabular.

Definition at line 94 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.

References casacore::time().

## 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.

References casacore::Record().

## Member Data Documentation

## atStart_p

Bool casacore::FITSTimedTable::atStart_p

private

Definition at line 120 of file FITSTimedTable.h.

## changePending_p

Bool casacore::FITSTimedTable::changePending_p

private

Definition at line 123 of file FITSTimedTable.h.

## dummyDisps

Record casacore::FITSTimedTable::dummyDisps

private

Definition at line 134 of file FITSTimedTable.h.

## dummyKeywords

TableRecord casacore::FITSTimedTable::dummyKeywords

private

Definition at line 132 of file FITSTimedTable.h.

## dummyNulls

Record casacore::FITSTimedTable::dummyNulls

private

Definition at line 135 of file FITSTimedTable.h.

## dummyUnits

Record casacore::FITSTimedTable::dummyUnits

private

Definition at line 133 of file FITSTimedTable.h.

## hasChanged_p

Bool casacore::FITSTimedTable::hasChanged_p

private

Definition at line 122 of file FITSTimedTable.h.

Referenced by hasChanged(), and resetChangedFlag().

## how_past_end_p

Int casacore::FITSTimedTable::how_past_end_p

private

Definition at line 130 of file FITSTimedTable.h.

## ok_p

Bool casacore::FITSTimedTable::ok_p

private

Definition at line 121 of file FITSTimedTable.h.

Referenced by ok().

## row_next_p

Record* casacore::FITSTimedTable::row_next_p

private

Definition at line 126 of file FITSTimedTable.h.

## row_now_p

Record* casacore::FITSTimedTable::row_now_p

private

Definition at line 125 of file FITSTimedTable.h.

## rowDesc_p

RecordDesc casacore::FITSTimedTable::rowDesc_p

private

Definition at line 129 of file FITSTimedTable.h.

## table_p

FITSTabular* casacore::FITSTimedTable::table_p

private

Definition at line 124 of file FITSTimedTable.h.

Referenced by name().

## time_next_p

RORecordFieldPtr<Double> casacore::FITSTimedTable::time_next_p

private

Definition at line 128 of file FITSTimedTable.h.

## time_now_p

RORecordFieldPtr<Double> casacore::FITSTimedTable::time_now_p

private

Definition at line 127 of file FITSTimedTable.h.

## timeColumn_p

uInt casacore::FITSTimedTable::timeColumn_p

private

Definition at line 131 of file FITSTimedTable.h.

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

- fits/FITS/FITSTimedTable.h