SDIterAxes.h

Classes

SDIterAxes -- (full description)

class SDIterAxes

Interface

Public Members
SDIterAxes(const Table& fitsTable)
~SDIterAxes()
IPosition shape(Int rownr) const
const Vector<String> &ctype(Int rownr)
const Vector<Double> &crval(Int rownr)
const Vector<Double> &crpix(Int rownr)
const Vector<Double> &cdelt(Int rownr)
const Vector<Double> &crota(Int rownr)
const Vector<String> &cunit(Int rownr)
Bool setctype(Int rownr, const Vector<String> &ctypes, Bool &added)
Bool setcrval(Int rownr, const Vector<Double> &crvals, Bool &added)
Bool setcrpix(Int rownr, const Vector<Double> &crpixs, Bool &added)
Bool setcdelt(Int rownr, const Vector<Double> &cdelts, Bool &added)
Bool setcrota(Int rownr, const Vector<Double> &crotas, Bool &added)
Bool setcunit(Int rownr, const Vector<String> &cunits, Bool &added)
Int freqAxis(Int rownr) const
Int longAxis(Int rownr) const
Int latAxis(Int rownr) const
Int timeAxis(Int rownr) const
Int stokesAxis(Int rownr) const
Int beamAxis(Int rownr) const
Int rcvrAxis(Int rownr) const
uInt maxaxes() const
const Vector<Int> &crvalTypes() const
const Vector<Int> &crpixTypes() const
const Vector<Int> &crotaTypes() const
const Vector<Int> &cdeltTypes() const
const Vector<String> &crvalColNames() const
const Vector<String> &crpixColNames() const
const Vector<String> &cdeltColNames() const
const Vector<String> &ctypeColNames() const
const Vector<String> &cunitColNames() const
MEpoch time(Int rownr)
Bool ok(Int rownr) const
void reset(const Table& fitsTable)
uInt nsdrecords(Int rownr) const
uInt nsdrecords() const
Private Members
void cleanup()
void doubleVector(Int rownr, Vector<Double> &result, const PtrBlock<ROTableColumn *> &colsPtr, Double defaultValue)
void stringVector(Int rownr, Vector<String> &result, const PtrBlock<ROTableColumn *> &colsPtr, String defaultValue)
void stringVector(Int rownr, Vector<String> &result, const PtrBlock<ROTableColumn *> &colsPtr, Vector<String> &defaultValues)
Bool setDoubleCols(Int rownr, const Vector<Double> &vals, const String &baseName, Vector<Int> &types, PtrBlock<ROTableColumn *> &rocolsPtr, PtrBlock<TableColumn *> &rwcolsPtr, Vector<String> &colNames, Bool &added, Double defaultValue)
Bool setStringCols(Int rownr, const Vector<String> &vals, const String &baseName, PtrBlock<ROTableColumn *> &rocolsPtr, PtrBlock<TableColumn *> &rwcolsPtr, Vector<String> &colNames, Bool &added, String defaultValue)
void setAxisCache(Int rownr) const
void axisCacheInit(Int rownr) const
void resize(Int naxes)
SDIterAxes()
SDIterAxes(const SDIterAxes &other)
SDIterAxes& operator=(const SDIterAxes &other)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

To Do

Member Description

SDIterAxes(const Table& fitsTable)

eventually this should be able to construct one from an SDIterator, I think, or possibly have it be a base class with one of these for the different types of input data (MS, SDFITS table, SDFITS file, etc) But for now, just do this for SDFITS table. Construct one from a table, which should be made via fits2table from an SDFITS file.

~SDIterAxes()

IPosition shape(Int rownr) const

return the shape of the indicated row number

const Vector<String> &ctype(Int rownr)
const Vector<Double> &crval(Int rownr)
const Vector<Double> &crpix(Int rownr)
const Vector<Double> &cdelt(Int rownr)
const Vector<Double> &crota(Int rownr)
const Vector<String> &cunit(Int rownr)

vectors of the various axis information at a given row these are only valid out to how ever many elements there are in shape for that row. They have a length equal to the maximum number of elements in shape for any rows in the input table.

Bool setctype(Int rownr, const Vector<String> &ctypes, Bool &added)
Bool setcrval(Int rownr, const Vector<Double> &crvals, Bool &added)
Bool setcrpix(Int rownr, const Vector<Double> &crpixs, Bool &added)
Bool setcdelt(Int rownr, const Vector<Double> &cdelts, Bool &added)
Bool setcrota(Int rownr, const Vector<Double> &crotas, Bool &added)
Bool setcunit(Int rownr, const Vector<String> &cunits, Bool &added)

Set the axis information

Int freqAxis(Int rownr) const
Int longAxis(Int rownr) const
Int latAxis(Int rownr) const
Int timeAxis(Int rownr) const
Int stokesAxis(Int rownr) const
Int beamAxis(Int rownr) const
Int rcvrAxis(Int rownr) const

identifies which axis corresponds to one of the known SDFITS types, the first three are required, the rest are not. If any axis is not present, a value of -1 is returned.

uInt maxaxes() const

max number of axes in this table, although if a set function gets more axes then there are available, the necessary columns will be added to the table

const Vector<Int> &crvalTypes() const
const Vector<Int> &crpixTypes() const
const Vector<Int> &crotaTypes() const
const Vector<Int> &cdeltTypes() const

return the true axis data type for the numerical axis information columns.

const Vector<String> &crvalColNames() const
const Vector<String> &crpixColNames() const
const Vector<String> &cdeltColNames() const
const Vector<String> &ctypeColNames() const
const Vector<String> &cunitColNames() const

return the axis column names for each type of column There are maxaxes() elements here. If any element is blank, there is no column for that axis and type.

MEpoch time(Int rownr)

The time for the given row number

Bool ok(Int rownr) const

check to see if this row looks ok. The only check at this point is to see that all of the required axes are present. This returns False if any are not present.

void reset(const Table& fitsTable)

reset this class to the indicated table - this may be the same table as before. This is necessary if the number of axes has changed in an output table. The constructor also uses this.

uInt nsdrecords(Int rownr) const

The number of SDRecords for a given row. An SDRecord can hold the freq axis plus the stokes axis

uInt nsdrecords() const

The number of SDRecords in this iterator (i.e. the sums from each row).

void cleanup()

clear things

void doubleVector(Int rownr, Vector<Double> &result, const PtrBlock<ROTableColumn *> &colsPtr, Double defaultValue)

void stringVector(Int rownr, Vector<String> &result, const PtrBlock<ROTableColumn *> &colsPtr, String defaultValue)

void stringVector(Int rownr, Vector<String> &result, const PtrBlock<ROTableColumn *> &colsPtr, Vector<String> &defaultValues)

Bool setDoubleCols(Int rownr, const Vector<Double> &vals, const String &baseName, Vector<Int> &types, PtrBlock<ROTableColumn *> &rocolsPtr, PtrBlock<TableColumn *> &rwcolsPtr, Vector<String> &colNames, Bool &added, Double defaultValue)

Bool setStringCols(Int rownr, const Vector<String> &vals, const String &baseName, PtrBlock<ROTableColumn *> &rocolsPtr, PtrBlock<TableColumn *> &rwcolsPtr, Vector<String> &colNames, Bool &added, String defaultValue)

void setAxisCache(Int rownr) const

void axisCacheInit(Int rownr) const

void resize(Int naxes)

SDIterAxes()

unavailable

SDIterAxes(const SDIterAxes &other)

SDIterAxes& operator=(const SDIterAxes &other)