casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
casa::MSMetaDataOnDemand Class Reference

Class to interrogate an MS for metadata. Interrogation happens on demand and resulting metadata are stored if the cache has not exceeded the specified limit. More...

#include <MSMetaDataOnDemand.h>

Inheritance diagram for casa::MSMetaDataOnDemand:
casa::MSMetaData

List of all members.

Public Member Functions

 MSMetaDataOnDemand (const MeasurementSet *const &ms, const Float maxCacheSizeMB)
 construct an object which stores a pointer to the MS and queries the MS only as necessary.
virtual ~MSMetaDataOnDemand ()
uInt nStates ()
 number of unique states (number of rows from the STATE table)
std::set< IntgetScanNumbers ()
 get unique scan numbers
std::set< IntgetScansForState (const Int stateID)
std::set< StringgetIntentsForScan (const Int scan)
std::set< StringgetIntents ()
 get all intents, in no particular (nor guaranteed) order.
virtual std::set< uIntgetSpwsForIntent (const String &intent)
 get a set of spectral windows for which the specified intent applies.
uInt nSpw (Bool includewvr)
 get number of spectral windows
uInt nRows ()
 get the number of visibilities
uInt nRows (CorrelationType cType)
uInt nRows (CorrelationType cType, Int arrayID, Int observationID, Int scanNumber, Int fieldID)
uInt nRows (CorrelationType cType, Int fieldID)
std::set< StringgetIntentsForSpw (const uInt spw)
 get a set of intents corresponding to the specified spectral window
virtual std::set< StringgetIntentsForField (Int fieldID)
 get a set of intents corresponding to a specified field
uInt nFields ()
 get the number of fields.
std::set< uIntgetSpwsForField (const Int fieldID)
 get a set of spectral windows corresponding to the specified fieldID
std::set< uIntgetSpwsForField (const String &fieldName)
 get a set of spectral windows corresponding to the specified field name
std::set< IntgetFieldIDsForSpw (const uInt spw)
 get the set of field IDs corresponding to the specified spectral window.
std::set< StringgetFieldNamesForSpw (const uInt spw)
 get the set of field names corresponding to the specified spectral window.
uInt nScans ()
 get the number of scans in the dataset
uInt nObservations ()
 get the number of observations (from the OBSERVATIONS table) in the dataset
uInt nArrays ()
 get the number of arrays (from the ARRAY table) in the dataset
std::set< uIntgetSpwsForScan (const Int scan)
 get the set of spectral windows for the specified scan number.
std::set< IntgetScansForSpw (const uInt spw)
 get the set of scan numbers for the specified spectral window.
uInt nAntennas ()
 get the number of antennas in the ANTENNA table
vector< StringgetAntennaNames (std::map< String, uInt > &namesToIDsMap, const vector< uInt > &antennaIDs=vector< uInt >(0))
 get the name of the antenna for the specified antenna ID
vector< uIntgetAntennaIDs (const vector< String > &antennaNames)
 get the antenna ID for the antenna with the specified name.
std::set< uIntgetTDMSpw ()
 get set of spectral windows used for TDM.
std::set< uIntgetFDMSpw ()
 get set of spectral windows used for FDM.
std::set< uIntgetChannelAvgSpw ()
 get spectral windows that have been averaged.
std::set< uIntgetWVRSpw ()
 Get the spectral window set used for WVR measurements.
std::set< IntgetScansForTimes (const Double center, const Double tol)
 Get the scans which fail into the specified time range (center-tol to center+tol)
std::set< DoublegetTimesForScans (const std::set< Int > &scans)
 Get the times for the specified scans.
std::vector< DoublegetTimeRangeForScan (Int scan)
 get the time range for the specified scan.
std::set< IntgetStatesForScan (const Int scan)
 get the times for the specified scan std::set<Double> getTimesForScan(const uInt scan) const;
std::set< IntgetScansForIntent (const String &intent)
 get the scans associated with the specified intent
std::set< IntgetScansForFieldID (const Int fieldID)
 get the scan numbers associated with the specified field ID.
std::set< IntgetFieldIDsForField (const String &field)
 get the field IDs for the specified field name.
std::set< IntgetFieldsForScan (const Int scan)
 get field IDs associated with the specified scan number.
std::set< IntgetFieldsForScans (const std::set< Int > &scans)
 get the field IDs associated with the specified scans
std::set< IntgetFieldsForIntent (const String &intent)
 get the field IDs associated with the specified intent.
vector< StringgetFieldNamesForFieldIDs (const vector< Int > &fieldIDs)
 get the field names associated with the specified field IDs.
std::set< IntgetFieldsForTimes (Double center, Double tol)
 Get the fields which fail into the specified time range (center-tol to center+tol)
std::set< DoublegetTimesForField (Int fieldID)
 get the times for which the specified field was observed
vector< StringgetObservatoryNames ()
 get telescope names in the order they are listed in the OBSERVATION table.
MPosition getObservatoryPosition (uInt which)
 get the position of the specified telescope (observatory).
vector< MPositiongetAntennaPositions (const vector< uInt > &which=std::vector< uInt >(0))
 get the positions of the specified antennas.
vector< MPositiongetAntennaPositions (const vector< String > &names)
 names cannot be empty.
Quantum< Vector< Double > > getAntennaOffset (uInt which)
 get the position of the specified antenna relative to the observatory position.
Quantum< Vector< Double > > getAntennaOffset (const String &name)
vector< Quantum< Vector
< Double > > > 
getAntennaOffsets (const vector< MPosition > &positions=vector< MPosition >(0))
 if not empty, positions must contain the same number of elements as the number of antennas in the MS.
Matrix< BoolgetUniqueBaselines ()
 std::map<Double, Double> getExposuresForTimes() const;
Quantity getEffectiveTotalExposureTime ()
 get the effective total exposure time.
Double nUnflaggedRows ()
 get the number of unflagged rows
Double nUnflaggedRows (CorrelationType cType)
Double nUnflaggedRows (CorrelationType cType, Int arrayID, Int observationID, Int scanNumber, Int fieldID)
Double nUnflaggedRows (CorrelationType cType, Int fieldID)
Float getCache () const
vector< DoublegetBandWidths ()
vector< Quantum< Vector
< Double > > > 
getChanFreqs ()
vector< vector< Double > > getChanWidths ()
vector< IntgetNetSidebands ()
vector< QuantitygetMeanFreqs ()
vector< uIntnChans ()
vector< vector< Double > > getEdgeChans ()
vector< uIntgetBBCNos ()
vector< StringgetSpwNames ()
std::map< uInt, DoublegetAverageIntervalsForScan (Int scan)
 the returned map are the average intervals for each spectral window for the specified scan

Private Member Functions

 MSMetaDataOnDemand (const MSMetaDataOnDemand &)
 disallow copy constructor and = operator
MSMetaDataOnDemand operator= (const MSMetaDataOnDemand &)
void _setSpwInfo (const MeasurementSet &ms)
 This comment from thunter in the original ValueMapping python class

Determine the number of polarizations for the first OBSERVE_TARGET intent.


void _setObservation (const MeasurementSet &ms)
 set metadata from OBSERVATION table
Bool _hasIntent (const String &intent)
void _checkFieldID (const Int fieldID)
void _checkFieldIDs (const vector< Int > &fieldIDs)
void _checkStateID (const Int stateID)
vector< std::set< String > > _getSpwToIntentsMap ()
void _getAntennas (std::tr1::shared_ptr< Vector< Int > > &ant1, std::tr1::shared_ptr< Vector< Int > > &ant2)
std::tr1::shared_ptr< Vector
< Int > > 
_getScans ()
std::tr1::shared_ptr< Vector
< Int > > 
_getObservationIDs ()
std::tr1::shared_ptr< Vector
< Int > > 
_getArrayIDs ()
std::tr1::shared_ptr< Vector
< Int > > 
_getFieldIDs ()
std::tr1::shared_ptr< Vector
< Int > > 
_getStateIDs ()
std::tr1::shared_ptr< Vector
< Int > > 
_getDataDescIDs ()
std::tr1::shared_ptr< Vector
< Double > > 
_getTimes ()
std::tr1::shared_ptr
< ArrayColumn< Bool > > 
_getFlags ()
std::set< Int_getUniqueFiedIDs ()
std::map< Int, std::set< Int > > _getScanToStatesMap ()
Bool _cacheUpdated (const Float incrementInBytes)
void _getStateToIntentsMap (vector< std::set< String > > &statesToIntentsMap, std::set< String > &uniqueIntents)
vector< SpwProperties_getSpwInfo (std::set< uInt > &avgSpw, std::set< uInt > &tdmSpw, std::set< uInt > &fdmSpw, std::set< uInt > &wvrSpw)
void _getFieldsAndSpwMaps (std::map< Int, std::set< uInt > > &fieldToSpwMap, vector< std::set< Int > > &spwToFieldMap)
void _getScansAndSpwMaps (std::map< Int, std::set< uInt > > &scanToSpwMap, vector< std::set< Int > > &spwToScanMap)
void _getFieldsAndIntentsMaps (vector< std::set< String > > &fieldToIntentsMap, std::map< String, std::set< Int > > &intentToFieldsMap)
void _getScansAndIntentsMaps (std::map< Int, std::set< String > > &scanToIntentsMap, std::map< String, std::set< Int > > &intentToScansMap)
void _getFieldsAndScansMaps (std::map< Int, std::set< Int > > &fieldToScansMap, std::map< Int, std::set< Int > > &scanToFieldsMap)
void _getFieldsAndStatesMaps (std::map< Int, std::set< Int > > &fieldToStatesMap, std::map< Int, std::set< Int > > &stateToFieldsMap)
void _getFieldsAndTimesMaps (std::tr1::shared_ptr< std::map< Int, std::set< Double > > > &fieldToTimesMap, std::tr1::shared_ptr< std::map< Double, std::set< Int > > > &timesToFieldMap)
std::map< Int, uInt_getDataDescIDToSpwMap ()
vector< String_getFieldNames ()
std::tr1::shared_ptr< std::map
< Int, std::set< Double > > > 
_getScanToTimesMap ()
void _getRowStats (uInt &nACRows, uInt &nXCRows, std::tr1::shared_ptr< AOSFMapI > &scanToNACRowsMap, std::tr1::shared_ptr< AOSFMapI > &scanToNXCRowsMap, std::tr1::shared_ptr< std::map< Int, uInt > > &fieldToNACRowsMap, std::tr1::shared_ptr< std::map< Int, uInt > > &fieldToNXCRowsMap)
void _getUnflaggedRowStats (Double &nACRows, Double &nXCRows, std::tr1::shared_ptr< AOSFMapD > &scanToNACRowsMap, std::tr1::shared_ptr< AOSFMapD > &scanToNXCRowsMap, std::tr1::shared_ptr< std::map< Int, Double > > &fieldToNACRowsMap, std::tr1::shared_ptr< std::map< Int, Double > > &fieldToNXCRowsMap)
void _getTimesAndInvervals (std::map< Int, vector< Double > > &scanToTimeRangeMap, std::map< Int, std::map< uInt, Double > > &scanSpwToIntervalMap)

Static Private Member Functions

static void _checkScan (const Int scan, const std::set< Int > allScans)
 static vector<uInt> _toUIntVector(const Vector<Int>& v);
static uInt _sizeof (std::map< Int, std::set< uInt > > &map)
static uInt _sizeof (std::map< Int, std::set< Int > > &map)
static uInt _sizeof (vector< std::set< Int > > &v)
static uInt _sizeof (std::map< Int, std::set< String > > &m)
static uInt _sizeof (std::map< String, std::set< Int > > &m)
static uInt _sizeof (vector< std::set< String > > &m)
static uInt _sizeof (std::map< Int, std::set< Double > > &m)
static uInt _sizeof (std::map< Double, std::set< Int > > &m)

Private Attributes

const MeasurementSet_ms
Float _cacheMB
const Float _maxCacheMB
uInt _nStates
uInt _nACRows
uInt _nXCRows
uInt _nSpw
uInt _nFields
uInt _nAntennas
uInt _nObservations
uInt _nScans
uInt _nArrays
uInt _nrows
std::set< String_uniqueIntents
std::map< Int, std::set< uInt > > _scanToSpwsMap
std::set< Int_uniqueScanNumbers
std::set< Int_uniqueFieldIDs
std::set< Int_uniqueStateIDs
std::set< uInt_avgSpw
std::set< uInt_tdmSpw
std::set< uInt_fdmSpw
std::set< uInt_wvrSpw
std::tr1::shared_ptr< Vector
< Int > > 
_antenna1
std::tr1::shared_ptr< Vector
< Int > > 
_antenna2
std::tr1::shared_ptr< Vector
< Int > > 
_scans
std::tr1::shared_ptr< Vector
< Int > > 
_fieldIDs
std::tr1::shared_ptr< Vector
< Int > > 
_stateIDs
std::tr1::shared_ptr< Vector
< Int > > 
_dataDescIDs
std::tr1::shared_ptr< Vector
< Int > > 
_observationIDs
std::tr1::shared_ptr< Vector
< Int > > 
_arrayIDs
std::tr1::shared_ptr< AOSFMapI_scanToNACRowsMap
std::tr1::shared_ptr< AOSFMapI_scanToNXCRowsMap
std::tr1::shared_ptr< std::map
< Int, uInt > > 
_fieldToNACRowsMap
std::tr1::shared_ptr< std::map
< Int, uInt > > 
_fieldToNXCRowsMap
std::map< Int, uInt_dataDescIDToSpwMap
std::map< Int, std::set< String > > _scanToIntentsMap
vector< std::set< String > > _stateToIntentsMap
vector< std::set< String > > _spwToIntentsMap
vector< std::set< String > > _fieldToIntentsMap
vector< SpwProperties_spwInfo
std::map< Int, std::set< uInt > > _fieldToSpwMap
vector< std::set< Int > > _spwToFieldIDsMap
vector< std::set< Int > > _spwToScansMap
std::map< Int, std::set< Int > > _scanToStatesMap
std::map< Int, std::set< Int > > _scanToFieldsMap
std::map< Int, std::set< Int > > _fieldToScansMap
std::map< Int, std::set< Int > > _fieldToStatesMap
std::map< Int, std::set< Int > > _stateToFieldsMap
vector< String_fieldNames
vector< String_antennaNames
vector< String_observatoryNames
std::map< String, uInt_antennaNameToIDMap
std::tr1::shared_ptr< Vector
< Double > > 
_times
std::tr1::shared_ptr< std::map
< Int, std::set< Double > > > 
_scanToTimesMap
std::map< String, std::set< Int > > _intentToFieldIDMap
std::map< String, std::set< Int > > _intentToScansMap
std::tr1::shared_ptr< std::map
< Int, std::set< Double > > > 
_fieldToTimesMap
std::tr1::shared_ptr< std::map
< Double, std::set< Int > > > 
_timeToFieldsMap
vector< MPosition_observatoryPositions
vector< MPosition_antennaPositions
vector< Quantum< Vector
< Double > > > 
_antennaOffsets
Matrix< Bool_uniqueBaselines
Quantity _exposureTime
Double _nUnflaggedACRows
Double _nUnflaggedXCRows
std::tr1::shared_ptr< std::map
< Int, Double > > 
_unflaggedFieldNACRows
std::tr1::shared_ptr< std::map
< Int, Double > > 
_unflaggedFieldNXCRows
std::tr1::shared_ptr< AOSFMapD_unflaggedScanNACRows
std::tr1::shared_ptr< AOSFMapD_unflaggedScanNXCRows
const String _taqlTableName
const vector< const Table * > _taqlTempTable
std::tr1::shared_ptr
< ArrayColumn< Bool > > 
_flagsColumn
std::map< Int, vector< Double > > _scanToTimeRangeMap
std::map< Int, std::map< uInt,
Double > > 
_scanSpwToIntervalMap

Detailed Description

Class to interrogate an MS for metadata. Interrogation happens on demand and resulting metadata are stored if the cache has not exceeded the specified limit.

Definition at line 45 of file MSMetaDataOnDemand.h.


Constructor & Destructor Documentation

casa::MSMetaDataOnDemand::MSMetaDataOnDemand ( const MeasurementSet *const &  ms,
const Float  maxCacheSizeMB 
)

construct an object which stores a pointer to the MS and queries the MS only as necessary.

The MeasurementSet pointer passed in should not go out of scope in the calling code until the caller has finished with this object, or else subsequent method calls on this object will result in a segmentation fault; the pointer is not copied. maxCacheSizeMB is the maximum cache size in megabytes. <=0 means do not use a cache.

disallow copy constructor and = operator


Member Function Documentation

Bool casa::MSMetaDataOnDemand::_cacheUpdated ( const Float  incrementInBytes) [private]
void casa::MSMetaDataOnDemand::_checkFieldID ( const Int  fieldID) [private]
void casa::MSMetaDataOnDemand::_checkFieldIDs ( const vector< Int > &  fieldIDs) [private]
static void casa::MSMetaDataOnDemand::_checkScan ( const Int  scan,
const std::set< Int allScans 
) [static, private]

static vector<uInt> _toUIntVector(const Vector<Int>& v);

void casa::MSMetaDataOnDemand::_checkStateID ( const Int  stateID) [private]
void casa::MSMetaDataOnDemand::_getAntennas ( std::tr1::shared_ptr< Vector< Int > > &  ant1,
std::tr1::shared_ptr< Vector< Int > > &  ant2 
) [private]
std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_getArrayIDs ( ) [private]
std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_getDataDescIDs ( ) [private]
std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_getFieldIDs ( ) [private]
void casa::MSMetaDataOnDemand::_getFieldsAndIntentsMaps ( vector< std::set< String > > &  fieldToIntentsMap,
std::map< String, std::set< Int > > &  intentToFieldsMap 
) [private]
void casa::MSMetaDataOnDemand::_getFieldsAndScansMaps ( std::map< Int, std::set< Int > > &  fieldToScansMap,
std::map< Int, std::set< Int > > &  scanToFieldsMap 
) [private]
void casa::MSMetaDataOnDemand::_getFieldsAndSpwMaps ( std::map< Int, std::set< uInt > > &  fieldToSpwMap,
vector< std::set< Int > > &  spwToFieldMap 
) [private]
void casa::MSMetaDataOnDemand::_getFieldsAndStatesMaps ( std::map< Int, std::set< Int > > &  fieldToStatesMap,
std::map< Int, std::set< Int > > &  stateToFieldsMap 
) [private]
void casa::MSMetaDataOnDemand::_getFieldsAndTimesMaps ( std::tr1::shared_ptr< std::map< Int, std::set< Double > > > &  fieldToTimesMap,
std::tr1::shared_ptr< std::map< Double, std::set< Int > > > &  timesToFieldMap 
) [private]
std::tr1::shared_ptr<ArrayColumn<Bool> > casa::MSMetaDataOnDemand::_getFlags ( ) [private]
std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_getObservationIDs ( ) [private]
void casa::MSMetaDataOnDemand::_getRowStats ( uInt nACRows,
uInt nXCRows,
std::tr1::shared_ptr< AOSFMapI > &  scanToNACRowsMap,
std::tr1::shared_ptr< AOSFMapI > &  scanToNXCRowsMap,
std::tr1::shared_ptr< std::map< Int, uInt > > &  fieldToNACRowsMap,
std::tr1::shared_ptr< std::map< Int, uInt > > &  fieldToNXCRowsMap 
) [private]
std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_getScans ( ) [private]
void casa::MSMetaDataOnDemand::_getScansAndIntentsMaps ( std::map< Int, std::set< String > > &  scanToIntentsMap,
std::map< String, std::set< Int > > &  intentToScansMap 
) [private]
void casa::MSMetaDataOnDemand::_getScansAndSpwMaps ( std::map< Int, std::set< uInt > > &  scanToSpwMap,
vector< std::set< Int > > &  spwToScanMap 
) [private]
std::map<Int, std::set<Int> > casa::MSMetaDataOnDemand::_getScanToStatesMap ( ) [private]
std::tr1::shared_ptr<std::map<Int, std::set<Double> > > casa::MSMetaDataOnDemand::_getScanToTimesMap ( ) [private]
vector<SpwProperties> casa::MSMetaDataOnDemand::_getSpwInfo ( std::set< uInt > &  avgSpw,
std::set< uInt > &  tdmSpw,
std::set< uInt > &  fdmSpw,
std::set< uInt > &  wvrSpw 
) [private]
vector<std::set<String> > casa::MSMetaDataOnDemand::_getSpwToIntentsMap ( ) [private]
std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_getStateIDs ( ) [private]
void casa::MSMetaDataOnDemand::_getStateToIntentsMap ( vector< std::set< String > > &  statesToIntentsMap,
std::set< String > &  uniqueIntents 
) [private]
std::tr1::shared_ptr<Vector<Double> > casa::MSMetaDataOnDemand::_getTimes ( ) [private]
void casa::MSMetaDataOnDemand::_getTimesAndInvervals ( std::map< Int, vector< Double > > &  scanToTimeRangeMap,
std::map< Int, std::map< uInt, Double > > &  scanSpwToIntervalMap 
) [private]
void casa::MSMetaDataOnDemand::_getUnflaggedRowStats ( Double nACRows,
Double nXCRows,
std::tr1::shared_ptr< AOSFMapD > &  scanToNACRowsMap,
std::tr1::shared_ptr< AOSFMapD > &  scanToNXCRowsMap,
std::tr1::shared_ptr< std::map< Int, Double > > &  fieldToNACRowsMap,
std::tr1::shared_ptr< std::map< Int, Double > > &  fieldToNXCRowsMap 
) [private]
Bool casa::MSMetaDataOnDemand::_hasIntent ( const String intent) [private]

set metadata from OBSERVATION table

Reimplemented from casa::MSMetaData.

void casa::MSMetaDataOnDemand::_setSpwInfo ( const MeasurementSet ms) [private]

This comment from thunter in the original ValueMapping python class

Determine the number of polarizations for the first OBSERVE_TARGET intent.

Used by plotbandpass for BPOLY plots since the number of pols cannot be inferred

correctly from the caltable alone. You cannot not simply use the first row, because

it may be a pointing scan which may have different number of polarizations than what

the TARGET and BANDPASS calibrator will have.

-- T. Hunter

uInt _getNumberOfPolarizations();

static uInt casa::MSMetaDataOnDemand::_sizeof ( std::map< Int, std::set< uInt > > &  map) [static, private]
static uInt casa::MSMetaDataOnDemand::_sizeof ( std::map< Int, std::set< Int > > &  map) [static, private]
static uInt casa::MSMetaDataOnDemand::_sizeof ( vector< std::set< Int > > &  v) [static, private]
static uInt casa::MSMetaDataOnDemand::_sizeof ( std::map< Int, std::set< String > > &  m) [static, private]
static uInt casa::MSMetaDataOnDemand::_sizeof ( std::map< String, std::set< Int > > &  m) [static, private]
static uInt casa::MSMetaDataOnDemand::_sizeof ( vector< std::set< String > > &  m) [static, private]
static uInt casa::MSMetaDataOnDemand::_sizeof ( std::map< Int, std::set< Double > > &  m) [static, private]
static uInt casa::MSMetaDataOnDemand::_sizeof ( std::map< Double, std::set< Int > > &  m) [static, private]
vector<uInt> casa::MSMetaDataOnDemand::getAntennaIDs ( const vector< String > &  antennaNames) [virtual]

get the antenna ID for the antenna with the specified name.

Implements casa::MSMetaData.

vector<String> casa::MSMetaDataOnDemand::getAntennaNames ( std::map< String, uInt > &  namesToIDsMap,
const vector< uInt > &  antennaIDs = vector< uInt >(0) 
) [virtual]

get the name of the antenna for the specified antenna ID

Implements casa::MSMetaData.

get the position of the specified antenna relative to the observatory position.

the three vector returned represents the longitudinal, latitudinal, and elevation offsets (elements 0, 1, and 2 respectively). The longitude and latitude offsets are measured along the surface of a sphere centered at the earth's center and whose surface intersects the position of the observatory.

Implements casa::MSMetaData.

Implements casa::MSMetaData.

vector<Quantum<Vector<Double> > > casa::MSMetaDataOnDemand::getAntennaOffsets ( const vector< MPosition > &  positions = vector< MPosition >(0)) [virtual]

if not empty, positions must contain the same number of elements as the number of antennas in the MS.

These will be used instead of also retrieving the antenna positions from the MS.

Implements casa::MSMetaData.

vector<MPosition> casa::MSMetaDataOnDemand::getAntennaPositions ( const vector< uInt > &  which = std::vector< uInt >(0)) [virtual]

get the positions of the specified antennas.

If which is empty, return all antenna positions.

Implements casa::MSMetaData.

vector<MPosition> casa::MSMetaDataOnDemand::getAntennaPositions ( const vector< String > &  names) [virtual]

names cannot be empty.

Implements casa::MSMetaData.

the returned map are the average intervals for each spectral window for the specified scan

Implements casa::MSMetaData.

Implements casa::MSMetaData.

Implements casa::MSMetaData.

Float casa::MSMetaDataOnDemand::getCache ( ) const [inline, virtual]

Reimplemented from casa::MSMetaData.

Definition at line 254 of file MSMetaDataOnDemand.h.

References _cacheMB.

Implements casa::MSMetaData.

get spectral windows that have been averaged.

These are windows with 1 channel.

Implements casa::MSMetaData.

vector<vector<Double> > casa::MSMetaDataOnDemand::getChanWidths ( ) [virtual]

Implements casa::MSMetaData.

vector<vector<Double> > casa::MSMetaDataOnDemand::getEdgeChans ( ) [virtual]

Implements casa::MSMetaData.

get the effective total exposure time.

This is the effective time spent collecting unflagged data.

Implements casa::MSMetaData.

std::set<uInt> casa::MSMetaDataOnDemand::getFDMSpw ( ) [virtual]

get set of spectral windows used for FDM.

These are windows that do not have 1, 4, 64, 128, or 256 channels.

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getFieldIDsForField ( const String field) [virtual]

get the field IDs for the specified field name.

Case insensitive.

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getFieldIDsForSpw ( const uInt  spw) [virtual]

get the set of field IDs corresponding to the specified spectral window.

Implements casa::MSMetaData.

vector<String> casa::MSMetaDataOnDemand::getFieldNamesForFieldIDs ( const vector< Int > &  fieldIDs) [virtual]

get the field names associated with the specified field IDs.

If fieldIDs is empty, a vector of all the field names is returned.

Implements casa::MSMetaData.

std::set<String> casa::MSMetaDataOnDemand::getFieldNamesForSpw ( const uInt  spw) [virtual]

get the set of field names corresponding to the specified spectral window.

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getFieldsForIntent ( const String intent) [virtual]

get the field IDs associated with the specified intent.

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getFieldsForScan ( const Int  scan) [virtual]

get field IDs associated with the specified scan number.

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getFieldsForScans ( const std::set< Int > &  scans) [virtual]

get the field IDs associated with the specified scans

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getFieldsForTimes ( Double  center,
Double  tol 
) [virtual]

Get the fields which fail into the specified time range (center-tol to center+tol)

Implements casa::MSMetaData.

get all intents, in no particular (nor guaranteed) order.

Implements casa::MSMetaData.

virtual std::set<String> casa::MSMetaDataOnDemand::getIntentsForField ( Int  fieldID) [virtual]

get a set of intents corresponding to a specified field

Implements casa::MSMetaData.

std::set<String> casa::MSMetaDataOnDemand::getIntentsForScan ( const Int  scan) [virtual]

Implements casa::MSMetaData.

std::set<String> casa::MSMetaDataOnDemand::getIntentsForSpw ( const uInt  spw) [virtual]

get a set of intents corresponding to the specified spectral window

Implements casa::MSMetaData.

Implements casa::MSMetaData.

Implements casa::MSMetaData.

get telescope names in the order they are listed in the OBSERVATION table.

These are the telescopes (observatories), not the antenna names.

Implements casa::MSMetaData.

get the position of the specified telescope (observatory).

Implements casa::MSMetaData.

get unique scan numbers

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getScansForFieldID ( const Int  fieldID) [virtual]

get the scan numbers associated with the specified field ID.

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getScansForIntent ( const String intent) [virtual]

get the scans associated with the specified intent

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getScansForSpw ( const uInt  spw) [virtual]

get the set of scan numbers for the specified spectral window.

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getScansForState ( const Int  stateID) [virtual]

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getScansForTimes ( const Double  center,
const Double  tol 
) [virtual]

Get the scans which fail into the specified time range (center-tol to center+tol)

Implements casa::MSMetaData.

Implements casa::MSMetaData.

std::set<uInt> casa::MSMetaDataOnDemand::getSpwsForField ( const Int  fieldID) [virtual]

get a set of spectral windows corresponding to the specified fieldID

Implements casa::MSMetaData.

std::set<uInt> casa::MSMetaDataOnDemand::getSpwsForField ( const String fieldName) [virtual]

get a set of spectral windows corresponding to the specified field name

Implements casa::MSMetaData.

virtual std::set<uInt> casa::MSMetaDataOnDemand::getSpwsForIntent ( const String intent) [virtual]

get a set of spectral windows for which the specified intent applies.

Implements casa::MSMetaData.

std::set<uInt> casa::MSMetaDataOnDemand::getSpwsForScan ( const Int  scan) [virtual]

get the set of spectral windows for the specified scan number.

Implements casa::MSMetaData.

std::set<Int> casa::MSMetaDataOnDemand::getStatesForScan ( const Int  scan) [virtual]

get the times for the specified scan std::set<Double> getTimesForScan(const uInt scan) const;

get the stateIDs associated with the specified scan number.

Implements casa::MSMetaData.

std::set<uInt> casa::MSMetaDataOnDemand::getTDMSpw ( ) [virtual]

get set of spectral windows used for TDM.

These are windows that have 64, 128, or 256 channels

Implements casa::MSMetaData.

std::vector<Double> casa::MSMetaDataOnDemand::getTimeRangeForScan ( Int  scan) [virtual]

get the time range for the specified scan.

The vector returned will contain two elements, the start and stop time of the scan, determined from min(TIME_CENTROID(x)-0.5*INTERVAL(x)) and max(TIME_CENTROID(x)-0.5*INTERVAL(x))

Implements casa::MSMetaData.

std::set<Double> casa::MSMetaDataOnDemand::getTimesForField ( Int  fieldID) [virtual]

get the times for which the specified field was observed

Implements casa::MSMetaData.

std::set<Double> casa::MSMetaDataOnDemand::getTimesForScans ( const std::set< Int > &  scans) [virtual]

Get the times for the specified scans.

Implements casa::MSMetaData.

std::map<Double, Double> getExposuresForTimes() const;

get the unique baselines in the MS. These are not necessarily every combination of the n(n-1)/2 possible antenna pairs, but rather the number of unique baselines represented in the main MS table, which in theory can be less than n(n-1)/2 (for example if samples for certain antenna pairs are not recorded. The returned Matrix is nAnts x nAnts in size. Pairs that are true represent baselines represented in the main MS table.

Implements casa::MSMetaData.

std::set<uInt> casa::MSMetaDataOnDemand::getWVRSpw ( ) [virtual]

Get the spectral window set used for WVR measurements.

These have 4 channels each.

Implements casa::MSMetaData.

get the number of antennas in the ANTENNA table

Implements casa::MSMetaData.

get the number of arrays (from the ARRAY table) in the dataset

Implements casa::MSMetaData.

vector<uInt> casa::MSMetaDataOnDemand::nChans ( ) [virtual]

Implements casa::MSMetaData.

get the number of fields.

Implements casa::MSMetaData.

get the number of observations (from the OBSERVATIONS table) in the dataset

Implements casa::MSMetaData.

get the number of visibilities

Implements casa::MSMetaData.

Implements casa::MSMetaData.

uInt casa::MSMetaDataOnDemand::nRows ( CorrelationType  cType,
Int  arrayID,
Int  observationID,
Int  scanNumber,
Int  fieldID 
) [virtual]

Implements casa::MSMetaData.

uInt casa::MSMetaDataOnDemand::nRows ( CorrelationType  cType,
Int  fieldID 
) [virtual]

Implements casa::MSMetaData.

get the number of scans in the dataset

Implements casa::MSMetaData.

uInt casa::MSMetaDataOnDemand::nSpw ( Bool  includewvr) [virtual]

get number of spectral windows

Implements casa::MSMetaData.

number of unique states (number of rows from the STATE table)

Implements casa::MSMetaData.

get the number of unflagged rows

Implements casa::MSMetaData.

Implements casa::MSMetaData.

Double casa::MSMetaDataOnDemand::nUnflaggedRows ( CorrelationType  cType,
Int  arrayID,
Int  observationID,
Int  scanNumber,
Int  fieldID 
) [virtual]

Implements casa::MSMetaData.

Implements casa::MSMetaData.

MSMetaDataOnDemand casa::MSMetaDataOnDemand::operator= ( const MSMetaDataOnDemand ) [private]

Member Data Documentation

std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_antenna1 [private]

Definition at line 287 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_antenna2 [private]

Definition at line 287 of file MSMetaDataOnDemand.h.

Definition at line 299 of file MSMetaDataOnDemand.h.

Definition at line 300 of file MSMetaDataOnDemand.h.

Definition at line 308 of file MSMetaDataOnDemand.h.

Definition at line 307 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_arrayIDs [private]

Definition at line 287 of file MSMetaDataOnDemand.h.

Definition at line 286 of file MSMetaDataOnDemand.h.

Definition at line 279 of file MSMetaDataOnDemand.h.

Referenced by getCache().

std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_dataDescIDs [private]

Definition at line 287 of file MSMetaDataOnDemand.h.

Definition at line 291 of file MSMetaDataOnDemand.h.

Definition at line 310 of file MSMetaDataOnDemand.h.

Definition at line 286 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_fieldIDs [private]

Definition at line 287 of file MSMetaDataOnDemand.h.

Definition at line 299 of file MSMetaDataOnDemand.h.

Definition at line 293 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<std::map<Int, uInt> > casa::MSMetaDataOnDemand::_fieldToNACRowsMap [private]

Definition at line 290 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<std::map<Int, uInt> > casa::MSMetaDataOnDemand::_fieldToNXCRowsMap [private]

Definition at line 290 of file MSMetaDataOnDemand.h.

std::map<Int, std::set<Int> > casa::MSMetaDataOnDemand::_fieldToScansMap [private]

Definition at line 297 of file MSMetaDataOnDemand.h.

std::map<Int, std::set<uInt> > casa::MSMetaDataOnDemand::_fieldToSpwMap [private]

Definition at line 295 of file MSMetaDataOnDemand.h.

std::map<Int, std::set<Int> > casa::MSMetaDataOnDemand::_fieldToStatesMap [private]

Definition at line 297 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<std::map<Int, std::set<Double> > > casa::MSMetaDataOnDemand::_fieldToTimesMap [private]

Definition at line 304 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<ArrayColumn<Bool> > casa::MSMetaDataOnDemand::_flagsColumn [private]

Definition at line 316 of file MSMetaDataOnDemand.h.

std::map<String, std::set<Int> > casa::MSMetaDataOnDemand::_intentToFieldIDMap [private]

Definition at line 303 of file MSMetaDataOnDemand.h.

std::map<String, std::set<Int> > casa::MSMetaDataOnDemand::_intentToScansMap [private]

Definition at line 303 of file MSMetaDataOnDemand.h.

Definition at line 280 of file MSMetaDataOnDemand.h.

Definition at line 278 of file MSMetaDataOnDemand.h.

Definition at line 281 of file MSMetaDataOnDemand.h.

Definition at line 281 of file MSMetaDataOnDemand.h.

Definition at line 281 of file MSMetaDataOnDemand.h.

Definition at line 281 of file MSMetaDataOnDemand.h.

Definition at line 281 of file MSMetaDataOnDemand.h.

Definition at line 281 of file MSMetaDataOnDemand.h.

Definition at line 281 of file MSMetaDataOnDemand.h.

Definition at line 281 of file MSMetaDataOnDemand.h.

Definition at line 281 of file MSMetaDataOnDemand.h.

Definition at line 311 of file MSMetaDataOnDemand.h.

Definition at line 311 of file MSMetaDataOnDemand.h.

Definition at line 281 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_observationIDs [private]

Definition at line 287 of file MSMetaDataOnDemand.h.

Definition at line 299 of file MSMetaDataOnDemand.h.

Definition at line 307 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_scans [private]

Definition at line 287 of file MSMetaDataOnDemand.h.

Definition at line 318 of file MSMetaDataOnDemand.h.

std::map<Int, std::set<Int> > casa::MSMetaDataOnDemand::_scanToFieldsMap [private]

Definition at line 297 of file MSMetaDataOnDemand.h.

std::map<Int, std::set<String> > casa::MSMetaDataOnDemand::_scanToIntentsMap [private]

Definition at line 292 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<AOSFMapI> casa::MSMetaDataOnDemand::_scanToNACRowsMap [private]

Definition at line 289 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<AOSFMapI> casa::MSMetaDataOnDemand::_scanToNXCRowsMap [private]

Definition at line 289 of file MSMetaDataOnDemand.h.

std::map<Int, std::set<uInt> > casa::MSMetaDataOnDemand::_scanToSpwsMap [private]

Definition at line 284 of file MSMetaDataOnDemand.h.

std::map<Int, std::set<Int> > casa::MSMetaDataOnDemand::_scanToStatesMap [private]

Definition at line 297 of file MSMetaDataOnDemand.h.

Definition at line 317 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<std::map<Int, std::set<Double> > > casa::MSMetaDataOnDemand::_scanToTimesMap [private]

Definition at line 302 of file MSMetaDataOnDemand.h.

Definition at line 294 of file MSMetaDataOnDemand.h.

vector<std::set<Int> > casa::MSMetaDataOnDemand::_spwToFieldIDsMap [private]

Definition at line 296 of file MSMetaDataOnDemand.h.

vector<std::set<String> > casa::MSMetaDataOnDemand::_spwToIntentsMap [private]

Definition at line 293 of file MSMetaDataOnDemand.h.

vector<std::set<Int> > casa::MSMetaDataOnDemand::_spwToScansMap [private]

Definition at line 296 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<Vector<Int> > casa::MSMetaDataOnDemand::_stateIDs [private]

Definition at line 287 of file MSMetaDataOnDemand.h.

std::map<Int, std::set<Int> > casa::MSMetaDataOnDemand::_stateToFieldsMap [private]

Definition at line 297 of file MSMetaDataOnDemand.h.

Definition at line 293 of file MSMetaDataOnDemand.h.

Definition at line 314 of file MSMetaDataOnDemand.h.

const vector<const Table*> casa::MSMetaDataOnDemand::_taqlTempTable [private]

Definition at line 315 of file MSMetaDataOnDemand.h.

Definition at line 286 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<Vector<Double> > casa::MSMetaDataOnDemand::_times [private]

Definition at line 301 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<std::map<Double, std::set<Int> > > casa::MSMetaDataOnDemand::_timeToFieldsMap [private]

Definition at line 305 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<std::map<Int, Double> > casa::MSMetaDataOnDemand::_unflaggedFieldNACRows [private]

Definition at line 312 of file MSMetaDataOnDemand.h.

std::tr1::shared_ptr<std::map<Int, Double> > casa::MSMetaDataOnDemand::_unflaggedFieldNXCRows [private]

Definition at line 312 of file MSMetaDataOnDemand.h.

Definition at line 313 of file MSMetaDataOnDemand.h.

Definition at line 313 of file MSMetaDataOnDemand.h.

Definition at line 309 of file MSMetaDataOnDemand.h.

Definition at line 285 of file MSMetaDataOnDemand.h.

Definition at line 283 of file MSMetaDataOnDemand.h.

Definition at line 285 of file MSMetaDataOnDemand.h.

Definition at line 285 of file MSMetaDataOnDemand.h.

Definition at line 286 of file MSMetaDataOnDemand.h.


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