#include <SDRecord.h>
Part of API
An SDRecord has a Record with a structure particularly suited for single dish data.
An SDRecord is a fixed format Record with the following structure: data TpRecord (fixed) desc TpRecord - things which describe the data chan_freq - Quantum<Vector<Double> > - chan_freq cell values refframe - String - frequency reference frame reffrequency - Double - frequence at value of reference pixel, same units as chan_freq chan_width - Double - channel width at reffrequency, for use in selection, same units as chan_freq restfrequency - Douuble - Hz corr_type - Vector<String> - Stokes values converted to string representation units - String - units of the arr array (the data units) arr (TpArrayFloat || TpArrayComplex)(nchan, nstokes) flag TpArrayBool (nchan, nstokes) when flag(i,j) == True arr(i,j) is bad and should not be used weight TpArrayFloat (nchan, nstokes) sigma TpArrayFloat (nchan, nstokes) header TpRecord (fixed) time - MEpoch as a MeasureHolder scan_number - TpInt source_name - TpString direction - MDirection as a MeasureHolder refdirection - MDirection as a MeasureHolder veldef - TpString - velocity definition (RADIO, OPTICAL, .\..) transition - TpString exposure - Double - seconds duration - DOuble - seconds observer - TpString project - TpString resolution - Double - channel resulution at reffrequency - Hz bandwidth - Double - total bandwidth - Hz tcal - TpArrayFloat(nstokes) - K trx - TpArrayFloat(nstokes) - K tsys - TpArrayFloat(nstokes) - K telescope - TpString telescope_position - MPosition as MeasureHolder pressure - hPa dewpoint - K tambient - K wind_dir - rad wind_speed - m/s azel - MDirection as MeasureHolder hist TpArrayString - the history of this SDRecord other - TpRecord - the contents of this depend on the data source if the source is a MeaurementSet, this record contains sub-records having the same names as the subtables found in the MeasurementSet. The contents of these records will be the appropriate single row from that subtable. Each record has an interp_method attribut which is a String that indicates how that row was filled from the Measurements. "direct" means that the row was directly indexed and no interpolation was necessary. "nearest" means that the nearest row in time and falling within the appropriate interval, as appropriate, was used. Other interpolation schemes are planned. In addition to the sub-table records, there will also be a "keys" record to hold the keys from the Main table. Non-standard subtables will be included here IF they have a TIME column and optionally an INTERVAL column or if they have an NS_KEYS keyword which indicates integer key columns. if the source is a table from an SDFITS binary table, any column/keyword not used should be added to an sdfits subrecord in the other record. if the source is an Image, any information not used in data and header should be added to an image subrecord in the other record
Anything with the above structure is a valid SDRecord It is intended to hold data originally from a MeasurementSet, a table constructed from an SDFITS table, or from an image cube and still be independent from these original data sources. As such, the data and header and intended to contain the most comonly used standard information about single dish data. Some data sources, most notably the MeasurementSet, will also typically duplicate some of the information found in the data and header records in the other records.
This class also provides convenient access to the required fields.
DISH works on individual rows of a MS and this structure helps that.
Definition at line 162 of file SDRecord.h.
Public Member Functions | |
| SDRecord (DataType dataType=TpFloat) | |
| The default SDRecord has the basic structure but indicates an empty data array, a default CoordinateSystem, empty header values and indexes. | |
| SDRecord (const SDRecord &other) | |
| SDRecords are generally constructed within an SDIterator Sets this to an empty SDRecord and raises the error flag if other is not valid. | |
| SDRecord (const Record &other) | |
| ~SDRecord () | |
| SDRecord & | operator= (const SDRecord &other) |
| const Record & | data () const |
| the data sub-record | |
| Record & | data () |
| const Record & | desc () const |
| the desc sub-record | |
| Record & | desc () |
| const Record & | header () const |
| the header record | |
| Record & | header () |
| const Array< String > & | hist () const |
| the history vector | |
| Array< String > & | hist () |
| const Record & | other () const |
| the other record | |
| Record & | other () |
| Bool | resize (const IPosition &newShape) |
| resize all standard array fields to be consistent with the new data shape | |
| const IPosition & | shape () const |
| return the current data shape | |
| Bool | isValid () const |
| verify that this SDRecord is still valid | |
| Bool | isConsistent (String &errmsg) const |
| verify that this SDRecord is consistent, a message describing the first failed inconsistency is return in errmsg when the return value is False. | |
| DataType | arrType () const |
| what type of a data array is this | |
| ostream & | show (ostream &os) const |
| used by ostream << operator | |
| const RORecordFieldPtr< Array< Float > > & | rotsys () const |
| These methods provide quick access to some fields. | |
| const RORecordFieldPtr< Double > & | roduration () const |
| const RORecordFieldPtr< Double > & | roexposure () const |
| const RORecordFieldPtr< Double > & | rorestfrequency () const |
| const RORecordFieldPtr< String > & | roveldef () const |
| const RORecordFieldPtr< String > & | rorefframe () const |
| const RORecordFieldPtr< Record > & | rochan_freq () const |
| const RORecordFieldPtr< Double > & | roreffrequency () const |
| const RORecordFieldPtr< Array< Bool > > & | roflag () const |
| const RORecordFieldPtr< Array< Float > > & | roweight () const |
| const RORecordFieldPtr< Array< Float > > & | rosigma () const |
| RecordFieldPtr< Array< Float > > & | tsys () |
| RecordFieldPtr< Double > & | duration () |
| RecordFieldPtr< Double > & | exposure () |
| RecordFieldPtr< Double > & | restfrequency () |
| RecordFieldPtr< String > & | veldef () |
| RecordFieldPtr< String > & | refframe () |
| RecordFieldPtr< Record > & | chan_freq () |
| RecordFieldPtr< Double > & | reffrequency () |
| RecordFieldPtr< Array< Bool > > & | flag () |
| RecordFieldPtr< Array< Float > > & | weight () |
| RecordFieldPtr< Array< Float > > & | sigma () |
| const RORecordFieldPtr< Array< Float > > & | rofarr () const |
| arr field when this contains Floats | |
| RecordFieldPtr< Array< Float > > & | farr () |
| const RORecordFieldPtr< Array< Complex > > & | rocarr () const |
| arr field when this contains Complex data | |
| RecordFieldPtr< Array< Complex > > & | carr () |
Static Public Member Functions | |
| static Bool | isValid (const Record &rec) |
| verify that a record is a valid SDRecord | |
| static RecordDesc | requiredDesc (DataType dataType) |
| return the minimum required description | |
| static ostream & | showRecord (ostream &os, const Record &rec) |
| this actually does the work, hierachically on each subrecord | |
Private Member Functions | |
| void | initPointers () |
| initialize the pointers | |
| void | defaultValues () |
| set the default values | |
| void | defaultMatValues () |
| set the default values for variable shaped matrices | |
| void | defaultVecValues () |
| set the default values for variable shaped vectors | |
| void | cacheShape () |
| get shape from the arr field | |
| void | clear () |
| function to set all fields to their default values by type | |
Static Private Member Functions | |
| static void | initStatics () |
| function to initialize itsBasicDesc and itsBasicComplexDesc | |
Private Attributes | |
| RecordFieldPtr< Record > | itsData |
| RecordFieldPtr< Record > | itsDesc |
| RecordFieldPtr< Record > | itsHeader |
| RecordFieldPtr< Record > | itsOther |
| RecordFieldPtr< Array< Bool > > | itsFlag |
| RecordFieldPtr< Array< Float > > | itsTsys |
| RecordFieldPtr< Array< Float > > | itsWeight |
| RecordFieldPtr< Array< Float > > | itsSigma |
| RecordFieldPtr< Array< Float > > | itsFarr |
| RecordFieldPtr< Array< Float > > | itsTcal |
| RecordFieldPtr< Array< Float > > | itsTrx |
| RecordFieldPtr< Array< Complex > > | itsCarr |
| RecordFieldPtr< Double > | itsTdur |
| RecordFieldPtr< Double > | itsTexp |
| RecordFieldPtr< Double > | itsFrest |
| RecordFieldPtr< Double > | itsFref |
| RecordFieldPtr< String > | itsVeldef |
| RecordFieldPtr< String > | itsRefFrame |
| RecordFieldPtr< Record > | itsChanFreq |
| RORecordFieldPtr< Array< Bool > > | itsROFlag |
| RORecordFieldPtr< Array< Float > > | itsROTsys |
| RORecordFieldPtr< Array< Float > > | itsROWeight |
| RORecordFieldPtr< Array< Float > > | itsROSigma |
| RORecordFieldPtr< Array< Float > > | itsROFarr |
| RORecordFieldPtr< Array< Complex > > | itsROCarr |
| RORecordFieldPtr< Double > | itsROTdur |
| RORecordFieldPtr< Double > | itsROTexp |
| RORecordFieldPtr< Double > | itsROFrest |
| RORecordFieldPtr< Double > | itsROFref |
| RORecordFieldPtr< String > | itsROVeldef |
| RORecordFieldPtr< String > | itsRORefFrame |
| RORecordFieldPtr< Record > | itsROChanFreq |
| RecordFieldPtr< Array< String > > | itsHist |
| RecordFieldPtr< Array< String > > | itsCorrType |
| IPosition | itsShape |
| cache the size | |
Static Private Attributes | |
| static RecordDesc | itsBasicDesc |
| static RecordDesc | itsBasicComplexDesc |
Friends | |
| ostream & | operator<< (ostream &os, const SDRecord &rec) |
| This is mostly useful during debugging. | |
| casa::SDRecord::SDRecord | ( | DataType | dataType = TpFloat |
) |
The default SDRecord has the basic structure but indicates an empty data array, a default CoordinateSystem, empty header values and indexes.
Primarily useful for assignments except within SDIterator which starts from this and constructs the full record. The type of an SDRecord can be either TpFloat or TpComplex. This determines the data type of the arr field and it must be set when the SDRecord is first constructed.
| casa::SDRecord::SDRecord | ( | const SDRecord & | other | ) |
SDRecords are generally constructed within an SDIterator Sets this to an empty SDRecord and raises the error flag if other is not valid.
The data type of this SDRecord will be the same as that of other
| casa::SDRecord::SDRecord | ( | const Record & | other | ) |
| casa::SDRecord::~SDRecord | ( | ) |
| const Record& casa::SDRecord::data | ( | ) | const [inline] |
the data sub-record
Definition at line 190 of file SDRecord.h.
References itsData.
Referenced by arrType(), casa::SDTableIterator::getData(), and casa::SDMSIterator::getData().
| Record& casa::SDRecord::data | ( | ) | [inline] |
| const Record& casa::SDRecord::desc | ( | ) | const [inline] |
| Record& casa::SDRecord::desc | ( | ) | [inline] |
| const Record& casa::SDRecord::header | ( | ) | const [inline] |
the header record
Definition at line 198 of file SDRecord.h.
References itsHeader.
Referenced by casa::SDTableIterator::getHeader(), and casa::SDMSIterator::getHeader().
| Record& casa::SDRecord::header | ( | ) | [inline] |
| const Array<String>& casa::SDRecord::hist | ( | ) | const [inline] |
| Array<String>& casa::SDRecord::hist | ( | ) | [inline] |
| const Record& casa::SDRecord::other | ( | ) | const [inline] |
the other record
Definition at line 206 of file SDRecord.h.
References itsOther.
Referenced by casa::SDTableIterator::getOther(), and casa::SDMSIterator::getOther().
| Record& casa::SDRecord::other | ( | ) | [inline] |
| Bool casa::SDRecord::resize | ( | const IPosition & | newShape | ) |
resize all standard array fields to be consistent with the new data shape
| const IPosition& casa::SDRecord::shape | ( | ) | const [inline] |
| Bool casa::SDRecord::isValid | ( | ) | const [inline] |
| Bool casa::SDRecord::isConsistent | ( | String & | errmsg | ) | const |
verify that this SDRecord is consistent, a message describing the first failed inconsistency is return in errmsg when the return value is False.
| DataType casa::SDRecord::arrType | ( | ) | const [inline] |
| const RORecordFieldPtr<Array<Float> >& casa::SDRecord::rotsys | ( | ) | const [inline] |
These methods provide quick access to some fields.
Definition at line 227 of file SDRecord.h.
References itsROTsys.
| const RORecordFieldPtr<Double>& casa::SDRecord::roduration | ( | ) | const [inline] |
| const RORecordFieldPtr<Double>& casa::SDRecord::roexposure | ( | ) | const [inline] |
| const RORecordFieldPtr<Double>& casa::SDRecord::rorestfrequency | ( | ) | const [inline] |
| const RORecordFieldPtr<String>& casa::SDRecord::roveldef | ( | ) | const [inline] |
| const RORecordFieldPtr<String>& casa::SDRecord::rorefframe | ( | ) | const [inline] |
| const RORecordFieldPtr<Record>& casa::SDRecord::rochan_freq | ( | ) | const [inline] |
| const RORecordFieldPtr<Double>& casa::SDRecord::roreffrequency | ( | ) | const [inline] |
| const RORecordFieldPtr<Array<Bool> >& casa::SDRecord::roflag | ( | ) | const [inline] |
| const RORecordFieldPtr<Array<Float> >& casa::SDRecord::roweight | ( | ) | const [inline] |
| const RORecordFieldPtr<Array<Float> >& casa::SDRecord::rosigma | ( | ) | const [inline] |
| RecordFieldPtr<Array<Float> >& casa::SDRecord::tsys | ( | ) | [inline] |
| RecordFieldPtr<Double>& casa::SDRecord::duration | ( | ) | [inline] |
| RecordFieldPtr<Double>& casa::SDRecord::exposure | ( | ) | [inline] |
| RecordFieldPtr<Double>& casa::SDRecord::restfrequency | ( | ) | [inline] |
| RecordFieldPtr<String>& casa::SDRecord::veldef | ( | ) | [inline] |
| RecordFieldPtr<String>& casa::SDRecord::refframe | ( | ) | [inline] |
| RecordFieldPtr<Record>& casa::SDRecord::chan_freq | ( | ) | [inline] |
| RecordFieldPtr<Double>& casa::SDRecord::reffrequency | ( | ) | [inline] |
| RecordFieldPtr<Array<Bool> >& casa::SDRecord::flag | ( | ) | [inline] |
| RecordFieldPtr<Array<Float> >& casa::SDRecord::weight | ( | ) | [inline] |
| RecordFieldPtr<Array<Float> >& casa::SDRecord::sigma | ( | ) | [inline] |
| const RORecordFieldPtr<Array<Float> >& casa::SDRecord::rofarr | ( | ) | const [inline] |
arr field when this contains Floats
Definition at line 255 of file SDRecord.h.
References itsROFarr.
| RecordFieldPtr<Array<Float> >& casa::SDRecord::farr | ( | ) | [inline] |
| const RORecordFieldPtr<Array<Complex> >& casa::SDRecord::rocarr | ( | ) | const [inline] |
arr field when this contains Complex data
Definition at line 258 of file SDRecord.h.
References itsROCarr.
| RecordFieldPtr<Array<Complex> >& casa::SDRecord::carr | ( | ) | [inline] |
| static Bool casa::SDRecord::isValid | ( | const Record & | rec | ) | [inline, static] |
verify that a record is a valid SDRecord
Definition at line 263 of file SDRecord.h.
References requiredDesc().
| static RecordDesc casa::SDRecord::requiredDesc | ( | DataType | dataType | ) | [static] |
| ostream & casa::SDRecord::show | ( | ostream & | os | ) | const [inline] |
used by ostream << operator
Definition at line 322 of file SDRecord.h.
References showRecord().
Referenced by casa::operator<<().
| static ostream& casa::SDRecord::showRecord | ( | ostream & | os, | |
| const Record & | rec | |||
| ) | [static] |
| static void casa::SDRecord::initStatics | ( | ) | [static, private] |
function to initialize itsBasicDesc and itsBasicComplexDesc
| void casa::SDRecord::initPointers | ( | ) | [private] |
initialize the pointers
| void casa::SDRecord::defaultValues | ( | ) | [private] |
set the default values
| void casa::SDRecord::defaultMatValues | ( | ) | [private] |
set the default values for variable shaped matrices
| void casa::SDRecord::defaultVecValues | ( | ) | [private] |
set the default values for variable shaped vectors
| void casa::SDRecord::cacheShape | ( | ) | [private] |
get shape from the arr field
| void casa::SDRecord::clear | ( | ) | [private] |
function to set all fields to their default values by type
| ostream& operator<< | ( | ostream & | os, | |
| const SDRecord & | rec | |||
| ) | [friend] |
RecordDesc casa::SDRecord::itsBasicDesc [static, private] |
Definition at line 277 of file SDRecord.h.
RecordDesc casa::SDRecord::itsBasicComplexDesc [static, private] |
Definition at line 278 of file SDRecord.h.
RecordFieldPtr<Record> casa::SDRecord::itsData [private] |
RecordFieldPtr<Record> casa::SDRecord::itsDesc [private] |
RecordFieldPtr<Record> casa::SDRecord::itsHeader [private] |
RecordFieldPtr<Record> casa::SDRecord::itsOther [private] |
RecordFieldPtr<Array<Bool> > casa::SDRecord::itsFlag [private] |
RecordFieldPtr<Array<Float> > casa::SDRecord::itsTsys [private] |
RecordFieldPtr<Array<Float> > casa::SDRecord::itsWeight [private] |
RecordFieldPtr<Array<Float> > casa::SDRecord::itsSigma [private] |
RecordFieldPtr<Array<Float> > casa::SDRecord::itsFarr [private] |
RecordFieldPtr<Array<Float> > casa::SDRecord::itsTcal [private] |
Definition at line 286 of file SDRecord.h.
RecordFieldPtr<Array<Float> > casa::SDRecord::itsTrx [private] |
Definition at line 286 of file SDRecord.h.
RecordFieldPtr<Array<Complex> > casa::SDRecord::itsCarr [private] |
RecordFieldPtr<Double> casa::SDRecord::itsTdur [private] |
RecordFieldPtr<Double> casa::SDRecord::itsTexp [private] |
RecordFieldPtr<Double> casa::SDRecord::itsFrest [private] |
RecordFieldPtr<Double> casa::SDRecord::itsFref [private] |
RecordFieldPtr<String> casa::SDRecord::itsVeldef [private] |
RecordFieldPtr<String> casa::SDRecord::itsRefFrame [private] |
RecordFieldPtr<Record> casa::SDRecord::itsChanFreq [private] |
RORecordFieldPtr<Array<Bool> > casa::SDRecord::itsROFlag [private] |
RORecordFieldPtr<Array<Float> > casa::SDRecord::itsROTsys [private] |
RORecordFieldPtr<Array<Float> > casa::SDRecord::itsROWeight [private] |
RORecordFieldPtr<Array<Float> > casa::SDRecord::itsROSigma [private] |
RORecordFieldPtr<Array<Float> > casa::SDRecord::itsROFarr [private] |
RORecordFieldPtr<Array<Complex> > casa::SDRecord::itsROCarr [private] |
RORecordFieldPtr<Double> casa::SDRecord::itsROTdur [private] |
RORecordFieldPtr<Double> casa::SDRecord::itsROTexp [private] |
RORecordFieldPtr<Double> casa::SDRecord::itsROFrest [private] |
RORecordFieldPtr<Double> casa::SDRecord::itsROFref [private] |
RORecordFieldPtr<String> casa::SDRecord::itsROVeldef [private] |
RORecordFieldPtr<String> casa::SDRecord::itsRORefFrame [private] |
RORecordFieldPtr<Record> casa::SDRecord::itsROChanFreq [private] |
RecordFieldPtr<Array<String> > casa::SDRecord::itsHist [private] |
RecordFieldPtr<Array<String> > casa::SDRecord::itsCorrType [private] |
Definition at line 299 of file SDRecord.h.
IPosition casa::SDRecord::itsShape [private] |
1.5.1