casa
5.7.0-16
|
Class to interrogate an MS for metadata. Interrogation happens on demand and resulting metadata are stored for use by subsequent queries if the cache has not exceeded the specified limit. Caching of MS main table columns has been removed because the cache can be swamped by columns for large MSes, meaning that smaller data structures, which are more computationally expensive to create, aren't cached. Also, the column data is usually only needed temporarily to compute smaller data structures, and the column data is not particularly expensive to recreate if necessary. Parallel processing is enabled using openmp. More...
#include <MSMetaData.h>
Classes | |
struct | ColumnStats |
struct | ScanProperties |
struct | SourceProperties |
represents non-primary key data for a SOURCE table row More... | |
struct | SpwProperties |
struct | SubScanProperties |
struct | TimeStampProperties |
Public Types | |
enum | CorrelationType { AUTO, CROSS, BOTH } |
for retrieving stats More... | |
enum | SQLDSwitch { SQLD_INCLUDE, SQLD_EXCLUDE, SQLD_ONLY } |
typedef std::map< Int, std::pair< Double, Quantity > > | FirstExposureTimeMap |
Public Member Functions | |
MSMetaData (const MeasurementSet *const &ms, const Float maxCacheSizeMB) | |
construct an object which stores a pointer to the MS and queries the MS only as necessary. More... | |
virtual | ~MSMetaData () |
QVD | getAntennaDiameters () const |
get the antenna diameters More... | |
uInt | getAntennaID (const String &antennaName) const |
if the antenna name appears multiple times in the antenna table, the last ID that it is associated with is returned. More... | |
std::set< uInt > | getAntennaIDs (const String &antennaName) const |
get all the antenna IDs for the antenna with the specified name. More... | |
vector< std::set< uInt > > | getAntennaIDs (const vector< String > &antennaNames) const |
The returned IDs are ordered in the way they appear in the atenna table. More... | |
vector< String > | getAntennaNames (std::map< String, uInt > &namesToIDsMap, const vector< uInt > &antennaIDs=vector< uInt >(0)) const |
In the first instance of getAntennaNames, namesToID map will have the last ID of the antenna name, if it appears multiple times in the antenna table. More... | |
vector< String > | getAntennaNames (std::map< String, std::set< uInt > > &namesToIDsMap, const vector< uInt > &antennaIDs=vector< uInt >(0)) const |
vector< String > | getAntennaStations (const vector< uInt > &antennaIDs=vector< uInt >()) |
get the antenna stations for the specified antenna IDs More... | |
vector< std::vector< String > > | getAntennaStations (const vector< String > &antennaNames) |
get the antenna stations for the specified antenna names. More... | |
std::set< Int > | getAntennasForScan (const ScanKey &scan) const |
get the set of antenna IDs for the specified scan. More... | |
vector< Array< Int > > | getCorrProducts () const |
POLARIZATION.CORR_PRODUCT. More... | |
vector< vector< Int > > | getCorrTypes () const |
POLARIZATION.CORR_TYPE. More... | |
vector< uInt > | getDataDescIDToSpwMap () const |
vector< uInt > | getDataDescIDToPolIDMap () const |
vector< Int > | getFieldTableSourceIDs () const |
Get the FIELD.SOURCE_ID column. More... | |
vector< std::set< ScanKey > > | getFieldToScansMap () const |
get the mapping of field ID to scans More... | |
std::map< String, std::set< Int > > | getIntentToFieldsMap () |
std::map< String, std::set < ScanKey > > | getIntentToScansMap () |
std::map< String, std::set < uInt > > | getIntentToSpwsMap () |
std::set< String > | getIntentsForScan (const ScanKey &scan) const |
std::set< String > | getIntentsForSubScan (const SubScanKey &subScan) const |
std::shared_ptr< const std::map< SubScanKey, std::set < String > > > | getSubScanToIntentsMap () const |
std::set< String > | getIntents () const |
get all intents, in no particular (nor guaranteed) order. More... | |
std::set< String > | getIntentsForField (Int fieldID) |
get a set of intents corresponding to a specified field More... | |
std::set< String > | getIntentsForField (String field) |
get a set of intents corresponding to a specified field name More... | |
std::set< String > | getIntentsForSpw (const uInt spw) |
get a set of intents corresponding to the specified spectral window More... | |
vector< Int > | getNumCorrs () const |
number of correlations from the polarization table. More... | |
vector< std::pair< Quantity, Quantity > > | getProperMotions () const |
SOURCE.PROPER_MOTION, first value in pair is longitudinal proper motion, second is latiduninal. More... | |
std::set< Int > | getScanNumbers (Int obsID, Int arrayID) const |
get unique scan numbers More... | |
std::set< Int > | getScansForState (Int stateID, Int obsID, Int arrayID) const |
get a set of scan numbers for the specified stateID, obsID, and arrayID. More... | |
std::map< ScanKey, std::set < Int > > | getScanToStatesMap () const |
get the mapping of scans to states More... | |
vector< MDirection > | getSourceDirections () const |
SOURCE.DIRECTION. More... | |
vector< String > | getSourceNames () const |
SOURCE.NAME. More... | |
vector< Int > | getSourceTableSourceIDs () const |
Get the SOURCE.SOURCE_ID column. More... | |
std::shared_ptr< const Quantum < Vector< Double > > > | getSourceTimes () const |
SOURCE.TIME. More... | |
virtual std::set< uInt > | getSpwsForIntent (const String &intent) |
get a set of spectral windows for which the specified intent applies. More... | |
uInt | nRows () const |
get the number of visibilities More... | |
uInt | nRows (CorrelationType cType) |
std::shared_ptr< const std::map< SubScanKey, uInt > > | getNRowMap (CorrelationType type) const |
uInt | nRows (CorrelationType cType, Int arrayID, Int observationID, Int scanNumber, Int fieldID) const |
uInt | nRows (CorrelationType cType, uInt fieldID) const |
uInt | nSpw (Bool includewvr) const |
get number of spectral windows More... | |
uInt | nStates () const |
number of unique states (number of rows from the STATE table) More... | |
uInt | nFields () const |
get the number of fields. More... | |
std::vector< std::set< uInt > > | getSpwToDataDescriptionIDMap () const |
get a mapping of spectral window ID to data descrption IDs More... | |
std::set< uInt > | getSpwsForField (const Int fieldID) const |
get a set of spectral windows corresponding to the specified fieldID More... | |
std::set< uInt > | getSpwsForField (const String &fieldName) |
get a set of spectral windows corresponding to the specified field name More... | |
vector< String > | getFieldCodes () const |
get the values of the CODE column from the field table More... | |
std::set< Int > | getFieldIDsForSpw (const uInt spw) |
get the set of field IDs corresponding to the specified spectral window. More... | |
std::set< String > | getFieldNamesForSpw (const uInt spw) |
get the set of field names corresponding to the specified spectral window. More... | |
std::map< Int, std::set< uInt > > | getFieldsToSpwsMap () const |
get the mapping of fields to spws More... | |
std::map< SourceKey, std::shared_ptr< vector < MFrequency > > > | getRestFrequencies () const |
get rest frequencies from the SOURCE table More... | |
std::set< uInt > | getSpwsForScan (const ScanKey &scan) const |
get the set of spectral windows for the specified scan. More... | |
std::set< uInt > | getSpwsForSubScan (const SubScanKey &subScan) const |
get the set of spectral windows for the specified subscan. More... | |
std::set< Int > | getScansForSpw (uInt spw, Int obsID, Int arrayID) const |
get the set of scan numbers for the specified spectral window. More... | |
std::map< ScanKey, std::set < uInt > > | getScanToSpwsMap () const |
get the complete mapping of scans to spws More... | |
std::vector< std::set< ScanKey > > | getSpwToScansMap () const |
get the complete mapping of spws to scans More... | |
std::map< SourceKey, std::shared_ptr< vector < String > > > | getTransitions () const |
get the transitions from the SOURCE table. More... | |
uInt | nAntennas () const |
get the number of antennas in the ANTENNA table More... | |
std::set< uInt > | getTDMSpw () |
ALMA-specific. More... | |
std::set< uInt > | getFDMSpw () |
ALMA-specific. More... | |
std::set< uInt > | getChannelAvgSpw () |
ALMA-specific. More... | |
std::set< uInt > | getWVRSpw () const |
ALMA-specific. More... | |
std::set< uInt > | getSQLDSpw () |
ALMA-specific. More... | |
std::set< Int > | getScansForTimes (Double center, Double tol, Int obsID, Int arrayID) const |
Get the scan numbers which fail into the specified time range (center-tol to center+tol), inclusive. More... | |
std::set< Double > | getTimesForScans (std::set< ScanKey > scans) const |
Get the times for the specified scans. More... | |
std::set< Double > | getTimesForScan (const ScanKey &scan) const |
get the times for the specified scan. More... | |
std::map< uInt, std::set < Double > > | getSpwToTimesForScan (const ScanKey &scan) const |
std::pair< Double, Double > | getTimeRangeForScan (const ScanKey &scanKey) const |
get the time range for the specified scan. More... | |
std::shared_ptr< const std::map< ScanKey, std::pair < Double, Double > > > | getScanToTimeRangeMap () const |
get the map of scans to time ranges. More... | |
std::set< Int > | getStatesForScan (Int obsID, Int arrayID, Int scan) const |
get the stateIDs associated with the specified scan. More... | |
std::vector< std::set< Double > > | getTimesForSpws (Bool showProgress=True) const |
get a map of spectral windows to unique timestamps. More... | |
QVD | getAntennaOffset (uInt which) const |
get the position of the specified antenna relative to the observatory position. More... | |
QVD | getAntennaOffset (const String &name) const |
If the antenna name appears mulitple times, this will return the offset for the first occurrence of it in the antenna table. More... | |
std::vector< QVD > | getAntennaOffsets (const String &name) const |
If the antenna name appears mulitple times, this will return all the offsets for it, in the order they appear in the antenna table. More... | |
vector< QVD > | getAntennaOffsets () const |
vector< MPosition > | getAntennaPositions (const vector< uInt > &which=std::vector< uInt >(0)) const |
get the positions of the specified antennas. More... | |
vector< vector< MPosition > > | getAntennaPositions (const vector< String > &names) |
names cannot be empty. More... | |
std::map< uInt, Double > | getAverageIntervalsForScan (const ScanKey &scan) const |
the first key in the returned map is the spectral window ID, the second is the average interval for the specified scan for that spw. More... | |
std::map< uInt, Quantity > | getAverageIntervalsForSubScan (const SubScanKey &subScan) const |
the first key in the returned map is the spectral window ID, the second is the average interval for the specified sub scan for that spw. More... | |
vector< uInt > | getBBCNos () const |
std::map< uInt, std::set< uInt > > | getBBCNosToSpwMap (SQLDSwitch sqldSwitch) |
vector< vector< Double > > | getEdgeChans () |
MDirection | phaseDirFromFieldIDAndTime (const uInt fieldID, const MEpoch &ep=MEpoch(Quantity(0.0, Unit("s")))) const |
Get the phase direction for a given field id and epoch interpolate polynomial if it is the field id is such or use ephemerides table if that is attached to that field id. More... | |
MDirection | getReferenceDirection (const uInt fieldID, const MEpoch &ep=MEpoch(Quantity(0.0, Unit("s")))) const |
Get the reference direction for a given field ID and epoch interpolate polynomial if it is the field ID is such or use ephemerides table if that is attached to that field ID. More... | |
std::set< Int > | getFieldIDsForField (const String &field) const |
get the field IDs for the specified field name. More... | |
vector< String > | getFieldNames () const |
get a list of the field names in the order in which they appear in the FIELD table. More... | |
std::set< Int > | getFieldsForScan (const ScanKey &scan) const |
get field IDs associated with the specified scan number. More... | |
std::set< Int > | getFieldsForScans (const std::set< Int > &scans, Int obsID, Int arrayID) const |
get the field IDs associated with the specified scans More... | |
std::set< Int > | getFieldsForScans (const std::set< ScanKey > &scans) const |
get the field IDs associated with the specified scans More... | |
std::set< Int > | getFieldsForIntent (const String &intent) |
get the field IDs associated with the specified intent. More... | |
std::set< Int > | getFieldsForIntent (uInt sourceID) const |
get the field IDs associated with the specified source. More... | |
std::map< Int, std::set< Int > > | getFieldsForSourceMap () const |
std::map< Int, std::set< String > > | getFieldNamesForSourceMap () const |
vector< String > | getFieldNamesForFieldIDs (const vector< uInt > &fieldIDs) |
get the field names associated with the specified field IDs. More... | |
std::set< Int > | getFieldsForTimes (Double center, Double tol) |
Get the fields which fail into the specified time range (center-tol to center+tol) More... | |
Float | getMaxCacheSizeMB () const |
max cache size in MB More... | |
vector< String > | getObservatoryNames () |
get telescope names in the order they are listed in the OBSERVATION table. More... | |
MPosition | getObservatoryPosition (uInt which) const |
get the position of the specified telescope (observatory). More... | |
vector< MDirection > | getPhaseDirs (const MEpoch &ep=MEpoch(Quantity(0.0, Unit("s")))) const |
get the phase directions from the FIELD subtable. More... | |
std::set< ScanKey > | getScanKeys () const |
get all ScanKeys in the dataset More... | |
std::set< ScanKey > | getScanKeys (const ArrayKey &arrayKey) const |
get all ScanKeys in the dataset that have the specified arrayKey . More... | |
std::set< Int > | getScansForIntent (const String &intent, Int obsID, Int arrayID) const |
get the scans associated with the specified intent More... | |
std::set< Int > | getScansForFieldID (Int fieldID, Int obsID, Int arrayID) const |
get the scan numbers associated with the specified field ID. More... | |
std::set< Int > | getScansForField (const String &field, Int obsID, Int arrayID) const |
get the scan numbers associated with the specified field. More... | |
std::map< std::pair< uInt, uInt >, uInt > | getSpwIDPolIDToDataDescIDMap () const |
The first value of the pair is spw, the second is polarization ID. More... | |
vector< String > | getSpwNames () const |
get a map of the spwIDs to spw names from the spw table More... | |
std::set< uInt > | getSpwIDs () const |
get all the spws associated with the data description IDs listed in the main table. More... | |
std::set< SubScanKey > | getSubScanKeys (const ArrayKey &arrayKey) const |
get all sub scan keys for the specified array key. More... | |
SubScanProperties | getSubScanProperties (const SubScanKey &subScan, Bool showProgress=False) const |
get the sub scan properties for the specified sub scan. More... | |
std::shared_ptr< const std::map< SubScanKey, SubScanProperties > > | getSubScanProperties (Bool showProgress=False) const |
void | setForceSubScanPropsToCache (Bool b) |
If True, force the subscan properties structure to be cached regardless of the stipulations on the maximum cache. More... | |
Record | getSummary () const |
get a data structure, consumable by users, representing a summary of the dataset More... | |
std::set< Double > | getTimesForField (Int fieldID) |
get the times for which the specified field was observed More... | |
std::set< Double > | getTimesForIntent (const String &intent) const |
get the time stamps associated with the specified intent More... | |
Bool | hasBBCNo () const |
Matrix< Bool > | getUniqueBaselines () |
std::map<Double, Double> getExposuresForTimes() const; More... | |
virtual uInt | nBaselines (Bool includeAutoCorrelation=False) |
get the number of unique baselines represented in the main MS table which in theory can be less than n*(n-1)/2. More... | |
Quantity | getEffectiveTotalExposureTime () |
get the effective total exposure time. More... | |
uInt | nScans () |
get the number of scans in the dataset More... | |
uInt | nObservations () const |
get the number of observations (from the OBSERVATIONS table) in the dataset More... | |
vector< String > | getObservers () const |
get the contents of the OBSERVER column from the OBSERVATIONS table More... | |
vector< String > | getProjects () const |
get the contents of the PROJECT column from the OBSERVATIONS table More... | |
vector< vector< String > > | getSchedules () const |
get the contents of the SCHEDULE column from the OBSERVATIONS table Note that the embedded vectors may have different lengths More... | |
vector< std::pair< MEpoch, MEpoch > > | getTimeRangesOfObservations () const |
get the time ranges from the OBSERVATION table More... | |
uInt | nArrays () |
get the number of arrays (from the ARRAY table) in the dataset More... | |
uInt | nDataDescriptions () const |
get the number of data description IDs (from the DATA_DESCRIPTION table) More... | |
Double | nUnflaggedRows () const |
get the number of unflagged rows More... | |
Double | nUnflaggedRows (CorrelationType cType) const |
Double | nUnflaggedRows (CorrelationType cType, Int arrayID, uInt observationID, Int scanNumber, uInt fieldID) const |
Double | nUnflaggedRows (CorrelationType cType, Int fieldID) const |
Float | getCache () const |
vector< Double > | getBandWidths () const |
vector< Quantity > | getCenterFreqs () const |
vector< QVD > | getChanEffectiveBWs (Bool asVelWidths) const |
get the effective bandwidth for each channel. More... | |
vector< QVD > | getChanFreqs () const |
vector< QVD > | getChanResolutions (Bool asVelWidths) const |
get the resolution for each channel. More... | |
vector< QVD > | getChanWidths () const |
vector< Quantity > | getMeanFreqs () const |
vector< Int > | getNetSidebands () const |
vector< MFrequency > | getRefFreqs () const |
vector< uInt > | nChans () const |
uInt | nPol () |
std::vector< std::map< Int, Quantity > > | getFirstExposureTimeMap () |
DEPRECATED get a map of data desc ID, scan number pair to exposure time for the first time for that data desc ID, scan number pair. More... | |
std::map< ScanKey, FirstExposureTimeMap > | getScanToFirstExposureTimeMap (Bool showProgress) const |
get map of scans to first exposure times More... | |
std::set< uInt > | getPolarizationIDs (uInt obsID, Int arrayID, Int scan, uInt spwid) const |
get polarization IDs for the specified scan and spwid More... | |
const std::set< Int > & | getUniqueAntennaIDs () const |
get the unique antennas (the union of the ANTENNA_1 and ANTENNA_2 columns) from the main table More... | |
std::set< uInt > | getUniqueDataDescIDs () const |
get unique data description IDs that exist in the main table More... | |
std::set< Int > | getUniqueFiedIDs () const |
DEPRECATED because of spelling error. More... | |
std::set< Int > | getUniqueFieldIDs () const |
get unique field IDs that exist in the main table. More... | |
std::pair< MDirection, MDirection > | getPointingDirection (Int &ant1, Int &ant2, Double &time, uInt row, Bool interpolate=false, Int initialguess=0) const |
get the pointing directions associated with antenna1 and antenna2 for the specified row of the main MS table More... | |
std::pair< Double, Double > | getTimeRange (Bool showProgress=False) const |
get the time range for the entire dataset. More... | |
uInt | nUniqueSourceIDsFromSourceTable () const |
Number of unique values from SOURCE.SOURCE_ID. More... | |
std::set< uInt > | getUniqueSpwIDs () const |
get the unique spectral window IDs represented by the data description IDs that appear in the main table More... | |
const MeasurementSet * | getMS () const |
void | setShowProgress (Bool b) |
ColumnStats | getIntervalStatistics () const |
get statistics related to the values of the INTERVAL column. More... | |
Private Member Functions | |
MSMetaData (const MSMetaData &) | |
disallow copy constructor and = operator More... | |
MSMetaData | operator= (const MSMetaData &) |
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.More... | |
void | _setObservation (const MeasurementSet &ms) |
set metadata from OBSERVATION table More... | |
Bool | _cacheUpdated (const Float incrementInBytes) const |
void | _checkField (uInt fieldID) const |
void | _checkScan (const ScanKey &key) const |
void | _checkScans (const std::set< ScanKey > &scanKeys) const |
void | _checkSubScan (const SubScanKey &key) const |
void | _computeScanAndSubScanProperties (std::shared_ptr< std::map< ScanKey, MSMetaData::ScanProperties > > &scanProps, std::shared_ptr< std::map< SubScanKey, MSMetaData::SubScanProperties > > &subScanProps, Bool showProgress) const |
void | _mergeScanProps (std::shared_ptr< std::map< ScanKey, MSMetaData::ScanProperties > > &scanProps, std::shared_ptr< std::map< SubScanKey, MSMetaData::SubScanProperties > > &subScanProps, const std::vector< std::pair< std::map< ScanKey, ScanProperties >, std::map< SubScanKey, SubScanProperties > > > &props) const |
void | _createScanRecords (Record &parent, const ArrayKey &arrayKey, const std::map< SubScanKey, SubScanProperties > &subScanProps) const |
void | _createSubScanRecords (Record &parent, uInt &scanNRows, std::set< Int > &antennasForScan, const ScanKey &scanKey, const std::map< SubScanKey, SubScanProperties > &subScanProps) const |
std::shared_ptr< const std::map< ScanKey, ScanProperties > > | _generateScanPropsIfWanted () const |
if _scanProps has been generated, just return it. More... | |
std::shared_ptr< const std::map< SubScanKey, SubScanProperties > > | _generateSubScanPropsIfWanted () const |
if _subScanProperties has been generated, just return it. More... | |
vector< String > | _getAntennaNames (std::map< String, std::set< uInt > > &namesToIDsMap) const |
vector< MPosition > | _getAntennaPositions () const |
void | _getAntennas (std::shared_ptr< Vector< Int > > &ant1, std::shared_ptr< Vector< Int > > &ant2) const |
std::shared_ptr< Vector< Int > > | _getArrayIDs () const |
std::map< ArrayKey, std::set < SubScanKey > > | _getArrayKeysToSubScanKeys () const |
std::pair< std::map< ScanKey, ScanProperties >, std::map < SubScanKey, SubScanProperties > > | _getChunkSubScanProperties (const Vector< Int > &scans, const Vector< Int > &fields, const Vector< Int > &ddIDs, const Vector< Int > &states, const Vector< Double > ×, const Vector< Int > &arrays, const Vector< Int > &observations, const Vector< Int > &ant1, const Vector< Int > &ant2, const Quantum< Vector< Double > > &exposureTimes, const Quantum< Vector< Double > > &intervalTimes, const vector< uInt > &ddIDToSpw, uInt beginRow, uInt endRow) const |
Uses openmp for parallel processing. More... | |
std::shared_ptr< Vector< Int > > | _getDataDescIDs () const |
std::shared_ptr< std::set< Int > > | _getEphemFieldIDs () const |
get the field IDs of ephemeris objects More... | |
std::shared_ptr< Quantum < Vector< Double > > > | _getExposureTimes () const |
std::shared_ptr< Vector< Int > > | _getFieldIDs () const |
void | _getFieldsAndIntentsMaps (vector< std::set< String > > &fieldToIntentsMap, std::map< String, std::set< Int > > &intentToFieldsMap) |
If there are no intents, then fieldToIntentsMap will be of length nFields() and all of its entries will be the empty set, and intentToFieldsMap will be empty. More... | |
void | _getFieldsAndScansMaps (vector< std::set< ScanKey > > &fieldToScansMap, std::map< ScanKey, std::set< Int > > &scanToFieldsMap) const |
void | _getFieldsAndSpwMaps (std::map< Int, std::set< uInt > > &fieldToSpwMap, vector< std::set< Int > > &spwToFieldMap) const |
void | _getFieldsAndStatesMaps (std::map< Int, std::set< Int > > &fieldToStatesMap, std::map< Int, std::set< Int > > &stateToFieldsMap) |
void | _getFieldsAndTimesMaps (std::shared_ptr< std::map< Int, std::set< Double > > > &fieldToTimesMap, std::shared_ptr< std::map< Double, std::set< Int > > > ×ToFieldMap) |
std::shared_ptr< ArrayColumn < Bool > > | _getFlags () const |
std::map< String, std::set < Double > > | _getIntentsToTimesMap () const |
std::shared_ptr< Quantum < Vector< Double > > > | _getIntervals () const |
std::shared_ptr< Vector< Int > > | _getObservationIDs () const |
std::shared_ptr< Vector< Int > > | _getScans () const |
vector< std::set< String > > | _getSpwToIntentsMap () |
std::shared_ptr< Vector< Int > > | _getStateIDs () const |
std::shared_ptr< Vector< Double > > | _getTimes () const |
Bool | _hasIntent (const String &intent) const |
std::shared_ptr<std::map<Double, TimeStampProperties> > _getTimeStampProperties() const; More... | |
Bool | _hasFieldID (Int fieldID) const |
Bool | _hasStateID (Int stateID) const |
void | _hasAntennaID (Int antennaID) |
std::map< Double, Double > | _getTimeToTotalBWMap (const Vector< Double > ×, const Vector< Int > &ddIDs) |
MDirection | _getInterpolatedDirection (const ROMSPointingColumns &pCols, const Int &index, const Double &time) const |
vector< std::set< Int > > | _getObservationIDToArrayIDsMap () const |
map<SubScanKey, Quantity> _getMeanExposureTimes() const; More... | |
vector< MPosition > | _getObservatoryPositions () |
void | _getRowStats (uInt &nACRows, uInt &nXCRows, std::map< SubScanKey, uInt > *&subScanToNACRowsMap, std::map< SubScanKey, uInt > *&subScanToNXCRowsMap, std::map< Int, uInt > *&fieldToNACRowsMap, std::map< Int, uInt > *&fieldToNXCRowsMap) const |
void | _getRowStats (uInt &nACRows, uInt &nXCRows, std::shared_ptr< std::map< SubScanKey, uInt > > &scanToNACRowsMap, std::shared_ptr< std::map< SubScanKey, uInt > > &scanToNXCRowsMap, std::shared_ptr< std::map< Int, uInt > > &fieldToNACRowsMap, std::shared_ptr< std::map< Int, uInt > > &fieldToNXCRowsMap) const |
std::shared_ptr< const std::map< ScanKey, MSMetaData::ScanProperties > > | _getScanProperties (Bool showProgress) const |
get scan properties More... | |
std::set< ScanKey > | _getScanKeys (const std::set< ScanKey > &scanKeys, const ArrayKey &arrayKey) const |
get the scan keys in the specified set that have the associated arrayKey More... | |
std::set< Int > | _getScanNumbers (const ArrayKey &arrayKey) const |
get all valid scan numbers associated with the specified arrayKey More... | |
void | _getScansAndDDIDMaps (std::map< ScanKey, std::set< uInt > > &scanToDDIDMap, vector< std::set< ScanKey > > &ddIDToScanMap) const |
void | _getScansAndIntentsMaps (std::map< ScanKey, std::set< String > > &scanToIntentsMap, std::map< String, std::set< ScanKey > > &intentToScansMap) const |
void | _getScansAndSpwMaps (std::map< ScanKey, std::set< uInt > > &scanToSpwMap, vector< std::set< ScanKey > > &spwToScanMap) const |
std::map< ScanKey, std::set < Int > > | _getScanToAntennasMap () const |
std::map< ScanKey, std::set < SubScanKey > > | _getScanToSubScansMap () const |
std::shared_ptr< std::map < ScanKey, std::set< Double > > > | _getScanToTimesMap () const |
std::map< SourceKey, SourceProperties > | _getSourceInfo () const |
vector< SpwProperties > | _getSpwInfo (std::set< uInt > &avgSpw, std::set< uInt > &tdmSpw, std::set< uInt > &fdmSpw, std::set< uInt > &wvrSpw, std::set< uInt > &sqldSpw) const |
void | _getSpwsAndIntentsMaps (vector< std::set< String > > &spwToIntentsMap, std::map< String, std::set< uInt > > &intentToSpwsMap) |
vector< SpwProperties > | _getSpwInfo2 (std::set< uInt > &avgSpw, std::set< uInt > &tdmSpw, std::set< uInt > &fdmSpw, std::set< uInt > &wvrSpw, std::set< uInt > &sqldSpw) const |
void | _getStateToIntentsMap (vector< std::set< String > > &statesToIntentsMap, std::set< String > &uniqueIntents) const |
vector< String > | _getStationNames () |
void | _getSubScansAndIntentsMaps (std::shared_ptr< const std::map< SubScanKey, std::set< String > > > &subScanToIntentsMap, std::map< String, std::set< SubScanKey > > &intentToSubScansMap) const |
void | _getScanAndSubScanProperties (std::shared_ptr< const std::map< ScanKey, ScanProperties > > &scanProps, std::shared_ptr< const std::map< SubScanKey, SubScanProperties > > &subScanProps, Bool showProgress) const |
std::set< SubScanKey > | _getSubScanKeys () const |
std::set< SubScanKey > | _getSubScanKeys (const ScanKey &scanKey) const |
get subscans related to the given scan More... | |
void | _getUnflaggedRowStats (Double &nACRows, Double &nXCRows, std::shared_ptr< std::map< SubScanKey, Double > > &subScanToNACRowsMap, std::shared_ptr< std::map< SubScanKey, Double > > &subScanToNXCRowsMap, std::shared_ptr< vector< Double > > &fieldToNACRowsMap, std::shared_ptr< vector< Double > > &fieldToNXCRowsMap) const |
void | _getUnflaggedRowStats (Double &nACRows, Double &nXCRows, vector< Double > *&fieldNACRows, vector< Double > *&fieldNXCRows, std::map< SubScanKey, Double > *&scanNACRows, std::map< SubScanKey, Double > *&scanNXCRows) const |
template<class T > | |
std::shared_ptr< Vector< T > > | _getMainScalarColumn (MSMainEnums::PredefinedColumns col) const |
Static Private Member Functions | |
static void | _checkTolerance (const Double tol) |
static void | _getScalarIntColumn (Vector< Int > &v, TableProxy &table, const String &colname, Int beginRow, Int nrows) |
static void | _getScalarDoubleColumn (Vector< Double > &v, TableProxy &table, const String &colname, Int beginRow, Int nrows) |
static void | _getScalarQuantDoubleColumn (Quantum< Vector< Double > > &v, TableProxy &table, const String &colname, Int beginRow, Int nrows) |
static void | _createTimeStampRecords (Record &parent, const SubScanProperties &subScanProps) |
static QVD | _freqWidthToVelWidth (const QVD &v, const Quantity &refFreq) |
convert a QVD in frequency units to velocity units using the give reference frequency. More... | |
static void | _modifyFirstExposureTimeIfNecessary (FirstExposureTimeMap ¤t, const FirstExposureTimeMap &test) |
static void | _modifyFirstExposureTimeIfNecessary (FirstExposureTimeMap ¤t, Int dataDescID, Double time, Double exposure, const Unit &eunit) |
static uInt | _sizeof (const std::map< Double, MSMetaData::TimeStampProperties > &m) |
template<class T > | |
static uInt | _sizeof (const std::map< T, std::set< String > > &m) |
template<class T , class U > | |
static uInt | _sizeof (const std::map< T, std::set< U > > &m) |
template<class T , class U > | |
static uInt | _sizeof (const std::map< T, U > &m) |
static uInt | _sizeof (const vector< std::set< String > > &m) |
static uInt | _sizeof (const vector< String > &m) |
static uInt | _sizeof (const vector< vector< String > > &m) |
template<class T > | |
static uInt | _sizeof (const vector< T > &v) |
static uInt | _sizeof (const Quantum< Vector< Double > > &m) |
template<class T > | |
static uInt | _sizeof (const vector< std::set< T > > &v) |
template<class T > | |
static uInt | _sizeof (const std::map< String, std::set< T > > &map) |
static uInt | _sizeof (const vector< std::map< Int, Quantity > > &map) |
static uInt | _sizeof (const std::map< std::pair< Int, uInt >, std::set< uInt > > &map) |
static std::map< Int, uInt > | _toUIntMap (const Vector< Int > &v) |
Class to interrogate an MS for metadata. Interrogation happens on demand and resulting metadata are stored for use by subsequent queries if the cache has not exceeded the specified limit. Caching of MS main table columns has been removed because the cache can be swamped by columns for large MSes, meaning that smaller data structures, which are more computationally expensive to create, aren't cached. Also, the column data is usually only needed temporarily to compute smaller data structures, and the column data is not particularly expensive to recreate if necessary. Parallel processing is enabled using openmp.
Definition at line 61 of file MSMetaData.h.
typedef std::map<Int, std::pair<Double, Quantity> > casacore::MSMetaData::FirstExposureTimeMap |
Definition at line 89 of file MSMetaData.h.
Enumerator | |
---|---|
SQLD_INCLUDE | |
SQLD_EXCLUDE | |
SQLD_ONLY |
Definition at line 72 of file MSMetaData.h.
casacore::MSMetaData::MSMetaData | ( | 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, in which case, each method call will have to (re)query the MS. It is highly recommended to use a cache of reasonable size for the specified MS if multiple methods are going to be called.
|
virtual |
|
private |
disallow copy constructor and = operator
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
convert a QVD in frequency units to velocity units using the give reference frequency.
No explicit checking is done for unit correctness of the inputs.
|
private |
if _scanProps has been generated, just return it.
If the caller has configured the object to generate _scanProps at some point, this call will generate it. Otherwise, the returned object contains a null pointer.
|
private |
if _subScanProperties has been generated, just return it.
If the caller has configured the object to generate _subScanPropertiess at some point, this call will generate it. Otherwise, the returned object contains a null pointer.
|
private |
|
private |
|
private |
|
private |
|
private |
Uses openmp for parallel processing.
|
private |
get the field IDs of ephemeris objects
|
private |
|
private |
If there are no intents, then fieldToIntentsMap will be of length nFields() and all of its entries will be the empty set, and intentToFieldsMap will be empty.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
map<SubScanKey, Quantity> _getMeanExposureTimes() const;
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
get the scan keys in the specified set that have the associated arrayKey
get all valid scan numbers associated with the specified arrayKey
|
private |
get scan properties
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
get subscans related to the given scan
|
private |
|
private |
|
private |
|
private |
|
private |
std::shared_ptr<std::map<Double, TimeStampProperties> > _getTimeStampProperties() const;
|
private |
|
staticprivate |
|
staticprivate |
|
private |
set metadata from OBSERVATION table
|
private |
This comment from thunter in the original ValueMapping python class
uInt _getNumberOfPolarizations();
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
QVD casacore::MSMetaData::getAntennaDiameters | ( | ) | const |
get the antenna diameters
if the antenna name appears multiple times in the antenna table, the last ID that it is associated with is returned.
get all the antenna IDs for the antenna with the specified name.
vector<std::set<uInt> > casacore::MSMetaData::getAntennaIDs | ( | const vector< String > & | antennaNames | ) | const |
The returned IDs are ordered in the way they appear in the atenna table.
vector<String> casacore::MSMetaData::getAntennaNames | ( | std::map< String, uInt > & | namesToIDsMap, |
const vector< uInt > & | antennaIDs = vector< uInt >(0) |
||
) | const |
In the first instance of getAntennaNames, namesToID map will have the last ID of the antenna name, if it appears multiple times in the antenna table.
In the second occurrence, namesToIDsMap will have the full set of IDs for antenna names that appear multiple times.
vector<String> casacore::MSMetaData::getAntennaNames | ( | std::map< String, std::set< uInt > > & | namesToIDsMap, |
const vector< uInt > & | antennaIDs = vector< uInt >(0) |
||
) | const |
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.
If the antenna name appears mulitple times, this will return the offset for the first occurrence of it in the antenna table.
If the antenna name appears mulitple times, this will return all the offsets for it, in the order they appear in the antenna table.
vector<QVD > casacore::MSMetaData::getAntennaOffsets | ( | ) | const |
vector<MPosition> casacore::MSMetaData::getAntennaPositions | ( | const vector< uInt > & | which = std::vector< uInt >(0) | ) | const |
get the positions of the specified antennas.
If which
is empty, return all antenna positions.
vector<vector<MPosition> > casacore::MSMetaData::getAntennaPositions | ( | const vector< String > & | names | ) |
names
cannot be empty.
get the set of antenna IDs for the specified scan.
vector<String> casacore::MSMetaData::getAntennaStations | ( | const vector< uInt > & | antennaIDs = vector< uInt >() | ) |
get the antenna stations for the specified antenna IDs
vector<std::vector<String> > casacore::MSMetaData::getAntennaStations | ( | const vector< String > & | antennaNames | ) |
get the antenna stations for the specified antenna names.
The outer vector is ordered respective to antennaNames. Because an antenna name can appear more than once in the antenna table, the inner vector is ordered by row number in which that antenna name appears.
std::map<uInt, Double> casacore::MSMetaData::getAverageIntervalsForScan | ( | const ScanKey & | scan | ) | const |
the first key in the returned map is the spectral window ID, the second is the average interval for the specified scan for that spw.
std::map<uInt, Quantity> casacore::MSMetaData::getAverageIntervalsForSubScan | ( | const SubScanKey & | subScan | ) | const |
the first key in the returned map is the spectral window ID, the second is the average interval for the specified sub scan for that spw.
vector<Double> casacore::MSMetaData::getBandWidths | ( | ) | const |
vector<uInt> casacore::MSMetaData::getBBCNos | ( | ) | const |
std::map<uInt, std::set<uInt> > casacore::MSMetaData::getBBCNosToSpwMap | ( | SQLDSwitch | sqldSwitch | ) |
|
inline |
Definition at line 582 of file MSMetaData.h.
References _cacheMB.
vector<Quantity> casacore::MSMetaData::getCenterFreqs | ( | ) | const |
get the effective bandwidth for each channel.
Each element in the returned vector represents a separate spectral window, with ID given by its location in the vector. If asVelWidths is True, convert the values to velocity widths.
vector<QVD > casacore::MSMetaData::getChanFreqs | ( | ) | const |
std::set<uInt> casacore::MSMetaData::getChannelAvgSpw | ( | ) |
ALMA-specific.
get spectral windows that have been averaged. These are windows with 1 channel.
get the resolution for each channel.
Each element in the returned vector represents a separate spectral window, with ID given by its location in the vector. If asVelWidths is True, convert the values to velocity widths.
vector<QVD > casacore::MSMetaData::getChanWidths | ( | ) | const |
vector<vector<Int> > casacore::MSMetaData::getCorrTypes | ( | ) | const |
POLARIZATION.CORR_TYPE.
vector<uInt> casacore::MSMetaData::getDataDescIDToPolIDMap | ( | ) | const |
vector<uInt> casacore::MSMetaData::getDataDescIDToSpwMap | ( | ) | const |
vector<vector<Double> > casacore::MSMetaData::getEdgeChans | ( | ) |
Quantity casacore::MSMetaData::getEffectiveTotalExposureTime | ( | ) |
get the effective total exposure time.
This is the effective time spent collecting unflagged data.
std::set<uInt> casacore::MSMetaData::getFDMSpw | ( | ) |
ALMA-specific.
get set of spectral windows used for FDM. These are windows that do not have 1, 4, 64, 128, or 256 channels.
vector<String> casacore::MSMetaData::getFieldCodes | ( | ) | const |
get the values of the CODE column from the field table
get the field IDs for the specified field name.
Case insensitive.
get the set of field IDs corresponding to the specified spectral window.
vector<String> casacore::MSMetaData::getFieldNames | ( | ) | const |
get a list of the field names in the order in which they appear in the FIELD table.
get the field names associated with the specified field IDs.
If fieldIDs
is empty, a vector of all the field names is returned.
get the set of field names corresponding to the specified spectral window.
get the field IDs associated with the specified intent.
get the field IDs associated with the specified source.
get field IDs associated with the specified scan number.
std::set<Int> casacore::MSMetaData::getFieldsForScans | ( | const std::set< Int > & | scans, |
Int | obsID, | ||
Int | arrayID | ||
) | const |
get the field IDs associated with the specified scans
get the field IDs associated with the specified scans
Get the fields which fail into the specified time range (center-tol to center+tol)
get the mapping of fields to spws
vector<Int> casacore::MSMetaData::getFieldTableSourceIDs | ( | ) | const |
Get the FIELD.SOURCE_ID column.
vector<std::set<ScanKey> > casacore::MSMetaData::getFieldToScansMap | ( | ) | const |
get the mapping of field ID to scans
DEPRECATED get a map of data desc ID, scan number pair to exposure time for the first time for that data desc ID, scan number pair.
std::set<String> casacore::MSMetaData::getIntents | ( | ) | const |
get all intents, in no particular (nor guaranteed) order.
get a set of intents corresponding to a specified field
get a set of intents corresponding to a specified field name
get a set of intents corresponding to the specified spectral window
std::set<String> casacore::MSMetaData::getIntentsForSubScan | ( | const SubScanKey & | subScan | ) | const |
ColumnStats casacore::MSMetaData::getIntervalStatistics | ( | ) | const |
get statistics related to the values of the INTERVAL column.
Returned values are in seconds. All values in this column are used in the computation, including those which associated row flags may be set.
|
inline |
vector<Quantity> casacore::MSMetaData::getMeanFreqs | ( | ) | const |
|
inline |
Definition at line 659 of file MSMetaData.h.
References _ms.
vector<Int> casacore::MSMetaData::getNetSidebands | ( | ) | const |
std::shared_ptr<const std::map<SubScanKey, uInt> > casacore::MSMetaData::getNRowMap | ( | CorrelationType | type | ) | const |
vector<Int> casacore::MSMetaData::getNumCorrs | ( | ) | const |
number of correlations from the polarization table.
vector<String> casacore::MSMetaData::getObservatoryNames | ( | ) |
get telescope names in the order they are listed in the OBSERVATION table.
These are the telescopes (observatories), not the antenna names.
get the position of the specified telescope (observatory).
vector<String> casacore::MSMetaData::getObservers | ( | ) | const |
get the contents of the OBSERVER column from the OBSERVATIONS table
vector<MDirection> casacore::MSMetaData::getPhaseDirs | ( | const MEpoch & | ep = MEpoch(Quantity(0.0, Unit("s"))) | ) | const |
get the phase directions from the FIELD subtable.
The ep
parameter specifies for which epoch to return the directions of any ephemeris objects in the data set. It is ignored for non-ephemeris objects.
std::pair<MDirection, MDirection> casacore::MSMetaData::getPointingDirection | ( | Int & | ant1, |
Int & | ant2, | ||
Double & | time, | ||
uInt | row, | ||
Bool | interpolate = false , |
||
Int | initialguess = 0 |
||
) | const |
get the pointing directions associated with antenna1 and antenna2 for the specified row of the main MS table
std::set<uInt> casacore::MSMetaData::getPolarizationIDs | ( | uInt | obsID, |
Int | arrayID, | ||
Int | scan, | ||
uInt | spwid | ||
) | const |
get polarization IDs for the specified scan and spwid
vector<String> casacore::MSMetaData::getProjects | ( | ) | const |
get the contents of the PROJECT column from the OBSERVATIONS table
SOURCE.PROPER_MOTION, first value in pair is longitudinal proper motion, second is latiduninal.
MDirection casacore::MSMetaData::getReferenceDirection | ( | const uInt | fieldID, |
const MEpoch & | ep = MEpoch(Quantity(0.0, Unit("s"))) |
||
) | const |
Get the reference direction for a given field ID and epoch interpolate polynomial if it is the field ID is such or use ephemerides table if that is attached to that field ID.
vector<MFrequency> casacore::MSMetaData::getRefFreqs | ( | ) | const |
std::map<SourceKey, std::shared_ptr<vector<MFrequency> > > casacore::MSMetaData::getRestFrequencies | ( | ) | const |
get rest frequencies from the SOURCE table
std::set<ScanKey> casacore::MSMetaData::getScanKeys | ( | ) | const |
get all ScanKeys in the dataset
get all ScanKeys in the dataset that have the specified arrayKey
.
If negative values for either the obsID and/or arrayID portions of the ArrayKey indicate that all obsIDs and/or arrayIDs should be used.
get unique scan numbers
std::set<Int> casacore::MSMetaData::getScansForField | ( | const String & | field, |
Int | obsID, | ||
Int | arrayID | ||
) | const |
get the scan numbers associated with the specified field.
Subclasses should not implement or override.
std::set<Int> casacore::MSMetaData::getScansForFieldID | ( | Int | fieldID, |
Int | obsID, | ||
Int | arrayID | ||
) | const |
get the scan numbers associated with the specified field ID.
std::set<Int> casacore::MSMetaData::getScansForIntent | ( | const String & | intent, |
Int | obsID, | ||
Int | arrayID | ||
) | const |
get the scans associated with the specified intent
get the set of scan numbers for the specified spectral window.
get a set of scan numbers for the specified stateID, obsID, and arrayID.
If obsID and/or arrayID is negative, all observation IDs and/or array IDs will be used.
std::set<Int> casacore::MSMetaData::getScansForTimes | ( | Double | center, |
Double | tol, | ||
Int | obsID, | ||
Int | arrayID | ||
) | const |
Get the scan numbers which fail into the specified time range (center-tol to center+tol), inclusive.
A negative value of obsID and/or arrayID indicates that all observation IDs and/or all arrayIDs should be used.
std::map<ScanKey, FirstExposureTimeMap> casacore::MSMetaData::getScanToFirstExposureTimeMap | ( | Bool | showProgress | ) | const |
get map of scans to first exposure times
get the complete mapping of scans to spws
get the mapping of scans to states
std::shared_ptr<const std::map<ScanKey, std::pair<Double,Double> > > casacore::MSMetaData::getScanToTimeRangeMap | ( | ) | const |
get the map of scans to time ranges.
vector<vector<String> > casacore::MSMetaData::getSchedules | ( | ) | const |
get the contents of the SCHEDULE column from the OBSERVATIONS table Note that the embedded vectors may have different lengths
vector<MDirection> casacore::MSMetaData::getSourceDirections | ( | ) | const |
SOURCE.DIRECTION.
vector<String> casacore::MSMetaData::getSourceNames | ( | ) | const |
SOURCE.NAME.
vector<Int> casacore::MSMetaData::getSourceTableSourceIDs | ( | ) | const |
Get the SOURCE.SOURCE_ID column.
This is a very unfortunate column name, because generally an "ID" column of the table with the same name refers to the row number in that table. But not in this case.
SOURCE.TIME.
The first value of the pair is spw, the second is polarization ID.
std::set<uInt> casacore::MSMetaData::getSpwIDs | ( | ) | const |
get all the spws associated with the data description IDs listed in the main table.
This will not correspond to a list of the row numbers in the SPECTRAL_WINDOW table if there are data description IDs that are not in the main table.
vector<String> casacore::MSMetaData::getSpwNames | ( | ) | const |
get a map of the spwIDs to spw names from the spw table
get a set of spectral windows corresponding to the specified fieldID
get a set of spectral windows corresponding to the specified field name
get a set of spectral windows for which the specified intent
applies.
get the set of spectral windows for the specified scan.
std::set<uInt> casacore::MSMetaData::getSpwsForSubScan | ( | const SubScanKey & | subScan | ) | const |
get the set of spectral windows for the specified subscan.
std::vector<std::set<uInt> > casacore::MSMetaData::getSpwToDataDescriptionIDMap | ( | ) | const |
get a mapping of spectral window ID to data descrption IDs
std::vector<std::set<ScanKey> > casacore::MSMetaData::getSpwToScansMap | ( | ) | const |
get the complete mapping of spws to scans
std::map<uInt, std::set<Double> > casacore::MSMetaData::getSpwToTimesForScan | ( | const ScanKey & | scan | ) | const |
std::set<uInt> casacore::MSMetaData::getSQLDSpw | ( | ) |
ALMA-specific.
Get the square law detector (total power) spectral windows.
get the stateIDs associated with the specified scan.
If obsID and/or arrayID is negative, all observation IDs and/or array IDs will be used.
std::set<SubScanKey> casacore::MSMetaData::getSubScanKeys | ( | const ArrayKey & | arrayKey | ) | const |
get all sub scan keys for the specified array key.
SubScanProperties casacore::MSMetaData::getSubScanProperties | ( | const SubScanKey & | subScan, |
Bool | showProgress = False |
||
) | const |
get the sub scan properties for the specified sub scan.
std::shared_ptr<const std::map<SubScanKey, SubScanProperties> > casacore::MSMetaData::getSubScanProperties | ( | Bool | showProgress = False | ) | const |
std::shared_ptr<const std::map<SubScanKey, std::set<String> > > casacore::MSMetaData::getSubScanToIntentsMap | ( | ) | const |
Record casacore::MSMetaData::getSummary | ( | ) | const |
get a data structure, consumable by users, representing a summary of the dataset
std::set<uInt> casacore::MSMetaData::getTDMSpw | ( | ) |
ALMA-specific.
get set of spectral windows used for TDM. These are windows that have 64, 128, or 256 channels
get the time range for the entire dataset.
min(TIME(x) - 0.5*INTERVAL(x)) to max(TIME(x) + 0.5*INTERVAL(x))
std::pair<Double, Double> casacore::MSMetaData::getTimeRangeForScan | ( | const ScanKey & | scanKey | ) | const |
get the time range for the specified scan.
The pair will contain the start and stop time of the scan, determined from min(TIME(x)-0.5*INTERVAL(x)) and max(TIME(x)-0.5*INTERVAL(x))
get the time ranges from the OBSERVATION table
get the times for which the specified field was observed
get the time stamps associated with the specified intent
get the times for the specified scan.
The return values come from the TIME column.
Get the times for the specified scans.
std::vector<std::set<Double> > casacore::MSMetaData::getTimesForSpws | ( | Bool | showProgress = True | ) | const |
get a map of spectral windows to unique timestamps.
std::map<SourceKey, std::shared_ptr<vector<String> > > casacore::MSMetaData::getTransitions | ( | ) | const |
get the transitions from the SOURCE table.
If there are no transitions for a particular key, the shared ptr contains the null ptr.
const std::set<Int>& casacore::MSMetaData::getUniqueAntennaIDs | ( | ) | const |
get the unique antennas (the union of the ANTENNA_1 and ANTENNA_2 columns) from the main table
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.
std::set<uInt> casacore::MSMetaData::getUniqueDataDescIDs | ( | ) | const |
get unique data description IDs that exist in the main table
|
inline |
DEPRECATED because of spelling error.
Use getUniqueFieldIDs() instead.
Definition at line 634 of file MSMetaData.h.
References getUniqueFieldIDs().
std::set<Int> casacore::MSMetaData::getUniqueFieldIDs | ( | ) | const |
get unique field IDs that exist in the main table.
Referenced by getUniqueFiedIDs().
std::set<uInt> casacore::MSMetaData::getUniqueSpwIDs | ( | ) | const |
get the unique spectral window IDs represented by the data description IDs that appear in the main table
std::set<uInt> casacore::MSMetaData::getWVRSpw | ( | ) | const |
ALMA-specific.
Get the spectral window set used for WVR measurements. These have 4 channels each.
Bool casacore::MSMetaData::hasBBCNo | ( | ) | const |
uInt casacore::MSMetaData::nAntennas | ( | ) | const |
get the number of antennas in the ANTENNA table
uInt casacore::MSMetaData::nArrays | ( | ) |
get the number of arrays (from the ARRAY table) in the dataset
get the number of unique baselines represented in the main MS table which in theory can be less than n*(n-1)/2.
If includeAutoCorrelation
is True, include autocorrelation "baselines" in the enumeration.
vector<uInt> casacore::MSMetaData::nChans | ( | ) | const |
uInt casacore::MSMetaData::nDataDescriptions | ( | ) | const |
get the number of data description IDs (from the DATA_DESCRIPTION table)
uInt casacore::MSMetaData::nFields | ( | ) | const |
get the number of fields.
uInt casacore::MSMetaData::nObservations | ( | ) | const |
get the number of observations (from the OBSERVATIONS table) in the dataset
uInt casacore::MSMetaData::nPol | ( | ) |
uInt casacore::MSMetaData::nRows | ( | ) | const |
get the number of visibilities
uInt casacore::MSMetaData::nRows | ( | CorrelationType | cType | ) |
uInt casacore::MSMetaData::nRows | ( | CorrelationType | cType, |
Int | arrayID, | ||
Int | observationID, | ||
Int | scanNumber, | ||
Int | fieldID | ||
) | const |
uInt casacore::MSMetaData::nRows | ( | CorrelationType | cType, |
uInt | fieldID | ||
) | const |
uInt casacore::MSMetaData::nScans | ( | ) |
get the number of scans in the dataset
uInt casacore::MSMetaData::nStates | ( | ) | const |
number of unique states (number of rows from the STATE table)
Double casacore::MSMetaData::nUnflaggedRows | ( | ) | const |
get the number of unflagged rows
Double casacore::MSMetaData::nUnflaggedRows | ( | CorrelationType | cType | ) | const |
Double casacore::MSMetaData::nUnflaggedRows | ( | CorrelationType | cType, |
Int | arrayID, | ||
uInt | observationID, | ||
Int | scanNumber, | ||
uInt | fieldID | ||
) | const |
Double casacore::MSMetaData::nUnflaggedRows | ( | CorrelationType | cType, |
Int | fieldID | ||
) | const |
uInt casacore::MSMetaData::nUniqueSourceIDsFromSourceTable | ( | ) | const |
Number of unique values from SOURCE.SOURCE_ID.
|
private |
MDirection casacore::MSMetaData::phaseDirFromFieldIDAndTime | ( | const uInt | fieldID, |
const MEpoch & | ep = MEpoch(Quantity(0.0, Unit("s"))) |
||
) | const |
Get the phase direction for a given field id and epoch interpolate polynomial if it is the field id is such or use ephemerides table if that is attached to that field id.
|
inline |
If True, force the subscan properties structure to be cached regardless of the stipulations on the maximum cache.
Normally, the subscan properties structure is small compared to the size of any one column that is necessary to create it, and since creating this structure can be very expensive, especially for large datasets, it is often a good idea to cache it if it will be accessed many times.
Definition at line 516 of file MSMetaData.h.
References _forceSubScanPropsToCache.
|
inline |
Definition at line 661 of file MSMetaData.h.
References _showProgress.
|
mutableprivate |
Definition at line 770 of file MSMetaData.h.
|
mutableprivate |
Definition at line 755 of file MSMetaData.h.
Definition at line 735 of file MSMetaData.h.
|
mutableprivate |
Definition at line 769 of file MSMetaData.h.
|
mutableprivate |
Definition at line 768 of file MSMetaData.h.
|
mutableprivate |
Definition at line 783 of file MSMetaData.h.
|
mutableprivate |
Definition at line 787 of file MSMetaData.h.
|
mutableprivate |
Definition at line 745 of file MSMetaData.h.
|
mutableprivate |
Definition at line 725 of file MSMetaData.h.
Referenced by getCache().
Definition at line 759 of file MSMetaData.h.
|
mutableprivate |
Definition at line 758 of file MSMetaData.h.
|
mutableprivate |
Definition at line 730 of file MSMetaData.h.
|
mutableprivate |
Definition at line 730 of file MSMetaData.h.
|
mutableprivate |
Definition at line 753 of file MSMetaData.h.
|
mutableprivate |
Definition at line 796 of file MSMetaData.h.
|
private |
Definition at line 772 of file MSMetaData.h.
|
mutableprivate |
Definition at line 745 of file MSMetaData.h.
|
mutableprivate |
Definition at line 781 of file MSMetaData.h.
|
mutableprivate |
Definition at line 755 of file MSMetaData.h.
|
mutableprivate |
Definition at line 755 of file MSMetaData.h.
|
mutableprivate |
Definition at line 750 of file MSMetaData.h.
Definition at line 747 of file MSMetaData.h.
Definition at line 747 of file MSMetaData.h.
|
mutableprivate |
Definition at line 753 of file MSMetaData.h.
Definition at line 731 of file MSMetaData.h.
Definition at line 733 of file MSMetaData.h.
Definition at line 765 of file MSMetaData.h.
Definition at line 780 of file MSMetaData.h.
|
mutableprivate |
Definition at line 779 of file MSMetaData.h.
Referenced by setForceSubScanPropsToCache().
Definition at line 739 of file MSMetaData.h.
Definition at line 740 of file MSMetaData.h.
Definition at line 762 of file MSMetaData.h.
|
mutableprivate |
Definition at line 741 of file MSMetaData.h.
Definition at line 763 of file MSMetaData.h.
|
private |
Definition at line 726 of file MSMetaData.h.
Referenced by getMaxCacheSizeMB().
|
private |
The general pattern is that a mutable gets set only once, on demand, when its setter is called for the first time.
If this pattern is broken, defective behavior will occur.
Definition at line 723 of file MSMetaData.h.
Referenced by getMS().
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 781 of file MSMetaData.h.
|
mutableprivate |
Definition at line 773 of file MSMetaData.h.
|
mutableprivate |
Definition at line 773 of file MSMetaData.h.
|
mutableprivate |
Definition at line 727 of file MSMetaData.h.
|
mutableprivate |
Definition at line 755 of file MSMetaData.h.
|
mutableprivate |
Definition at line 768 of file MSMetaData.h.
|
mutableprivate |
Definition at line 755 of file MSMetaData.h.
|
mutableprivate |
Definition at line 752 of file MSMetaData.h.
|
mutableprivate |
Definition at line 791 of file MSMetaData.h.
|
mutableprivate |
Definition at line 755 of file MSMetaData.h.
Definition at line 793 of file MSMetaData.h.
|
mutableprivate |
Definition at line 784 of file MSMetaData.h.
|
mutableprivate |
Definition at line 736 of file MSMetaData.h.
|
mutableprivate |
Definition at line 742 of file MSMetaData.h.
Definition at line 732 of file MSMetaData.h.
Definition at line 729 of file MSMetaData.h.
Definition at line 732 of file MSMetaData.h.
Definition at line 748 of file MSMetaData.h.
Definition at line 729 of file MSMetaData.h.
Definition at line 732 of file MSMetaData.h.
|
mutableprivate |
Definition at line 786 of file MSMetaData.h.
|
mutableprivate |
Definition at line 761 of file MSMetaData.h.
|
mutableprivate |
Definition at line 757 of file MSMetaData.h.
|
private |
Definition at line 724 of file MSMetaData.h.
Referenced by setShowProgress().
|
mutableprivate |
Definition at line 781 of file MSMetaData.h.
|
mutableprivate |
Definition at line 791 of file MSMetaData.h.
|
mutableprivate |
Definition at line 795 of file MSMetaData.h.
|
mutableprivate |
Definition at line 755 of file MSMetaData.h.
Definition at line 797 of file MSMetaData.h.
Definition at line 733 of file MSMetaData.h.
|
mutableprivate |
Definition at line 751 of file MSMetaData.h.
|
mutableprivate |
Definition at line 779 of file MSMetaData.h.
Definition at line 734 of file MSMetaData.h.
|
mutableprivate |
Definition at line 752 of file MSMetaData.h.
|
mutableprivate |
Definition at line 750 of file MSMetaData.h.
|
mutableprivate |
Definition at line 753 of file MSMetaData.h.
|
mutableprivate |
Definition at line 745 of file MSMetaData.h.
Definition at line 733 of file MSMetaData.h.
|
mutableprivate |
Definition at line 750 of file MSMetaData.h.
|
mutableprivate |
Definition at line 755 of file MSMetaData.h.
|
mutableprivate |
Definition at line 737 of file MSMetaData.h.
|
mutableprivate |
Definition at line 785 of file MSMetaData.h.
|
mutableprivate |
Definition at line 749 of file MSMetaData.h.
|
mutableprivate |
Definition at line 746 of file MSMetaData.h.
|
mutableprivate |
Definition at line 746 of file MSMetaData.h.
|
private |
Definition at line 776 of file MSMetaData.h.
|
private |
Definition at line 777 of file MSMetaData.h.
|
mutableprivate |
Definition at line 745 of file MSMetaData.h.
Definition at line 789 of file MSMetaData.h.
Definition at line 766 of file MSMetaData.h.
|
mutableprivate |
Definition at line 774 of file MSMetaData.h.
|
mutableprivate |
Definition at line 774 of file MSMetaData.h.
|
mutableprivate |
Definition at line 775 of file MSMetaData.h.
|
mutableprivate |
Definition at line 775 of file MSMetaData.h.
|
mutableprivate |
Definition at line 744 of file MSMetaData.h.
Definition at line 771 of file MSMetaData.h.
|
mutableprivate |
Definition at line 745 of file MSMetaData.h.
|
mutableprivate |
Definition at line 744 of file MSMetaData.h.
|
mutableprivate |
Definition at line 743 of file MSMetaData.h.
|
mutableprivate |
Definition at line 744 of file MSMetaData.h.
|
mutableprivate |
Definition at line 745 of file MSMetaData.h.