Loading...
Searching...
No Matches
MSMetaData.h
Go to the documentation of this file.
//# MSMetaData.h
//# Copyright (C) 1998,1999,2000,2001
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
#ifndef MS_MSMETADATA_H
#define MS_MSMETADATA_H
#include <casacore/casa/aips.h>
#include <casacore/casa/Quanta/QVector.h>
#include <casacore/measures/Measures/MFrequency.h>
#include <casacore/measures/Measures/MPosition.h>
#include <casacore/ms/MeasurementSets/MeasurementSet.h>
#include <casacore/ms/MeasurementSets/MSPointingColumns.h>
#include <casacore/tables/Tables/TableProxy.h>
#include <map>
#include <memory>
namespace casacore {
template <class T> class ArrayColumn;
struct ArrayKey;
struct ScanKey;
struct SourceKey;
struct SubScanKey;
// <summary>
// 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.
// </summary>
class MSMetaData {
public:
// for retrieving stats
enum CorrelationType {
AUTO,
CROSS,
BOTH
};
enum SQLDSwitch {
SQLD_INCLUDE,
SQLD_EXCLUDE,
SQLD_ONLY
};
struct TimeStampProperties {
std::set<Int> ddIDs;
rownr_t nrows;
};
struct ColumnStats {
Double max;
Double median;
Double min;
};
typedef std::map<Int, std::pair<Double, Quantity> > FirstExposureTimeMap;
struct SubScanProperties {
// number of auto-correlation rows
rownr_t acRows;
// number of cross-correlation rows.
rownr_t xcRows;
std::set<Int> antennas;
Double beginTime;
std::set<uInt> ddIDs;
Double endTime;
// the key is the spwID, the value is the meanInterval for
// the subscan and that spwID
std::map<uInt, Quantity> meanInterval;
// The Int represents the data description ID,
// The Double represents the time of the first time stamp,
// The Quantity represents the exposure time for the corresponding
// data description ID and time stamp
FirstExposureTimeMap firstExposureTime;
Quantity meanExposureTime;
std::set<uInt> spws;
// number of rows for each spectral window
std::map<uInt, rownr_t> spwNRows;
std::set<Int> stateIDs;
std::map<Double, TimeStampProperties> timeProps;
};
// 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.
// <src>maxCacheSizeMB</src> 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.
MSMetaData(const MeasurementSet *const &ms, const Float maxCacheSizeMB);
virtual ~MSMetaData();
// get the antenna diameters
QVD getAntennaDiameters() const;
// if the antenna name appears multiple times in the antenna table, the *last* ID
// that it is associated with is returned.
uInt getAntennaID(const String& antennaName) const;
// get all the antenna IDs for the antenna with the specified name.
std::set<uInt> getAntennaIDs(const String& antennaName) const;
// The returned IDs are ordered in the way they appear in the atenna table
vector<std::set<uInt> > getAntennaIDs(const vector<String>& antennaNames) 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> getAntennaNames(
std::map<String, uInt>& namesToIDsMap,
const vector<uInt>& antennaIDs=vector<uInt>(0)
) const;
vector<String> getAntennaNames(
std::map<String, std::set<uInt> >& namesToIDsMap,
const vector<uInt>& antennaIDs=vector<uInt>(0)
) const;
// get the antenna stations for the specified antenna IDs
vector<String> getAntennaStations(const vector<uInt>& antennaIDs=vector<uInt>());
// 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.
vector<std::vector<String> > getAntennaStations(const vector<String>& antennaNames);
// get the set of antenna IDs for the specified scan.
std::set<Int> getAntennasForScan(const ScanKey& scan) const;
// POLARIZATION.CORR_PRODUCT
vector<Array<Int> > getCorrProducts() const;
// POLARIZATION.CORR_TYPE
vector<vector<Int> > getCorrTypes() const;
vector<uInt> getDataDescIDToSpwMap() const;
vector<uInt> getDataDescIDToPolIDMap() const;
// Get the FIELD.SOURCE_ID column.
vector<Int> getFieldTableSourceIDs() const;
// get the mapping of field ID to scans
vector<std::set<ScanKey> > getFieldToScansMap() const;
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;
// get all intents, in no particular (nor guaranteed) order.
std::set<String> getIntents() const;
// get a set of intents corresponding to a specified field
std::set<String> getIntentsForField(Int fieldID);
// get a set of intents corresponding to a specified field name
std::set<String> getIntentsForField(String field);
// get a set of intents corresponding to the specified spectral window
std::set<String> getIntentsForSpw(const uInt spw);
// number of correlations from the polarization table.
vector<Int> getNumCorrs() const;
//SOURCE.PROPER_MOTION, first value in pair is longitudinal proper motion,
// second is latiduninal
vector<std::pair<Quantity, Quantity> > getProperMotions() const;
// get unique scan numbers
std::set<Int> getScanNumbers(Int obsID, Int arrayID) const;
// 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> getScansForState(
Int stateID, Int obsID, Int arrayID
) const;
// get the mapping of scans to states
std::map<ScanKey, std::set<Int> > getScanToStatesMap() const;
// SOURCE.DIRECTION
vector<MDirection> getSourceDirections() const;
// SOURCE.NAME
vector<String> getSourceNames() 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.
vector<Int> getSourceTableSourceIDs() const;
// SOURCE.TIME
std::shared_ptr<const Quantum<Vector<Double> > > getSourceTimes() const;
// get a set of spectral windows for which the specified <src>intent</src>
// applies.
virtual std::set<uInt> getSpwsForIntent(const String& intent);
// get the number of visibilities
rownr_t nRows() const;
rownr_t nRows(CorrelationType cType);
std::shared_ptr<const std::map<SubScanKey, rownr_t> > getNRowMap(CorrelationType type) const;
rownr_t nRows(
CorrelationType cType, Int arrayID, Int observationID,
Int scanNumber, Int fieldID
) const;
rownr_t nRows(CorrelationType cType, uInt fieldID) const;
// get number of spectral windows
uInt nSpw(Bool includewvr) const;
// number of unique states (number of rows from the STATE table)
uInt nStates() const;
// get the number of fields.
uInt nFields() const;
// get a mapping of spectral window ID to data descrption IDs
std::vector<std::set<uInt> > getSpwToDataDescriptionIDMap() const;
// get a set of spectral windows corresponding to the specified fieldID
std::set<uInt> getSpwsForField(const Int fieldID) const;
// get a set of spectral windows corresponding to the specified field name
std::set<uInt> getSpwsForField(const String& fieldName);
// get the values of the CODE column from the field table
vector<String> getFieldCodes() const;
// get the set of field IDs corresponding to the specified spectral window.
std::set<Int> getFieldIDsForSpw(const uInt spw);
// get the set of field names corresponding to the specified spectral window.
std::set<String> getFieldNamesForSpw(const uInt spw);
// get the mapping of fields to spws
std::map<Int, std::set<uInt> > getFieldsToSpwsMap() const;
// get rest frequencies from the SOURCE table
std::map<SourceKey, std::shared_ptr<vector<MFrequency> > > getRestFrequencies() const;
// get the set of spectral windows for the specified scan.
std::set<uInt> getSpwsForScan(const ScanKey& scan) const;
// get the set of spectral windows for the specified subscan.
std::set<uInt> getSpwsForSubScan(const SubScanKey& subScan) const;
// get the set of scan numbers for the specified spectral window.
std::set<Int> getScansForSpw(uInt spw, Int obsID, Int arrayID) const;
// get the complete mapping of scans to spws
std::map<ScanKey, std::set<uInt> > getScanToSpwsMap() const;
// get the complete mapping of spws to scans
std::vector<std::set<ScanKey> > getSpwToScansMap() const;
// get the transitions from the SOURCE table. If there are no transitions
// for a particular key, the shared ptr contains the null ptr.
std::map<SourceKey, std::shared_ptr<vector<String> > > getTransitions() const;
// get the number of antennas in the ANTENNA table
uInt nAntennas() const;
// ALMA-specific. get set of spectral windows used for TDM. These are windows that have
// 64, 128, or 256 channels
std::set<uInt> getTDMSpw();
// ALMA-specific. get set of spectral windows used for FDM. These are windows that do not
// have 1, 4, 64, 128, or 256 channels.
std::set<uInt> getFDMSpw();
// ALMA-specific. get spectral windows that have been averaged. These are windows with 1 channel.
std::set<uInt> getChannelAvgSpw();
// ALMA-specific. Get the spectral window set used for WVR measurements. These have 4 channels each.
std::set<uInt> getWVRSpw() const;
// ALMA-specific. Get the square law detector (total power) spectral windows.
std::set<uInt> getSQLDSpw();
// 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::set<Int> getScansForTimes(
Double center, Double tol, Int obsID, Int arrayID
) const;
// Get the times for the specified scans
std::set<Double> getTimesForScans(std::set<ScanKey> scans) const;
// get the times for the specified scan.
// The return values come from the TIME column.
std::set<Double> getTimesForScan(const ScanKey& scan) const;
std::map<uInt, std::set<Double> > getSpwToTimesForScan(const ScanKey& scan) 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))
std::pair<Double, Double> getTimeRangeForScan(const ScanKey& scanKey) const;
// get the map of scans to time ranges.
std::shared_ptr<const std::map<ScanKey, std::pair<Double,Double> > > getScanToTimeRangeMap() const;
// 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<Int> getStatesForScan(Int obsID, Int arrayID, Int scan) const;
// get a map of spectral windows to unique timestamps.
std::vector<std::set<Double> > getTimesForSpws(Bool showProgress=True) 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.
QVD getAntennaOffset(uInt which) const;
// If the antenna name appears mulitple times, this will return the offset for the first
// occurrence of it in the antenna table
QVD getAntennaOffset(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
std::vector<QVD> getAntennaOffsets(const String& name) const;
vector<QVD > getAntennaOffsets() const;
// get the positions of the specified antennas. If <src>which</src> is empty, return
// all antenna positions.
vector<MPosition> getAntennaPositions(
const vector<uInt>& which=std::vector<uInt>(0)
) const;
// <src>names</src> cannot be empty.
vector<vector<MPosition> > getAntennaPositions(const vector<String>& names);
// 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, 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 sub scan for that spw.
std::map<uInt, Quantity> getAverageIntervalsForSubScan(const SubScanKey& subScan) const;
vector<uInt> getBBCNos() const;
vector<String> getCorrBits() const;
std::map<uInt, std::set<uInt> > getBBCNosToSpwMap(SQLDSwitch sqldSwitch);
vector<vector<Double> > getEdgeChans();
//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
MDirection phaseDirFromFieldIDAndTime(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
MDirection getReferenceDirection(
const uInt fieldID,
const MEpoch& ep=MEpoch(Quantity(0.0, Unit("s")))
) const;
// get the field IDs for the specified field name. Case insensitive.
std::set<Int> getFieldIDsForField(const String& field) const;
// get a list of the field names in the order in which they appear in the
// FIELD table.
vector<String> getFieldNames() const;
// get field IDs associated with the specified scan number.
std::set<Int> getFieldsForScan(const ScanKey& scan) const;
// get the field IDs associated with the specified scans
std::set<Int> getFieldsForScans(
const std::set<Int>& scans, Int obsID, Int arrayID
) const;
// get the field IDs associated with the specified scans
std::set<Int> getFieldsForScans(const std::set<ScanKey>& scans) const;
// get the field IDs associated with the specified intent.
std::set<Int> getFieldsForIntent(const String& intent);
// get the field IDs associated with the specified source.
std::set<Int> getFieldsForIntent(uInt sourceID) const;
std::map<Int, std::set<Int> > getFieldsForSourceMap() const;
std::map<Int, std::set<String> > getFieldNamesForSourceMap() const;
// get the field names associated with the specified field IDs. If <src>fieldIDs</src>
// is empty, a vector of all the field names is returned.
vector<String> getFieldNamesForFieldIDs(const vector<uInt>& fieldIDs);
// Get the fields which fail into the specified time range (center-tol to center+tol)
std::set<Int> getFieldsForTimes(Double center, Double tol);
// max cache size in MB
Float getMaxCacheSizeMB() const { return _maxCacheMB; }
// get telescope names in the order they are listed in the OBSERVATION table. These are
// the telescopes (observatories), not the antenna names.
vector<String> getObservatoryNames();
// get the position of the specified telescope (observatory).
MPosition getObservatoryPosition(uInt which) const;
// get the phase directions from the FIELD subtable. The <src>ep</src> parameter
// specifies for which epoch to return the directions of any ephemeris objects
// in the data set. It is ignored for non-ephemeris objects.
vector<MDirection> getPhaseDirs(const MEpoch& ep=MEpoch(Quantity(0.0, Unit("s")))) const;
// get all ScanKeys in the dataset
std::set<ScanKey> getScanKeys() const;
// get all ScanKeys in the dataset that have the specified <src>arrayKey</src>.
// If negative values for either the obsID and/or arrayID portions of the ArrayKey
// indicate that all obsIDs and/or arrayIDs should be used.
std::set<ScanKey> getScanKeys(const ArrayKey& arrayKey) const;
// get the scans associated with the specified intent
std::set<Int> getScansForIntent(
const String& intent, Int obsID, Int arrayID
) const;
// get the scan numbers associated with the specified field ID.
std::set<Int> getScansForFieldID(Int fieldID, Int obsID, Int arrayID) const;
// get the scan numbers associated with the specified field. Subclasses should not implement or override.
std::set<Int> getScansForField(const String& field, Int obsID, Int arrayID) const;
// The first value of the pair is spw, the second is polarization ID.
std::map<std::pair<uInt, uInt>, uInt> getSpwIDPolIDToDataDescIDMap() const;
// get a map of the spwIDs to spw names from the spw table
vector<String> getSpwNames() 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.
std::set<uInt> getSpwIDs() const;
// get all sub scan keys for the specified array key.
std::set<SubScanKey> getSubScanKeys(const ArrayKey& arrayKey) const;
// get the sub scan properties for the specified sub scan.
SubScanProperties getSubScanProperties(
const SubScanKey& subScan, Bool showProgress=False
) const;
std::shared_ptr<const std::map<SubScanKey, SubScanProperties> > getSubScanProperties(
Bool showProgress=False
) const;
// 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.
void setForceSubScanPropsToCache(Bool b) { _forceSubScanPropsToCache = b; }
// get a data structure, consumable by users, representing a summary of the dataset
Record getSummary() const;
// get the times for which the specified field was observed
std::set<Double> getTimesForField(Int fieldID);
// get the time stamps associated with the specified intent
std::set<Double> getTimesForIntent(const String& intent) const;
Bool hasBBCNo() const;
//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.
Matrix<Bool> getUniqueBaselines();
// get the number of unique baselines represented in the main MS table which in theory can be
// less than n*(n-1)/2. If <src>includeAutoCorrelation</src> is True, include autocorrelation
// "baselines" in the enumeration.
virtual uInt nBaselines(Bool includeAutoCorrelation=False);
// get the effective total exposure time. This is the effective time spent collecting unflagged data.
Quantity getEffectiveTotalExposureTime();
// get the number of scans in the dataset
uInt nScans();
// get the number of observations (from the OBSERVATIONS table) in the dataset
uInt nObservations() const;
// get the contents of the OBSERVER column from the OBSERVATIONS table
vector<String> getObservers() const;
// get the contents of the PROJECT column from the OBSERVATIONS table
vector<String> getProjects() const;
// get the contents of the SCHEDULE column from the OBSERVATIONS table
// Note that the embedded vectors may have different lengths
vector<vector<String> > getSchedules() const;
// get the time ranges from the OBSERVATION table
vector<std::pair<MEpoch, MEpoch> > getTimeRangesOfObservations() const;
// get the number of arrays (from the ARRAY table) in the dataset
uInt nArrays();
// get the number of data description IDs (from the DATA_DESCRIPTION table)
uInt nDataDescriptions() const;
// get the number of unflagged rows
Double nUnflaggedRows() const;
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;
inline Float getCache() const { return _cacheMB;}
vector<Double> getBandWidths() const;
vector<Quantity> 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> getChanEffectiveBWs(Bool asVelWidths) const;
vector<QVD > getChanFreqs() const;
// 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> getChanResolutions(Bool asVelWidths) const;
vector<QVD > getChanWidths() const;
vector<Quantity> getMeanFreqs() const;
vector<Int> getNetSidebands() const;
vector<MFrequency> getRefFreqs() const;
vector<uInt> nChans() const;
uInt nPol();
// 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::vector<std::map<Int, Quantity> > getFirstExposureTimeMap();
// get map of scans to first exposure times
std::map<ScanKey, FirstExposureTimeMap> getScanToFirstExposureTimeMap(Bool showProgress) const;
// get polarization IDs for the specified scan and spwid
std::set<uInt> getPolarizationIDs(uInt obsID, Int arrayID, Int scan, uInt spwid) const;
// get the unique antennas (the union of the ANTENNA_1 and ANTENNA_2 columns) from
// the main table
const std::set<Int>& getUniqueAntennaIDs() const;
// get unique data description IDs that exist in the main table
std::set<uInt> getUniqueDataDescIDs() const;
// DEPRECATED because of spelling error. Use getUniqueFieldIDs()
// instead.
inline std::set<Int> getUniqueFiedIDs() const {
return getUniqueFieldIDs();
}
// get unique field IDs that exist in the main table.
std::set<Int> getUniqueFieldIDs() const;
// get the pointing directions associated with antenna1 and antenna2 for
// the specified row of the main MS table
std::pair<MDirection, MDirection> getPointingDirection(
Int& ant1, Int& ant2, Double& time, rownr_t row,
Bool interpolate=false, Int initialguess=0
) const;
// 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> getTimeRange(Bool showProgress=False) const;
// Number of unique values from SOURCE.SOURCE_ID
uInt nUniqueSourceIDsFromSourceTable() const;
// get the unique spectral window IDs represented by the data description
// IDs that appear in the main table
std::set<uInt> getUniqueSpwIDs() const;
const MeasurementSet* getMS() const { return _ms; }
void setShowProgress(Bool b) { _showProgress = b; }
// 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.
ColumnStats getIntervalStatistics() const;
// ALMA specific CAS-13973 get receiver bands for each spw
// values of -1 indicate no info found for those spws.
vector<int> getSpwReceiverBands() const;
// ALMA specific CAS-13973 get subwindows for each spw
// values of -1 indicate no info found for those spws.
// The SPW subwindow name is established by the ALMA Observing
// Tool and is recorded in each project's scheduling blocks.
// Here is an example for one spw whose subwindow name is
// "SW-1", as indicated by the name field. Currently, these
// values can range up to "SW-4", as a maximumn of 4 spws per
// baseband are currently offered on the ALMA correlators.
//
// <sbl:ACASpectralWindow sideBand="LSB"
// windowFunction="HANNING" polnProducts="XX,YY" synthProf="ACA_CDP">
// <sbl:centerFrequency unit="GHz">3.0</sbl:centerFrequency>
// <sbl:spectralAveragingFactor>1</sbl:spectralAveragingFactor>
// <sbl:name>SW-1</sbl:name>
// <sbl:effectiveBandwidth unit="GHz">2.0</sbl:effectiveBandwidth>
// <sbl:effectiveNumberOfChannels>128</sbl:effectiveNumberOfChannels>
// <sbl:associatedSpectralWindowNumberInPair>0</sbl:associatedSpectralWindowNumberInPair>
// <sbl:useThisSpectralWindow>true</sbl:useThisSpectralWindow>
// <sbl:representativeWindow>false</sbl:representativeWindow>
// <sbl:frqChProfReproduction>true</sbl:frqChProfReproduction>
// <sbl:ChannelAverageRegion>
// <sbl:startChannel>6</sbl:startChannel>
// <sbl:numberChannels>115</sbl:numberChannels>
// </sbl:ChannelAverageRegion>
// </sbl:ACASpectralWindow>
vector<int> getSpwSubwindows() const;
private:
struct ScanProperties {
// The Int represents the data description ID,
// The Double represents the time of the first time stamp,
// The Quantity represents the exposure time for the corresponding
// data description ID and time stamp
FirstExposureTimeMap firstExposureTime;
// the key is the spwID, the value is the meanInterval for
// the subscan and that spwID
std::map<uInt, Quantity> meanInterval;
// number of rows for each spectral window
std::map<uInt, rownr_t> spwNRows;
// time range (which takes into account helf of the corresponding
// interval, which is not accounted for in the SubScanProperties times
std::pair<Double, Double> timeRange;
// times for each spectral window
std::map<uInt, std::set<double> > times;
};
struct SpwProperties {
double bandwidth;
QVD chanfreqs;
QVD chanwidths;
int netsideband;
// The sum of all channel frequencies divided by the number of channels
Quantity meanfreq;
// The mean of the low frequency extent of the lowest frequency channel and
// the high frequency extend of the highest frequency channel. Often, but not
// necessarily, the same as meanfreq
Quantity centerfreq;
uInt nchans;
// The center frequencies of the two channels at the edges of the window
vector<double> edgechans;
uInt bbcno;
// from the REF_FREQUENCY column
MFrequency reffreq;
String name;
// EFFECTIVE_BANDWIDTH
QVD effbw;
// RESOLUTION
QVD resolution;
// CAS-13749 value for adhoc ALMA-specific SPECTRAL_WINDOW column
String corrbit;
// CAS-13973 ALMA specific quantities sw = subwindow, rb = receiver band
int rb;
int sw;
};
// represents non-primary key data for a SOURCE table row
struct SourceProperties {
String name;
std::shared_ptr<vector<MFrequency> > restfreq;
std::shared_ptr<vector<String> > transition;
};
// 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.
const MeasurementSet* _ms;
Bool _showProgress;
mutable Float _cacheMB;
const Float _maxCacheMB;
mutable rownr_t _nACRows, _nXCRows;
mutable uInt _nStates, _nSpw, _nFields, _nAntennas,
_nObservations, _nScans, _nArrays, _nrows, _nPol, _nDataDescIDs;
mutable std::map<ScanKey, std::set<uInt> > _scanToSpwsMap, _scanToDDIDsMap;
mutable vector<uInt> _dataDescIDToSpwMap, _dataDescIDToPolIDMap;
mutable std::map<Int, std::set<uInt> > _fieldToSpwMap;
mutable std::map<ScanKey, std::set<Int> > _scanToStatesMap, _scanToFieldsMap, _scanToAntennasMap;
mutable std::map<Int, std::set<Int> > _fieldToStatesMap, _stateToFieldsMap, _sourceToFieldsMap;
mutable std::map<std::pair<uInt, uInt>, uInt> _spwPolIDToDataDescIDMap;
mutable std::vector<std::vector<uInt>> _spwIDToPolIDMap;
mutable std::map<String, std::set<uInt> > _antennaNameToIDMap;
mutable std::shared_ptr<const std::map<ScanKey, ScanProperties> > _scanProperties;
mutable std::shared_ptr<const std::map<SubScanKey, SubScanProperties> > _subScanProperties;
mutable std::map<String, std::set<Int> > _intentToFieldIDMap;
mutable std::map<String, std::set<ScanKey> > _intentToScansMap;
mutable std::map<String, std::set<SubScanKey> > _intentToSubScansMap;
mutable std::map<std::pair<ScanKey, uInt>, std::set<uInt> > _scanSpwToPolIDMap;
mutable std::set<String> _uniqueIntents;
mutable std::set<Int> _uniqueFieldIDs, _uniqueStateIDs, _uniqueAntennaIDs;
mutable std::set<uInt> _avgSpw, _tdmSpw, _fdmSpw, _wvrSpw, _sqldSpw, _uniqueDataDescIDs;
mutable std::shared_ptr<std::map<SubScanKey, rownr_t> > _subScanToNACRowsMap, _subScanToNXCRowsMap;
mutable std::shared_ptr<std::map<Int, rownr_t> > _fieldToNACRowsMap, _fieldToNXCRowsMap;
mutable std::map<ScanKey, std::set<String> > _scanToIntentsMap;
mutable std::shared_ptr<const std::map<SubScanKey, std::set<String> > > _subScanToIntentsMap;
mutable vector<std::set<String> > _stateToIntentsMap, _spwToIntentsMap, _fieldToIntentsMap;
mutable vector<SpwProperties> _spwInfo;
mutable vector<std::set<Int> > _spwToFieldIDsMap, _obsToArraysMap;
mutable vector<std::set<ScanKey> > _spwToScansMap, _ddidToScansMap, _fieldToScansMap;
mutable vector<String> _fieldNames, _antennaNames, _observatoryNames,
_stationNames, _observers, _projects, _sourceNames, _fieldCodes;
mutable vector<vector<String> > _schedules;
mutable vector<vector<Int> > _corrTypes;
mutable vector<Array<Int> >_corrProds;
mutable std::shared_ptr<std::map<ScanKey, std::set<Double> > > _scanToTimesMap;
std::map<String, std::set<uInt> > _intentToSpwsMap;
mutable std::map<String, std::set<Double> > _intentToTimesMap;
std::shared_ptr<std::map<Int, std::set<Double> > > _fieldToTimesMap;
std::shared_ptr<std::map<Double, std::set<Int> > > _timeToFieldsMap;
mutable vector<MPosition> _observatoryPositions, _antennaPositions;
mutable vector<QVD > _antennaOffsets;
mutable QVD _antennaDiameters;
Matrix<Bool> _uniqueBaselines;
Quantity _exposureTime;
mutable Double _nUnflaggedACRows, _nUnflaggedXCRows;
mutable std::shared_ptr<vector<Double> > _unflaggedFieldNACRows, _unflaggedFieldNXCRows;
mutable std::shared_ptr<std::map<SubScanKey, Double> > _unflaggedSubScanNACRows, _unflaggedSubScanNXCRows;
const String _taqlTableName;
const vector<const Table*> _taqlTempTable;
mutable Bool _spwInfoStored, _forceSubScanPropsToCache;
vector<std::map<Int, Quantity> > _firstExposureTimeMap;
mutable vector<Int> _numCorrs, _source_sourceIDs, _field_sourceIDs;
mutable std::set<ArrayKey> _arrayKeys;
mutable std::set<ScanKey> _scanKeys;
mutable std::set<SubScanKey> _subscans;
mutable std::map<ScanKey, std::set<SubScanKey> > _scanToSubScans;
mutable std::map<ArrayKey, std::set<SubScanKey> > _arrayToSubScans;
mutable vector<std::pair<MEpoch, MEpoch> > _timeRangesForObs;
mutable vector<MDirection> _phaseDirs, _sourceDirs;
mutable vector<std::pair<Quantity, Quantity> > _properMotions;
mutable std::map<SourceKey, SourceProperties> _sourceInfo;
mutable std::shared_ptr<std::set<Int> > _ephemFields;
mutable std::shared_ptr<const Quantum<Vector<Double> > > _sourceTimes;
// disallow copy constructor and = operator
MSMetaData(const MSMetaData&);
MSMetaData operator =(const MSMetaData&);
// 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();
void _setSpwInfo(const MeasurementSet& ms);
// set metadata from OBSERVATION table
void _setObservation(const MeasurementSet& ms);
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;
static void _checkTolerance(const Double tol);
void _computeScanAndSubScanProperties(
std::shared_ptr<std::map<ScanKey, MSMetaData::ScanProperties> >& scanProps,
std::shared_ptr<std::map<SubScanKey, MSMetaData::SubScanProperties> >& subScanProps,
Bool showProgress
) const;
static void _getScalarIntColumn(
Vector<Int>& v, TableProxy& table, const String& colname,
rownr_t beginRow, rownr_t nrows
);
static void _getScalarDoubleColumn(
Vector<Double>& v, TableProxy& table, const String& colname,
rownr_t beginRow, rownr_t nrows
);
static void _getScalarQuantDoubleColumn(
Quantum<Vector<Double> >& v, TableProxy& table, const String& colname,
rownr_t beginRow, rownr_t nrows
);
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, rownr_t& scanNRows, std::set<Int>& antennasForScan,
const ScanKey& scanKey, const std::map<SubScanKey, SubScanProperties>& subScanProps
) const;
static void _createTimeStampRecords(
Record& parent,
const SubScanProperties& subScanProps
);
// 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.
static QVD _freqWidthToVelWidth(const QVD& v, const Quantity& refFreq);
// 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.
std::shared_ptr<const std::map<ScanKey, ScanProperties> > _generateScanPropsIfWanted() const;
// 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.
std::shared_ptr<const std::map<SubScanKey, SubScanProperties> >
_generateSubScanPropsIfWanted() const;
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;
// Uses openmp for parallel processing
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>& times, 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,
rownr_t beginRow, rownr_t endRow
) const;
std::shared_ptr<Vector<Int> > _getDataDescIDs() const;
// get the field IDs of ephemeris objects
std::shared_ptr<std::set<Int> > _getEphemFieldIDs() const;
std::shared_ptr<Quantum<Vector<Double> > > _getExposureTimes() const;
std::shared_ptr<Vector<Int> > _getFieldIDs() const;
// 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
void _getFieldsAndIntentsMaps(
vector<std::set<String> >& fieldToIntentsMap,
std::map<String, std::set<Int> >& intentToFieldsMap
);
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> > >& timesToFieldMap
);
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();
// polarization ids will be sorted in ascending order in all
// member vectors
std::vector<std::vector<uInt>> _getSpwToPolMap() const;
std::shared_ptr<Vector<Int> > _getStateIDs() const;
std::shared_ptr<Vector<Double> > _getTimes() const;
//std::shared_ptr<std::map<Double, TimeStampProperties> > _getTimeStampProperties() const;
Bool _hasIntent(const String& intent) const;
Bool _hasFieldID(Int fieldID) const;
Bool _hasStateID(Int stateID) const;
void _hasAntennaID(Int antennaID);
std::map<Double, Double> _getTimeToTotalBWMap(
const Vector<Double>& times, const Vector<Int>& ddIDs
);
MDirection _getInterpolatedDirection(
const MSPointingColumns& pCols, const Int& index,
const Double& time
) const;
//map<SubScanKey, Quantity> _getMeanExposureTimes() const;
vector<std::set<Int> > _getObservationIDToArrayIDsMap() const;
vector<MPosition> _getObservatoryPositions();
void _getRowStats(
rownr_t& nACRows, rownr_t& nXCRows,
std::map<SubScanKey, rownr_t>*& subScanToNACRowsMap,
std::map<SubScanKey, rownr_t>*& subScanToNXCRowsMap,
std::map<Int, rownr_t>*& fieldToNACRowsMap,
std::map<Int, rownr_t>*& fieldToNXCRowsMap
) const;
void _getRowStats(
rownr_t& nACRows, rownr_t& nXCRows,
std::shared_ptr<std::map<SubScanKey, rownr_t> >& scanToNACRowsMap,
std::shared_ptr<std::map<SubScanKey, rownr_t> >& scanToNXCRowsMap,
std::shared_ptr<std::map<Int, rownr_t> >& fieldToNACRowsMap,
std::shared_ptr<std::map<Int, rownr_t> >& fieldToNXCRowsMap
) const;
// get scan properties
std::shared_ptr<const std::map<ScanKey, MSMetaData::ScanProperties> > _getScanProperties(
Bool showProgress
) const;
// get the scan keys in the specified set that have the associated arrayKey
std::set<ScanKey> _getScanKeys(
const std::set<ScanKey>& scanKeys, const ArrayKey& arrayKey
) const;
// get all valid scan numbers associated with the specified arrayKey
std::set<Int> _getScanNumbers(const ArrayKey& arrayKey) const;
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;
// get subscans related to the given scan
std::set<SubScanKey> _getSubScanKeys(const ScanKey& scanKey) const;
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;
static void _modifyFirstExposureTimeIfNecessary(
FirstExposureTimeMap& current, const FirstExposureTimeMap& test
);
static void _modifyFirstExposureTimeIfNecessary(
FirstExposureTimeMap& current, 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);
template <class T> std::shared_ptr<Vector<T> > _getMainScalarColumn(
MSMainEnums::PredefinedColumns col
) const;
std::shared_ptr<vector<int>> _almaReceiverBands(uint nspw) const;
};
}
#endif
casacore::type
casacore::ArrayColumn
Definition ArrayColumn.h:98
casacore::MDirection
Definition MDirection.h:171
casacore::MEpoch
Definition MEpoch.h:101
casacore::MFrequency
Definition MFrequency.h:158
casacore::MPosition
Definition MPosition.h:76
casacore::MSMainEnums::PredefinedColumns
PredefinedColumns
The Main table colums with predefined meaning.
Definition MSMainEnums.h:62
casacore::MSMetaData::getPointingDirection
std::pair< MDirection, MDirection > getPointingDirection(Int &ant1, Int &ant2, Double &time, rownr_t row, Bool interpolate=false, Int initialguess=0) const
get the pointing directions associated with antenna1 and antenna2 for the specified row of the main M...
casacore::MSMetaData::_hasIntent
Bool _hasIntent(const String &intent) const
std::shared_ptr<std::map<Double, TimeStampProperties> > _getTimeStampProperties() const;
casacore::MSMetaData::getObservatoryPosition
MPosition getObservatoryPosition(uInt which) const
get the position of the specified telescope (observatory).
casacore::MSMetaData::_getFieldsAndTimesMaps
void _getFieldsAndTimesMaps(std::shared_ptr< std::map< Int, std::set< Double > > > &fieldToTimesMap, std::shared_ptr< std::map< Double, std::set< Int > > > &timesToFieldMap)
casacore::MSMetaData::_getFlags
std::shared_ptr< ArrayColumn< Bool > > _getFlags() const
casacore::MSMetaData::getProperMotions
vector< std::pair< Quantity, Quantity > > getProperMotions() const
SOURCE.PROPER_MOTION, first value in pair is longitudinal proper motion, second is latiduninal.
casacore::MSMetaData::_numCorrs
vector< Int > _numCorrs
Definition MSMetaData.h:819
casacore::MSMetaData::_uniqueAntennaIDs
std::set< Int > _uniqueAntennaIDs
Definition MSMetaData.h:782
casacore::MSMetaData::_getTimeToTotalBWMap
std::map< Double, Double > _getTimeToTotalBWMap(const Vector< Double > &times, const Vector< Int > &ddIDs)
casacore::MSMetaData::nObservations
uInt nObservations() const
get the number of observations (from the OBSERVATIONS table) in the dataset
casacore::MSMetaData::getSpwToTimesForScan
std::map< uInt, std::set< Double > > getSpwToTimesForScan(const ScanKey &scan) const
casacore::MSMetaData::_getAntennaNames
vector< String > _getAntennaNames(std::map< String, std::set< uInt > > &namesToIDsMap) const
casacore::MSMetaData::getCenterFreqs
vector< Quantity > getCenterFreqs() const
casacore::MSMetaData::nSpw
uInt nSpw(Bool includewvr) const
get number of spectral windows
casacore::MSMetaData::_sourceTimes
std::shared_ptr< const Quantum< Vector< Double > > > _sourceTimes
Definition MSMetaData.h:835
casacore::MSMetaData::getScansForSpw
std::set< Int > getScansForSpw(uInt spw, Int obsID, Int arrayID) const
get the set of scan numbers for the specified spectral window.
casacore::MSMetaData::_createSubScanRecords
void _createSubScanRecords(Record &parent, rownr_t &scanNRows, std::set< Int > &antennasForScan, const ScanKey &scanKey, const std::map< SubScanKey, SubScanProperties > &subScanProps) const
casacore::MSMetaData::_getTimes
std::shared_ptr< Vector< Double > > _getTimes() const
casacore::MSMetaData::_subScanToNXCRowsMap
std::shared_ptr< std::map< SubScanKey, rownr_t > > _subScanToNXCRowsMap
Definition MSMetaData.h:784
casacore::MSMetaData::phaseDirFromFieldIDAndTime
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 i...
casacore::MSMetaData::nUniqueSourceIDsFromSourceTable
uInt nUniqueSourceIDsFromSourceTable() const
Number of unique values from SOURCE.SOURCE_ID.
casacore::MSMetaData::MSMetaData
MSMetaData(const MSMetaData &)
disallow copy constructor and = operator
casacore::MSMetaData::_getUnflaggedRowStats
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
casacore::MSMetaData::_getMainScalarColumn
std::shared_ptr< Vector< T > > _getMainScalarColumn(MSMainEnums::PredefinedColumns col) const
casacore::MSMetaData::getAntennasForScan
std::set< Int > getAntennasForScan(const ScanKey &scan) const
get the set of antenna IDs for the specified scan.
casacore::MSMetaData::getFieldIDsForField
std::set< Int > getFieldIDsForField(const String &field) const
get the field IDs for the specified field name.
casacore::MSMetaData::_sizeof
static uInt _sizeof(const vector< std::set< T > > &v)
casacore::MSMetaData::_scanToSubScans
std::map< ScanKey, std::set< SubScanKey > > _scanToSubScans
Definition MSMetaData.h:824
casacore::MSMetaData::nChans
vector< uInt > nChans() const
casacore::MSMetaData::_getSpwToPolMap
std::vector< std::vector< uInt > > _getSpwToPolMap() const
polarization ids will be sorted in ascending order in all member vectors
casacore::MSMetaData::_nXCRows
rownr_t _nXCRows
Definition MSMetaData.h:763
casacore::MSMetaData::_checkScan
void _checkScan(const ScanKey &key) const
casacore::MSMetaData::getAntennaOffset
QVD getAntennaOffset(const String &name) const
If the antenna name appears mulitple times, this will return the offset for the first occurrence of i...
casacore::MSMetaData::getIntentsForField
std::set< String > getIntentsForField(Int fieldID)
get a set of intents corresponding to a specified field
casacore::MSMetaData::nStates
uInt nStates() const
number of unique states (number of rows from the STATE table)
casacore::MSMetaData::_getScansAndDDIDMaps
void _getScansAndDDIDMaps(std::map< ScanKey, std::set< uInt > > &scanToDDIDMap, vector< std::set< ScanKey > > &ddIDToScanMap) const
casacore::MSMetaData::getSpwToScansMap
std::vector< std::set< ScanKey > > getSpwToScansMap() const
get the complete mapping of spws to scans
casacore::MSMetaData::_observers
vector< String > _observers
Definition MSMetaData.h:794
casacore::MSMetaData::_getDataDescIDs
std::shared_ptr< Vector< Int > > _getDataDescIDs() const
casacore::MSMetaData::getUniqueBaselines
Matrix< Bool > getUniqueBaselines()
std::map<Double, Double> getExposuresForTimes() const;
casacore::MSMetaData::_taqlTempTable
const vector< const Table * > _taqlTempTable
Definition MSMetaData.h:815
casacore::MSMetaData::_avgSpw
std::set< uInt > _avgSpw
Definition MSMetaData.h:783
casacore::MSMetaData::_sizeof
static uInt _sizeof(const std::map< std::pair< Int, uInt >, std::set< uInt > > &map)
casacore::MSMetaData::getEdgeChans
vector< vector< Double > > getEdgeChans()
casacore::MSMetaData::getAntennaOffset
QVD getAntennaOffset(uInt which) const
get the position of the specified antenna relative to the observatory position.
casacore::MSMetaData::getNumCorrs
vector< Int > getNumCorrs() const
number of correlations from the polarization table.
casacore::MSMetaData::nBaselines
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 ...
casacore::MSMetaData::getSpwIDs
std::set< uInt > getSpwIDs() const
get all the spws associated with the data description IDs listed in the main table.
casacore::MSMetaData::_spwInfo
vector< SpwProperties > _spwInfo
Definition MSMetaData.h:789
casacore::MSMetaData::getRefFreqs
vector< MFrequency > getRefFreqs() const
casacore::MSMetaData::_almaReceiverBands
std::shared_ptr< vector< int > > _almaReceiverBands(uint nspw) const
casacore::MSMetaData::nUnflaggedRows
Double nUnflaggedRows(CorrelationType cType) const
casacore::MSMetaData::getMS
const MeasurementSet * getMS() const
Definition MSMetaData.h:659
casacore::MSMetaData::getScanToTimeRangeMap
std::shared_ptr< const std::map< ScanKey, std::pair< Double, Double > > > getScanToTimeRangeMap() const
get the map of scans to time ranges.
casacore::MSMetaData::_maxCacheMB
const Float _maxCacheMB
Definition MSMetaData.h:762
casacore::MSMetaData::setShowProgress
void setShowProgress(Bool b)
Definition MSMetaData.h:661
casacore::MSMetaData::nRows
rownr_t nRows(CorrelationType cType, Int arrayID, Int observationID, Int scanNumber, Int fieldID) const
casacore::MSMetaData::_getIntentsToTimesMap
std::map< String, std::set< Double > > _getIntentsToTimesMap() const
casacore::MSMetaData::_getFieldsAndScansMaps
void _getFieldsAndScansMaps(vector< std::set< ScanKey > > &fieldToScansMap, std::map< ScanKey, std::set< Int > > &scanToFieldsMap) const
casacore::MSMetaData::_ddidToScansMap
vector< std::set< ScanKey > > _ddidToScansMap
Definition MSMetaData.h:791
casacore::MSMetaData::getAntennaID
uInt getAntennaID(const String &antennaName) const
if the antenna name appears multiple times in the antenna table, the last ID that it is associated wi...
casacore::MSMetaData::getSpwsForField
std::set< uInt > getSpwsForField(const String &fieldName)
get a set of spectral windows corresponding to the specified field name
casacore::MSMetaData::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.
casacore::MSMetaData::_getFieldsAndIntentsMaps
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 wi...
casacore::MSMetaData::_nArrays
uInt _nArrays
Definition MSMetaData.h:765
casacore::MSMetaData::getFieldsForScan
std::set< Int > getFieldsForScan(const ScanKey &scan) const
get field IDs associated with the specified scan number.
casacore::MSMetaData::getAntennaPositions
vector< MPosition > getAntennaPositions(const vector< uInt > &which=std::vector< uInt >(0)) const
get the positions of the specified antennas.
casacore::MSMetaData::getIntentsForField
std::set< String > getIntentsForField(String field)
get a set of intents corresponding to a specified field name
casacore::MSMetaData::getFieldNamesForSourceMap
std::map< Int, std::set< String > > getFieldNamesForSourceMap() const
casacore::MSMetaData::getBandWidths
vector< Double > getBandWidths() const
casacore::MSMetaData::_source_sourceIDs
vector< Int > _source_sourceIDs
Definition MSMetaData.h:819
casacore::MSMetaData::_ephemFields
std::shared_ptr< std::set< Int > > _ephemFields
Definition MSMetaData.h:834
casacore::MSMetaData::getFieldNamesForFieldIDs
vector< String > getFieldNamesForFieldIDs(const vector< uInt > &fieldIDs)
get the field names associated with the specified field IDs.
casacore::MSMetaData::getFieldTableSourceIDs
vector< Int > getFieldTableSourceIDs() const
Get the FIELD.SOURCE_ID column.
casacore::MSMetaData::getSQLDSpw
std::set< uInt > getSQLDSpw()
ALMA-specific.
casacore::MSMetaData::_createTimeStampRecords
static void _createTimeStampRecords(Record &parent, const SubScanProperties &subScanProps)
casacore::MSMetaData::_sourceNames
vector< String > _sourceNames
Definition MSMetaData.h:794
casacore::MSMetaData::nUnflaggedRows
Double nUnflaggedRows(CorrelationType cType, Int fieldID) const
casacore::MSMetaData::_fieldToScansMap
vector< std::set< ScanKey > > _fieldToScansMap
Definition MSMetaData.h:791
casacore::MSMetaData::getSpwToDataDescriptionIDMap
std::vector< std::set< uInt > > getSpwToDataDescriptionIDMap() const
get a mapping of spectral window ID to data descrption IDs
casacore::MSMetaData::_getScalarQuantDoubleColumn
static void _getScalarQuantDoubleColumn(Quantum< Vector< Double > > &v, TableProxy &table, const String &colname, rownr_t beginRow, rownr_t nrows)
casacore::MSMetaData::getChanResolutions
vector< QVD > getChanResolutions(Bool asVelWidths) const
get the resolution for each channel.
casacore::MSMetaData::_hasStateID
Bool _hasStateID(Int stateID) const
casacore::MSMetaData::getMeanFreqs
vector< Quantity > getMeanFreqs() const
casacore::MSMetaData::getSpwSubwindows
vector< int > getSpwSubwindows() const
ALMA specific CAS-13973 get subwindows for each spw values of -1 indicate no info found for those spw...
casacore::MSMetaData::getChanFreqs
vector< QVD > getChanFreqs() const
casacore::MSMetaData::getSummary
Record getSummary() const
get a data structure, consumable by users, representing a summary of the dataset
casacore::MSMetaData::getTDMSpw
std::set< uInt > getTDMSpw()
ALMA-specific.
casacore::MSMetaData::_getExposureTimes
std::shared_ptr< Quantum< Vector< Double > > > _getExposureTimes() const
casacore::MSMetaData::_antennaOffsets
vector< QVD > _antennaOffsets
Definition MSMetaData.h:807
casacore::MSMetaData::_uniqueFieldIDs
std::set< Int > _uniqueFieldIDs
Definition MSMetaData.h:782
casacore::MSMetaData::_taqlTableName
const String _taqlTableName
Definition MSMetaData.h:814
casacore::MSMetaData::_sizeof
static uInt _sizeof(const std::map< T, U > &m)
casacore::MSMetaData::_stationNames
vector< String > _stationNames
Definition MSMetaData.h:794
casacore::MSMetaData::_subScanProperties
std::shared_ptr< const std::map< SubScanKey, SubScanProperties > > _subScanProperties
Definition MSMetaData.h:775
casacore::MSMetaData::_fieldCodes
vector< String > _fieldCodes
Definition MSMetaData.h:794
casacore::MSMetaData::_subscans
std::set< SubScanKey > _subscans
Definition MSMetaData.h:823
casacore::MSMetaData::_phaseDirs
vector< MDirection > _phaseDirs
Definition MSMetaData.h:829
casacore::MSMetaData::FirstExposureTimeMap
std::map< Int, std::pair< Double, Quantity > > FirstExposureTimeMap
Definition MSMetaData.h:87
casacore::MSMetaData::_sourceToFieldsMap
std::map< Int, std::set< Int > > _sourceToFieldsMap
Definition MSMetaData.h:770
casacore::MSMetaData::getIntentsForSpw
std::set< String > getIntentsForSpw(const uInt spw)
get a set of intents corresponding to the specified spectral window
casacore::MSMetaData::getAntennaOffsets
std::vector< QVD > getAntennaOffsets(const String &name) const
If the antenna name appears mulitple times, this will return all the offsets for it,...
casacore::MSMetaData::_sizeof
static uInt _sizeof(const std::map< T, std::set< U > > &m)
casacore::MSMetaData::_intentToSubScansMap
std::map< String, std::set< SubScanKey > > _intentToSubScansMap
Definition MSMetaData.h:779
casacore::MSMetaData::_unflaggedSubScanNXCRows
std::shared_ptr< std::map< SubScanKey, Double > > _unflaggedSubScanNXCRows
Definition MSMetaData.h:813
casacore::MSMetaData::operator=
MSMetaData operator=(const MSMetaData &)
casacore::MSMetaData::getFieldsForTimes
std::set< Int > getFieldsForTimes(Double center, Double tol)
Get the fields which fail into the specified time range (center-tol to center+tol).
casacore::MSMetaData::getIntentsForSubScan
std::set< String > getIntentsForSubScan(const SubScanKey &subScan) const
casacore::MSMetaData::_sizeof
static uInt _sizeof(const vector< vector< String > > &m)
casacore::MSMetaData::hasBBCNo
Bool hasBBCNo() const
casacore::MSMetaData::_freqWidthToVelWidth
static QVD _freqWidthToVelWidth(const QVD &v, const Quantity &refFreq)
convert a QVD in frequency units to velocity units using the give reference frequency.
casacore::MSMetaData::_timeRangesForObs
vector< std::pair< MEpoch, MEpoch > > _timeRangesForObs
Definition MSMetaData.h:827
casacore::MSMetaData::_nScans
uInt _nScans
Definition MSMetaData.h:765
casacore::MSMetaData::_getInterpolatedDirection
MDirection _getInterpolatedDirection(const MSPointingColumns &pCols, const Int &index, const Double &time) const
casacore::MSMetaData::_nDataDescIDs
uInt _nDataDescIDs
Definition MSMetaData.h:765
casacore::MSMetaData::_spwIDToPolIDMap
std::vector< std::vector< uInt > > _spwIDToPolIDMap
Definition MSMetaData.h:772
casacore::MSMetaData::getSourceNames
vector< String > getSourceNames() const
SOURCE.NAME.
casacore::MSMetaData::_getArrayKeysToSubScanKeys
std::map< ArrayKey, std::set< SubScanKey > > _getArrayKeysToSubScanKeys() const
casacore::MSMetaData::getAntennaStations
vector< std::vector< String > > getAntennaStations(const vector< String > &antennaNames)
get the antenna stations for the specified antenna names.
casacore::MSMetaData::_nObservations
uInt _nObservations
Definition MSMetaData.h:765
casacore::MSMetaData::getBBCNos
vector< uInt > getBBCNos() const
casacore::MSMetaData::nDataDescriptions
uInt nDataDescriptions() const
get the number of data description IDs (from the DATA_DESCRIPTION table)
casacore::MSMetaData::_uniqueDataDescIDs
std::set< uInt > _uniqueDataDescIDs
Definition MSMetaData.h:783
casacore::MSMetaData::_getFieldsAndSpwMaps
void _getFieldsAndSpwMaps(std::map< Int, std::set< uInt > > &fieldToSpwMap, vector< std::set< Int > > &spwToFieldMap) const
casacore::MSMetaData::_sqldSpw
std::set< uInt > _sqldSpw
Definition MSMetaData.h:783
casacore::MSMetaData::getAntennaOffsets
vector< QVD > getAntennaOffsets() const
casacore::MSMetaData::getIntervalStatistics
ColumnStats getIntervalStatistics() const
get statistics related to the values of the INTERVAL column.
casacore::MSMetaData::_fieldToNACRowsMap
std::shared_ptr< std::map< Int, rownr_t > > _fieldToNACRowsMap
Definition MSMetaData.h:785
casacore::MSMetaData::getAntennaDiameters
QVD getAntennaDiameters() const
get the antenna diameters
casacore::MSMetaData::getEffectiveTotalExposureTime
Quantity getEffectiveTotalExposureTime()
get the effective total exposure time.
casacore::MSMetaData::_scanToStatesMap
std::map< ScanKey, std::set< Int > > _scanToStatesMap
Definition MSMetaData.h:769
casacore::MSMetaData::getTimeRange
std::pair< Double, Double > getTimeRange(Bool showProgress=False) const
get the time range for the entire dataset.
casacore::MSMetaData::_getObservationIDToArrayIDsMap
vector< std::set< Int > > _getObservationIDToArrayIDsMap() const
map<SubScanKey, Quantity> _getMeanExposureTimes() const;
casacore::MSMetaData::getAntennaNames
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,...
casacore::MSMetaData::_scanKeys
std::set< ScanKey > _scanKeys
Definition MSMetaData.h:822
casacore::MSMetaData::_getScanToSubScansMap
std::map< ScanKey, std::set< SubScanKey > > _getScanToSubScansMap() const
casacore::MSMetaData::nUnflaggedRows
Double nUnflaggedRows() const
get the number of unflagged rows
casacore::MSMetaData::_sizeof
static uInt _sizeof(const Quantum< Vector< Double > > &m)
casacore::MSMetaData::_spwToScansMap
vector< std::set< ScanKey > > _spwToScansMap
Definition MSMetaData.h:791
casacore::MSMetaData::_getEphemFieldIDs
std::shared_ptr< std::set< Int > > _getEphemFieldIDs() const
get the field IDs of ephemeris objects
casacore::MSMetaData::_getScalarDoubleColumn
static void _getScalarDoubleColumn(Vector< Double > &v, TableProxy &table, const String &colname, rownr_t beginRow, rownr_t nrows)
casacore::MSMetaData::_stateToFieldsMap
std::map< Int, std::set< Int > > _stateToFieldsMap
Definition MSMetaData.h:770
casacore::MSMetaData::getSourceDirections
vector< MDirection > getSourceDirections() const
SOURCE.DIRECTION.
casacore::MSMetaData::getFDMSpw
std::set< uInt > getFDMSpw()
ALMA-specific.
casacore::MSMetaData::_arrayToSubScans
std::map< ArrayKey, std::set< SubScanKey > > _arrayToSubScans
Definition MSMetaData.h:825
casacore::MSMetaData::getSpwIDPolIDToDataDescIDMap
std::map< std::pair< uInt, uInt >, uInt > getSpwIDPolIDToDataDescIDMap() const
The first value of the pair is spw, the second is polarization ID.
casacore::MSMetaData::_fieldToIntentsMap
vector< std::set< String > > _fieldToIntentsMap
Definition MSMetaData.h:788
casacore::MSMetaData::getTimesForSpws
std::vector< std::set< Double > > getTimesForSpws(Bool showProgress=True) const
get a map of spectral windows to unique timestamps.
casacore::MSMetaData::nRows
rownr_t nRows(CorrelationType cType, uInt fieldID) const
casacore::MSMetaData::_subScanToIntentsMap
std::shared_ptr< const std::map< SubScanKey, std::set< String > > > _subScanToIntentsMap
Definition MSMetaData.h:787
casacore::MSMetaData::_nUnflaggedXCRows
Double _nUnflaggedXCRows
Definition MSMetaData.h:811
casacore::MSMetaData::_forceSubScanPropsToCache
Bool _forceSubScanPropsToCache
Definition MSMetaData.h:817
casacore::MSMetaData::_getUnflaggedRowStats
void _getUnflaggedRowStats(Double &nACRows, Double &nXCRows, vector< Double > *&fieldNACRows, vector< Double > *&fieldNXCRows, std::map< SubScanKey, Double > *&scanNACRows, std::map< SubScanKey, Double > *&scanNXCRows) const
casacore::MSMetaData::_modifyFirstExposureTimeIfNecessary
static void _modifyFirstExposureTimeIfNecessary(FirstExposureTimeMap &current, Int dataDescID, Double time, Double exposure, const Unit &eunit)
casacore::MSMetaData::getChannelAvgSpw
std::set< uInt > getChannelAvgSpw()
ALMA-specific.
casacore::MSMetaData::_properMotions
vector< std::pair< Quantity, Quantity > > _properMotions
Definition MSMetaData.h:831
casacore::MSMetaData::_nStates
uInt _nStates
Definition MSMetaData.h:764
casacore::MSMetaData::_modifyFirstExposureTimeIfNecessary
static void _modifyFirstExposureTimeIfNecessary(FirstExposureTimeMap &current, const FirstExposureTimeMap &test)
casacore::MSMetaData::getDataDescIDToSpwMap
vector< uInt > getDataDescIDToSpwMap() const
casacore::MSMetaData::_cacheMB
Float _cacheMB
Definition MSMetaData.h:761
casacore::MSMetaData::_spwInfoStored
Bool _spwInfoStored
Definition MSMetaData.h:817
casacore::MSMetaData::_hasFieldID
Bool _hasFieldID(Int fieldID) const
casacore::MSMetaData::_checkField
void _checkField(uInt fieldID) const
casacore::MSMetaData::_fieldToSpwMap
std::map< Int, std::set< uInt > > _fieldToSpwMap
Definition MSMetaData.h:768
casacore::MSMetaData::_getScanProperties
std::shared_ptr< const std::map< ScanKey, MSMetaData::ScanProperties > > _getScanProperties(Bool showProgress) const
get scan properties
casacore::MSMetaData::nArrays
uInt nArrays()
get the number of arrays (from the ARRAY table) in the dataset
casacore::MSMetaData::getFirstExposureTimeMap
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 d...
casacore::MSMetaData::_exposureTime
Quantity _exposureTime
Definition MSMetaData.h:810
casacore::MSMetaData::_intentToFieldIDMap
std::map< String, std::set< Int > > _intentToFieldIDMap
Definition MSMetaData.h:777
casacore::MSMetaData::getChanEffectiveBWs
vector< QVD > getChanEffectiveBWs(Bool asVelWidths) const
get the effective bandwidth for each channel.
casacore::MSMetaData::_scanToFieldsMap
std::map< ScanKey, std::set< Int > > _scanToFieldsMap
Definition MSMetaData.h:769
casacore::MSMetaData::_projects
vector< String > _projects
Definition MSMetaData.h:794
casacore::MSMetaData::getNetSidebands
vector< Int > getNetSidebands() const
casacore::MSMetaData::getCorrTypes
vector< vector< Int > > getCorrTypes() const
POLARIZATION.CORR_TYPE.
casacore::MSMetaData::getScanKeys
std::set< ScanKey > getScanKeys(const ArrayKey &arrayKey) const
get all ScanKeys in the dataset that have the specified arrayKey.
casacore::MSMetaData::_sizeof
static uInt _sizeof(const vector< String > &m)
casacore::MSMetaData::_corrTypes
vector< vector< Int > > _corrTypes
Definition MSMetaData.h:796
casacore::MSMetaData::_scanToDDIDsMap
std::map< ScanKey, std::set< uInt > > _scanToDDIDsMap
Definition MSMetaData.h:766
casacore::MSMetaData::_nFields
uInt _nFields
Definition MSMetaData.h:764
casacore::MSMetaData::_getAntennaPositions
vector< MPosition > _getAntennaPositions() const
casacore::MSMetaData::_cacheUpdated
Bool _cacheUpdated(const Float incrementInBytes) const
casacore::MSMetaData::_stateToIntentsMap
vector< std::set< String > > _stateToIntentsMap
Definition MSMetaData.h:788
casacore::MSMetaData::_uniqueIntents
std::set< String > _uniqueIntents
Definition MSMetaData.h:781
casacore::MSMetaData::getWVRSpw
std::set< uInt > getWVRSpw() const
ALMA-specific.
casacore::MSMetaData::_checkTolerance
static void _checkTolerance(const Double tol)
casacore::MSMetaData::_scanToIntentsMap
std::map< ScanKey, std::set< String > > _scanToIntentsMap
Definition MSMetaData.h:786
casacore::MSMetaData::nPol
uInt nPol()
casacore::MSMetaData::getSubScanProperties
SubScanProperties getSubScanProperties(const SubScanKey &subScan, Bool showProgress=False) const
get the sub scan properties for the specified sub scan.
casacore::MSMetaData::getSubScanKeys
std::set< SubScanKey > getSubScanKeys(const ArrayKey &arrayKey) const
get all sub scan keys for the specified array key.
casacore::MSMetaData::_fieldToTimesMap
std::shared_ptr< std::map< Int, std::set< Double > > > _fieldToTimesMap
Definition MSMetaData.h:803
casacore::MSMetaData::_getFieldsAndStatesMaps
void _getFieldsAndStatesMaps(std::map< Int, std::set< Int > > &fieldToStatesMap, std::map< Int, std::set< Int > > &stateToFieldsMap)
casacore::MSMetaData::_intentToScansMap
std::map< String, std::set< ScanKey > > _intentToScansMap
Definition MSMetaData.h:778
casacore::MSMetaData::~MSMetaData
virtual ~MSMetaData()
casacore::MSMetaData::_getSpwsAndIntentsMaps
void _getSpwsAndIntentsMaps(vector< std::set< String > > &spwToIntentsMap, std::map< String, std::set< uInt > > &intentToSpwsMap)
casacore::MSMetaData::getPolarizationIDs
std::set< uInt > getPolarizationIDs(uInt obsID, Int arrayID, Int scan, uInt spwid) const
get polarization IDs for the specified scan and spwid
casacore::MSMetaData::_spwToFieldIDsMap
vector< std::set< Int > > _spwToFieldIDsMap
Definition MSMetaData.h:790
casacore::MSMetaData::_tdmSpw
std::set< uInt > _tdmSpw
Definition MSMetaData.h:783
casacore::MSMetaData::nUnflaggedRows
Double nUnflaggedRows(CorrelationType cType, Int arrayID, uInt observationID, Int scanNumber, uInt fieldID) const
casacore::MSMetaData::getAntennaPositions
vector< vector< MPosition > > getAntennaPositions(const vector< String > &names)
names cannot be empty.
casacore::MSMetaData::_intentToSpwsMap
std::map< String, std::set< uInt > > _intentToSpwsMap
Definition MSMetaData.h:800
casacore::MSMetaData::getScansForIntent
std::set< Int > getScansForIntent(const String &intent, Int obsID, Int arrayID) const
get the scans associated with the specified intent
casacore::MSMetaData::getFieldCodes
vector< String > getFieldCodes() const
get the values of the CODE column from the field table
casacore::MSMetaData::_checkSubScan
void _checkSubScan(const SubScanKey &key) const
casacore::MSMetaData::getStatesForScan
std::set< Int > getStatesForScan(Int obsID, Int arrayID, Int scan) const
get the stateIDs associated with the specified scan.
casacore::MSMetaData::getDataDescIDToPolIDMap
vector< uInt > getDataDescIDToPolIDMap() const
casacore::MSMetaData::getScansForState
std::set< Int > getScansForState(Int stateID, Int obsID, Int arrayID) const
get a set of scan numbers for the specified stateID, obsID, and arrayID.
casacore::MSMetaData::_getScanKeys
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
casacore::MSMetaData::_mergeScanProps
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
casacore::MSMetaData::_spwToIntentsMap
vector< std::set< String > > _spwToIntentsMap
Definition MSMetaData.h:788
casacore::MSMetaData::getCorrBits
vector< String > getCorrBits() const
casacore::MSMetaData::_getChunkSubScanProperties
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 > &times, 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, rownr_t beginRow, rownr_t endRow) const
Uses openmp for parallel processing.
casacore::MSMetaData::_getFieldIDs
std::shared_ptr< Vector< Int > > _getFieldIDs() const
casacore::MSMetaData::getSubScanToIntentsMap
std::shared_ptr< const std::map< SubScanKey, std::set< String > > > getSubScanToIntentsMap() const
casacore::MSMetaData::getUniqueFiedIDs
std::set< Int > getUniqueFiedIDs() const
DEPRECATED because of spelling error.
Definition MSMetaData.h:634
casacore::MSMetaData::_getScanNumbers
std::set< Int > _getScanNumbers(const ArrayKey &arrayKey) const
get all valid scan numbers associated with the specified arrayKey
casacore::MSMetaData::_corrProds
vector< Array< Int > > _corrProds
Definition MSMetaData.h:797
casacore::MSMetaData::_observatoryNames
vector< String > _observatoryNames
Definition MSMetaData.h:793
casacore::MSMetaData::nAntennas
uInt nAntennas() const
get the number of antennas in the ANTENNA table
casacore::MSMetaData::_nUnflaggedACRows
Double _nUnflaggedACRows
Definition MSMetaData.h:811
casacore::MSMetaData::_antennaNames
vector< String > _antennaNames
Definition MSMetaData.h:793
casacore::MSMetaData::getFieldsForSourceMap
std::map< Int, std::set< Int > > getFieldsForSourceMap() const
casacore::MSMetaData::_unflaggedFieldNACRows
std::shared_ptr< vector< Double > > _unflaggedFieldNACRows
Definition MSMetaData.h:812
casacore::MSMetaData::_checkScans
void _checkScans(const std::set< ScanKey > &scanKeys) const
casacore::MSMetaData::getIntentToFieldsMap
std::map< String, std::set< Int > > getIntentToFieldsMap()
casacore::MSMetaData::_scanSpwToPolIDMap
std::map< std::pair< ScanKey, uInt >, std::set< uInt > > _scanSpwToPolIDMap
Definition MSMetaData.h:780
casacore::MSMetaData::_generateScanPropsIfWanted
std::shared_ptr< const std::map< ScanKey, ScanProperties > > _generateScanPropsIfWanted() const
if _scanProps has been generated, just return it.
casacore::MSMetaData::getFieldNames
vector< String > getFieldNames() const
get a list of the field names in the order in which they appear in the FIELD table.
casacore::MSMetaData::getCorrProducts
vector< Array< Int > > getCorrProducts() const
POLARIZATION.CORR_PRODUCT.
casacore::MSMetaData::getSubScanProperties
std::shared_ptr< const std::map< SubScanKey, SubScanProperties > > getSubScanProperties(Bool showProgress=False) const
casacore::MSMetaData::_getObservationIDs
std::shared_ptr< Vector< Int > > _getObservationIDs() const
casacore::MSMetaData::getFieldIDsForSpw
std::set< Int > getFieldIDsForSpw(const uInt spw)
get the set of field IDs corresponding to the specified spectral window.
casacore::MSMetaData::getFieldToScansMap
vector< std::set< ScanKey > > getFieldToScansMap() const
get the mapping of field ID to scans
casacore::MSMetaData::_getSubScanKeys
std::set< SubScanKey > _getSubScanKeys(const ScanKey &scanKey) const
get subscans related to the given scan
casacore::MSMetaData::_fieldToStatesMap
std::map< Int, std::set< Int > > _fieldToStatesMap
Definition MSMetaData.h:770
casacore::MSMetaData::_nSpw
uInt _nSpw
Definition MSMetaData.h:764
casacore::MSMetaData::_getScanAndSubScanProperties
void _getScanAndSubScanProperties(std::shared_ptr< const std::map< ScanKey, ScanProperties > > &scanProps, std::shared_ptr< const std::map< SubScanKey, SubScanProperties > > &subScanProps, Bool showProgress) const
casacore::MSMetaData::_showProgress
Bool _showProgress
Definition MSMetaData.h:760
casacore::MSMetaData::_spwPolIDToDataDescIDMap
std::map< std::pair< uInt, uInt >, uInt > _spwPolIDToDataDescIDMap
Definition MSMetaData.h:771
casacore::MSMetaData::_getScans
std::shared_ptr< Vector< Int > > _getScans() const
casacore::MSMetaData::_getIntervals
std::shared_ptr< Quantum< Vector< Double > > > _getIntervals() const
casacore::MSMetaData::nScans
uInt nScans()
get the number of scans in the dataset
casacore::MSMetaData::_getStateToIntentsMap
void _getStateToIntentsMap(vector< std::set< String > > &statesToIntentsMap, std::set< String > &uniqueIntents) const
casacore::MSMetaData::getSpwsForIntent
virtual std::set< uInt > getSpwsForIntent(const String &intent)
get a set of spectral windows for which the specified intent applies.
casacore::MSMetaData::getIntentsForScan
std::set< String > getIntentsForScan(const ScanKey &scan) const
casacore::MSMetaData::_getSpwToIntentsMap
vector< std::set< String > > _getSpwToIntentsMap()
casacore::MSMetaData::getTimeRangesOfObservations
vector< std::pair< MEpoch, MEpoch > > getTimeRangesOfObservations() const
get the time ranges from the OBSERVATION table
casacore::MSMetaData::_uniqueStateIDs
std::set< Int > _uniqueStateIDs
Definition MSMetaData.h:782
casacore::MSMetaData::getScanToSpwsMap
std::map< ScanKey, std::set< uInt > > getScanToSpwsMap() const
get the complete mapping of scans to spws
casacore::MSMetaData::getSpwsForSubScan
std::set< uInt > getSpwsForSubScan(const SubScanKey &subScan) const
get the set of spectral windows for the specified subscan.
casacore::MSMetaData::CorrelationType
CorrelationType
for retrieving stats
Definition MSMetaData.h:64
casacore::MSMetaData::CROSS
@ CROSS
Definition MSMetaData.h:66
casacore::MSMetaData::AUTO
@ AUTO
Definition MSMetaData.h:65
casacore::MSMetaData::BOTH
@ BOTH
Definition MSMetaData.h:67
casacore::MSMetaData::nFields
uInt nFields() const
get the number of fields.
casacore::MSMetaData::getRestFrequencies
std::map< SourceKey, std::shared_ptr< vector< MFrequency > > > getRestFrequencies() const
get rest frequencies from the SOURCE table
casacore::MSMetaData::_nACRows
rownr_t _nACRows
Definition MSMetaData.h:763
casacore::MSMetaData::getIntents
std::set< String > getIntents() const
get all intents, in no particular (nor guaranteed) order.
casacore::MSMetaData::getUniqueAntennaIDs
const std::set< Int > & getUniqueAntennaIDs() const
get the unique antennas (the union of the ANTENNA_1 and ANTENNA_2 columns) from the main table
casacore::MSMetaData::_nrows
uInt _nrows
Definition MSMetaData.h:765
casacore::MSMetaData::_getSubScanKeys
std::set< SubScanKey > _getSubScanKeys() const
casacore::MSMetaData::getReferenceDirection
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 ...
casacore::MSMetaData::_sizeof
static uInt _sizeof(const std::map< String, std::set< T > > &map)
casacore::MSMetaData::getFieldNamesForSpw
std::set< String > getFieldNamesForSpw(const uInt spw)
get the set of field names corresponding to the specified spectral window.
casacore::MSMetaData::getSpwNames
vector< String > getSpwNames() const
get a map of the spwIDs to spw names from the spw table
casacore::MSMetaData::_getRowStats
void _getRowStats(rownr_t &nACRows, rownr_t &nXCRows, std::shared_ptr< std::map< SubScanKey, rownr_t > > &scanToNACRowsMap, std::shared_ptr< std::map< SubScanKey, rownr_t > > &scanToNXCRowsMap, std::shared_ptr< std::map< Int, rownr_t > > &fieldToNACRowsMap, std::shared_ptr< std::map< Int, rownr_t > > &fieldToNXCRowsMap) const
casacore::MSMetaData::_getRowStats
void _getRowStats(rownr_t &nACRows, rownr_t &nXCRows, std::map< SubScanKey, rownr_t > *&subScanToNACRowsMap, std::map< SubScanKey, rownr_t > *&subScanToNXCRowsMap, std::map< Int, rownr_t > *&fieldToNACRowsMap, std::map< Int, rownr_t > *&fieldToNXCRowsMap) const
casacore::MSMetaData::nRows
rownr_t nRows() const
get the number of visibilities
casacore::MSMetaData::getIntentToScansMap
std::map< String, std::set< ScanKey > > getIntentToScansMap()
casacore::MSMetaData::getScanNumbers
std::set< Int > getScanNumbers(Int obsID, Int arrayID) const
get unique scan numbers
casacore::MSMetaData::_timeToFieldsMap
std::shared_ptr< std::map< Double, std::set< Int > > > _timeToFieldsMap
Definition MSMetaData.h:804
casacore::MSMetaData::_setObservation
void _setObservation(const MeasurementSet &ms)
set metadata from OBSERVATION table
casacore::MSMetaData::getUniqueDataDescIDs
std::set< uInt > getUniqueDataDescIDs() const
get unique data description IDs that exist in the main table
casacore::MSMetaData::getTimesForField
std::set< Double > getTimesForField(Int fieldID)
get the times for which the specified field was observed
casacore::MSMetaData::_unflaggedFieldNXCRows
std::shared_ptr< vector< Double > > _unflaggedFieldNXCRows
Definition MSMetaData.h:812
casacore::MSMetaData::getPhaseDirs
vector< MDirection > getPhaseDirs(const MEpoch &ep=MEpoch(Quantity(0.0, Unit("s")))) const
get the phase directions from the FIELD subtable.
casacore::MSMetaData::getFieldsForIntent
std::set< Int > getFieldsForIntent(uInt sourceID) const
get the field IDs associated with the specified source.
casacore::MSMetaData::_toUIntMap
static std::map< Int, uInt > _toUIntMap(const Vector< Int > &v)
casacore::MSMetaData::getObservatoryNames
vector< String > getObservatoryNames()
get telescope names in the order they are listed in the OBSERVATION table.
casacore::MSMetaData::_antennaDiameters
QVD _antennaDiameters
Definition MSMetaData.h:808
casacore::MSMetaData::_getScansAndIntentsMaps
void _getScansAndIntentsMaps(std::map< ScanKey, std::set< String > > &scanToIntentsMap, std::map< String, std::set< ScanKey > > &intentToScansMap) const
casacore::MSMetaData::getScanToStatesMap
std::map< ScanKey, std::set< Int > > getScanToStatesMap() const
get the mapping of scans to states
casacore::MSMetaData::getCache
Float getCache() const
Definition MSMetaData.h:582
casacore::MSMetaData::_fdmSpw
std::set< uInt > _fdmSpw
Definition MSMetaData.h:783
casacore::MSMetaData::_intentToTimesMap
std::map< String, std::set< Double > > _intentToTimesMap
Definition MSMetaData.h:801
casacore::MSMetaData::_getScanToAntennasMap
std::map< ScanKey, std::set< Int > > _getScanToAntennasMap() const
casacore::MSMetaData::getUniqueFieldIDs
std::set< Int > getUniqueFieldIDs() const
get unique field IDs that exist in the main table.
casacore::MSMetaData::getFieldsForScans
std::set< Int > getFieldsForScans(const std::set< Int > &scans, Int obsID, Int arrayID) const
get the field IDs associated with the specified scans
casacore::MSMetaData::_getAntennas
void _getAntennas(std::shared_ptr< Vector< Int > > &ant1, std::shared_ptr< Vector< Int > > &ant2) const
casacore::MSMetaData::getScansForTimes
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),...
casacore::MSMetaData::getScansForField
std::set< Int > getScansForField(const String &field, Int obsID, Int arrayID) const
get the scan numbers associated with the specified field.
casacore::MSMetaData::_generateSubScanPropsIfWanted
std::shared_ptr< const std::map< SubScanKey, SubScanProperties > > _generateSubScanPropsIfWanted() const
if _subScanProperties has been generated, just return it.
casacore::MSMetaData::getUniqueSpwIDs
std::set< uInt > getUniqueSpwIDs() const
get the unique spectral window IDs represented by the data description IDs that appear in the main ta...
casacore::MSMetaData::_sizeof
static uInt _sizeof(const vector< std::set< String > > &m)
casacore::MSMetaData::_ms
const MeasurementSet * _ms
The general pattern is that a mutable gets set only once, on demand, when its setter is called for th...
Definition MSMetaData.h:759
casacore::MSMetaData::getAntennaIDs
std::set< uInt > getAntennaIDs(const String &antennaName) const
get all the antenna IDs for the antenna with the specified name.
casacore::MSMetaData::getProjects
vector< String > getProjects() const
get the contents of the PROJECT column from the OBSERVATIONS table
casacore::MSMetaData::_sourceDirs
vector< MDirection > _sourceDirs
Definition MSMetaData.h:829
casacore::MSMetaData::getAverageIntervalsForSubScan
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 t...
casacore::MSMetaData::_getScalarIntColumn
static void _getScalarIntColumn(Vector< Int > &v, TableProxy &table, const String &colname, rownr_t beginRow, rownr_t nrows)
casacore::MSMetaData::getChanWidths
vector< QVD > getChanWidths() const
casacore::MSMetaData::getObservers
vector< String > getObservers() const
get the contents of the OBSERVER column from the OBSERVATIONS table
casacore::MSMetaData::getSpwReceiverBands
vector< int > getSpwReceiverBands() const
ALMA specific CAS-13973 get receiver bands for each spw values of -1 indicate no info found for those...
casacore::MSMetaData::_wvrSpw
std::set< uInt > _wvrSpw
Definition MSMetaData.h:783
casacore::MSMetaData::_antennaPositions
vector< MPosition > _antennaPositions
Definition MSMetaData.h:806
casacore::MSMetaData::_subScanToNACRowsMap
std::shared_ptr< std::map< SubScanKey, rownr_t > > _subScanToNACRowsMap
Definition MSMetaData.h:784
casacore::MSMetaData::_scanToAntennasMap
std::map< ScanKey, std::set< Int > > _scanToAntennasMap
Definition MSMetaData.h:769
casacore::MSMetaData::_sourceInfo
std::map< SourceKey, SourceProperties > _sourceInfo
Definition MSMetaData.h:833
casacore::MSMetaData::_scanToTimesMap
std::shared_ptr< std::map< ScanKey, std::set< Double > > > _scanToTimesMap
Definition MSMetaData.h:799
casacore::MSMetaData::_nPol
uInt _nPol
Definition MSMetaData.h:765
casacore::MSMetaData::getSourceTimes
std::shared_ptr< const Quantum< Vector< Double > > > getSourceTimes() const
SOURCE.TIME.
casacore::MSMetaData::_dataDescIDToSpwMap
vector< uInt > _dataDescIDToSpwMap
Definition MSMetaData.h:767
casacore::MSMetaData::getAverageIntervalsForScan
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 t...
casacore::MSMetaData::_field_sourceIDs
vector< Int > _field_sourceIDs
Definition MSMetaData.h:819
casacore::MSMetaData::_getSpwInfo2
vector< SpwProperties > _getSpwInfo2(std::set< uInt > &avgSpw, std::set< uInt > &tdmSpw, std::set< uInt > &fdmSpw, std::set< uInt > &wvrSpw, std::set< uInt > &sqldSpw) const
casacore::MSMetaData::_getSpwInfo
vector< SpwProperties > _getSpwInfo(std::set< uInt > &avgSpw, std::set< uInt > &tdmSpw, std::set< uInt > &fdmSpw, std::set< uInt > &wvrSpw, std::set< uInt > &sqldSpw) const
casacore::MSMetaData::getTimesForScans
std::set< Double > getTimesForScans(std::set< ScanKey > scans) const
Get the times for the specified scans.
casacore::MSMetaData::getTimeRangeForScan
std::pair< Double, Double > getTimeRangeForScan(const ScanKey &scanKey) const
get the time range for the specified scan.
casacore::MSMetaData::getBBCNosToSpwMap
std::map< uInt, std::set< uInt > > getBBCNosToSpwMap(SQLDSwitch sqldSwitch)
casacore::MSMetaData::_arrayKeys
std::set< ArrayKey > _arrayKeys
Definition MSMetaData.h:821
casacore::MSMetaData::_sizeof
static uInt _sizeof(const vector< std::map< Int, Quantity > > &map)
casacore::MSMetaData::getFieldsForIntent
std::set< Int > getFieldsForIntent(const String &intent)
get the field IDs associated with the specified intent.
casacore::MSMetaData::_setSpwInfo
void _setSpwInfo(const MeasurementSet &ms)
This comment from thunter in the original ValueMapping python class.
casacore::MSMetaData::_sizeof
static uInt _sizeof(const std::map< Double, MSMetaData::TimeStampProperties > &m)
casacore::MSMetaData::_schedules
vector< vector< String > > _schedules
Definition MSMetaData.h:795
casacore::MSMetaData::_fieldToNXCRowsMap
std::shared_ptr< std::map< Int, rownr_t > > _fieldToNXCRowsMap
Definition MSMetaData.h:785
casacore::MSMetaData::nRows
rownr_t nRows(CorrelationType cType)
casacore::MSMetaData::SQLDSwitch
SQLDSwitch
Definition MSMetaData.h:70
casacore::MSMetaData::SQLD_ONLY
@ SQLD_ONLY
Definition MSMetaData.h:73
casacore::MSMetaData::SQLD_EXCLUDE
@ SQLD_EXCLUDE
Definition MSMetaData.h:72
casacore::MSMetaData::SQLD_INCLUDE
@ SQLD_INCLUDE
Definition MSMetaData.h:71
casacore::MSMetaData::setForceSubScanPropsToCache
void setForceSubScanPropsToCache(Bool b)
If True, force the subscan properties structure to be cached regardless of the stipulations on the ma...
Definition MSMetaData.h:516
casacore::MSMetaData::_getScansAndSpwMaps
void _getScansAndSpwMaps(std::map< ScanKey, std::set< uInt > > &scanToSpwMap, vector< std::set< ScanKey > > &spwToScanMap) const
casacore::MSMetaData::_obsToArraysMap
vector< std::set< Int > > _obsToArraysMap
Definition MSMetaData.h:790
casacore::MSMetaData::getAntennaIDs
vector< std::set< uInt > > getAntennaIDs(const vector< String > &antennaNames) const
The returned IDs are ordered in the way they appear in the atenna table.
casacore::MSMetaData::_antennaNameToIDMap
std::map< String, std::set< uInt > > _antennaNameToIDMap
Definition MSMetaData.h:773
casacore::MSMetaData::getTransitions
std::map< SourceKey, std::shared_ptr< vector< String > > > getTransitions() const
get the transitions from the SOURCE table.
casacore::MSMetaData::getSchedules
vector< vector< String > > getSchedules() const
get the contents of the SCHEDULE column from the OBSERVATIONS table Note that the embedded vectors ma...
casacore::MSMetaData::_hasAntennaID
void _hasAntennaID(Int antennaID)
casacore::MSMetaData::getSourceTableSourceIDs
vector< Int > getSourceTableSourceIDs() const
Get the SOURCE.SOURCE_ID column.
casacore::MSMetaData::_unflaggedSubScanNACRows
std::shared_ptr< std::map< SubScanKey, Double > > _unflaggedSubScanNACRows
Definition MSMetaData.h:813
casacore::MSMetaData::getMaxCacheSizeMB
Float getMaxCacheSizeMB() const
max cache size in MB
Definition MSMetaData.h:453
casacore::MSMetaData::getNRowMap
std::shared_ptr< const std::map< SubScanKey, rownr_t > > getNRowMap(CorrelationType type) const
casacore::MSMetaData::getAntennaStations
vector< String > getAntennaStations(const vector< uInt > &antennaIDs=vector< uInt >())
get the antenna stations for the specified antenna IDs
casacore::MSMetaData::getAntennaNames
vector< String > getAntennaNames(std::map< String, std::set< uInt > > &namesToIDsMap, const vector< uInt > &antennaIDs=vector< uInt >(0)) const
casacore::MSMetaData::_firstExposureTimeMap
vector< std::map< Int, Quantity > > _firstExposureTimeMap
Definition MSMetaData.h:818
casacore::MSMetaData::_dataDescIDToPolIDMap
vector< uInt > _dataDescIDToPolIDMap
Definition MSMetaData.h:767
casacore::MSMetaData::_uniqueBaselines
Matrix< Bool > _uniqueBaselines
Definition MSMetaData.h:809
casacore::MSMetaData::_getObservatoryPositions
vector< MPosition > _getObservatoryPositions()
casacore::MSMetaData::_nAntennas
uInt _nAntennas
Definition MSMetaData.h:764
casacore::MSMetaData::getTimesForIntent
std::set< Double > getTimesForIntent(const String &intent) const
get the time stamps associated with the specified intent
casacore::MSMetaData::getScansForFieldID
std::set< Int > getScansForFieldID(Int fieldID, Int obsID, Int arrayID) const
get the scan numbers associated with the specified field ID.
casacore::MSMetaData::_createScanRecords
void _createScanRecords(Record &parent, const ArrayKey &arrayKey, const std::map< SubScanKey, SubScanProperties > &subScanProps) const
casacore::MSMetaData::_fieldNames
vector< String > _fieldNames
Definition MSMetaData.h:793
casacore::MSMetaData::_getStateIDs
std::shared_ptr< Vector< Int > > _getStateIDs() const
casacore::MSMetaData::_getStationNames
vector< String > _getStationNames()
casacore::MSMetaData::getSpwsForScan
std::set< uInt > getSpwsForScan(const ScanKey &scan) const
get the set of spectral windows for the specified scan.
casacore::MSMetaData::_sizeof
static uInt _sizeof(const std::map< T, std::set< String > > &m)
casacore::MSMetaData::_getArrayIDs
std::shared_ptr< Vector< Int > > _getArrayIDs() const
casacore::MSMetaData::_observatoryPositions
vector< MPosition > _observatoryPositions
Definition MSMetaData.h:806
casacore::MSMetaData::getFieldsToSpwsMap
std::map< Int, std::set< uInt > > getFieldsToSpwsMap() const
get the mapping of fields to spws
casacore::MSMetaData::getScanToFirstExposureTimeMap
std::map< ScanKey, FirstExposureTimeMap > getScanToFirstExposureTimeMap(Bool showProgress) const
get map of scans to first exposure times
casacore::MSMetaData::getFieldsForScans
std::set< Int > getFieldsForScans(const std::set< ScanKey > &scans) const
get the field IDs associated with the specified scans
casacore::MSMetaData::_getSubScansAndIntentsMaps
void _getSubScansAndIntentsMaps(std::shared_ptr< const std::map< SubScanKey, std::set< String > > > &subScanToIntentsMap, std::map< String, std::set< SubScanKey > > &intentToSubScansMap) const
casacore::MSMetaData::getScanKeys
std::set< ScanKey > getScanKeys() const
get all ScanKeys in the dataset
casacore::MSMetaData::getSpwsForField
std::set< uInt > getSpwsForField(const Int fieldID) const
get a set of spectral windows corresponding to the specified fieldID
casacore::MSMetaData::_getSourceInfo
std::map< SourceKey, SourceProperties > _getSourceInfo() const
casacore::MSMetaData::_getScanToTimesMap
std::shared_ptr< std::map< ScanKey, std::set< Double > > > _getScanToTimesMap() const
casacore::MSMetaData::getTimesForScan
std::set< Double > getTimesForScan(const ScanKey &scan) const
get the times for the specified scan.
casacore::MSMetaData::getIntentToSpwsMap
std::map< String, std::set< uInt > > getIntentToSpwsMap()
casacore::MSMetaData::_scanProperties
std::shared_ptr< const std::map< ScanKey, ScanProperties > > _scanProperties
Definition MSMetaData.h:774
casacore::MSMetaData::_scanToSpwsMap
std::map< ScanKey, std::set< uInt > > _scanToSpwsMap
Definition MSMetaData.h:766
casacore::MSMetaData::_computeScanAndSubScanProperties
void _computeScanAndSubScanProperties(std::shared_ptr< std::map< ScanKey, MSMetaData::ScanProperties > > &scanProps, std::shared_ptr< std::map< SubScanKey, MSMetaData::SubScanProperties > > &subScanProps, Bool showProgress) const
casacore::MSMetaData::_sizeof
static uInt _sizeof(const vector< T > &v)
casacore::MSPointingColumns
Definition MSPointingColumns.h:78
casacore::Matrix
Definition Matrix.h:87
casacore::MeasurementSet
Definition MeasurementSet.h:278
casacore::Quantum
Definition Quantum.h:269
casacore::String
String: the storage and methods of handling collections of characters.
Definition String.h:223
casacore::TableProxy
Definition TableProxy.h:101
casacore::Unit
Definition Unit.h:187
casacore::Vector
Definition Vector.h:82
casacore::map
casacore::Record
Record()
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::False
const Bool False
Definition aipstype.h:42
casacore::time
TableExprNode time(const TableExprNode &node)
Definition ExprNode.h:1584
casacore::uInt
unsigned int uInt
Definition aipstype.h:49
casacore::scanKey
ScanKey scanKey(const SubScanKey &subScanKey)
create a ScanKey from a SubScanKey, just omits the SubScanKey's fieldID
Definition MSKeys.h:64
casacore::QVD
QVector< Double > QVD
Definition QVector.h:37
casacore::Float
float Float
Definition aipstype.h:52
casacore::name
String name() const
Return the name of the field.
Definition RecordField.h:163
casacore::Int
int Int
Definition aipstype.h:48
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
casacore::scanKeys
std::set< ScanKey > scanKeys(const std::set< Int > &scans, const ArrayKey &arrayKey)
construct scan keys given a set of scan numbers and an ArrayKey
casacore::Quantity
Quantum< Double > Quantity
Definition Quantum.h:39
casacore::True
const Bool True
Definition aipstype.h:41
casacore::Double
double Double
Definition aipstype.h:53
casacore::rownr_t
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44
casacore::ArrayKey
An ArrayKey is a unique combination of observation ID and array ID Negative values are allowed to ind...
Definition MSKeys.h:87
casacore::MSMetaData::ColumnStats
Definition MSMetaData.h:81
casacore::MSMetaData::ColumnStats::min
Double min
Definition MSMetaData.h:84
casacore::MSMetaData::ColumnStats::max
Double max
Definition MSMetaData.h:82
casacore::MSMetaData::ColumnStats::median
Double median
Definition MSMetaData.h:83
casacore::MSMetaData::ScanProperties
Definition MSMetaData.h:701
casacore::MSMetaData::ScanProperties::firstExposureTime
FirstExposureTimeMap firstExposureTime
The Int represents the data description ID, The Double represents the time of the first time stamp,...
Definition MSMetaData.h:706
casacore::MSMetaData::ScanProperties::meanInterval
std::map< uInt, Quantity > meanInterval
the key is the spwID, the value is the meanInterval for the subscan and that spwID
Definition MSMetaData.h:709
casacore::MSMetaData::ScanProperties::timeRange
std::pair< Double, Double > timeRange
time range (which takes into account helf of the corresponding interval, which is not accounted for i...
Definition MSMetaData.h:714
casacore::MSMetaData::ScanProperties::times
std::map< uInt, std::set< double > > times
times for each spectral window
Definition MSMetaData.h:716
casacore::MSMetaData::ScanProperties::spwNRows
std::map< uInt, rownr_t > spwNRows
number of rows for each spectral window
Definition MSMetaData.h:711
casacore::MSMetaData::SourceProperties
represents non-primary key data for a SOURCE table row
Definition MSMetaData.h:749
casacore::MSMetaData::SourceProperties::restfreq
std::shared_ptr< vector< MFrequency > > restfreq
Definition MSMetaData.h:751
casacore::MSMetaData::SourceProperties::transition
std::shared_ptr< vector< String > > transition
Definition MSMetaData.h:752
casacore::MSMetaData::SourceProperties::name
String name
Definition MSMetaData.h:750
casacore::MSMetaData::SpwProperties
Definition MSMetaData.h:719
casacore::MSMetaData::SpwProperties::edgechans
vector< double > edgechans
The center frequencies of the two channels at the edges of the window.
Definition MSMetaData.h:732
casacore::MSMetaData::SpwProperties::bbcno
uInt bbcno
Definition MSMetaData.h:733
casacore::MSMetaData::SpwProperties::corrbit
String corrbit
CAS-13749 value for adhoc ALMA-specific SPECTRAL_WINDOW column.
Definition MSMetaData.h:742
casacore::MSMetaData::SpwProperties::nchans
uInt nchans
Definition MSMetaData.h:730
casacore::MSMetaData::SpwProperties::name
String name
Definition MSMetaData.h:736
casacore::MSMetaData::SpwProperties::chanwidths
QVD chanwidths
Definition MSMetaData.h:722
casacore::MSMetaData::SpwProperties::sw
int sw
Definition MSMetaData.h:745
casacore::MSMetaData::SpwProperties::effbw
QVD effbw
EFFECTIVE_BANDWIDTH.
Definition MSMetaData.h:738
casacore::MSMetaData::SpwProperties::resolution
QVD resolution
RESOLUTION.
Definition MSMetaData.h:740
casacore::MSMetaData::SpwProperties::netsideband
int netsideband
Definition MSMetaData.h:723
casacore::MSMetaData::SpwProperties::chanfreqs
QVD chanfreqs
Definition MSMetaData.h:721
casacore::MSMetaData::SpwProperties::reffreq
MFrequency reffreq
from the REF_FREQUENCY column
Definition MSMetaData.h:735
casacore::MSMetaData::SpwProperties::bandwidth
double bandwidth
Definition MSMetaData.h:720
casacore::MSMetaData::SpwProperties::rb
int rb
CAS-13973 ALMA specific quantities sw = subwindow, rb = receiver band.
Definition MSMetaData.h:744
casacore::MSMetaData::SpwProperties::meanfreq
Quantity meanfreq
The sum of all channel frequencies divided by the number of channels.
Definition MSMetaData.h:725
casacore::MSMetaData::SpwProperties::centerfreq
Quantity centerfreq
The mean of the low frequency extent of the lowest frequency channel and the high frequency extend of...
Definition MSMetaData.h:729
casacore::MSMetaData::SubScanProperties
Definition MSMetaData.h:89
casacore::MSMetaData::SubScanProperties::spws
std::set< uInt > spws
Definition MSMetaData.h:107
casacore::MSMetaData::SubScanProperties::xcRows
rownr_t xcRows
number of cross-correlation rows.
Definition MSMetaData.h:93
casacore::MSMetaData::SubScanProperties::antennas
std::set< Int > antennas
Definition MSMetaData.h:94
casacore::MSMetaData::SubScanProperties::endTime
Double endTime
Definition MSMetaData.h:97
casacore::MSMetaData::SubScanProperties::meanExposureTime
Quantity meanExposureTime
Definition MSMetaData.h:106
casacore::MSMetaData::SubScanProperties::meanInterval
std::map< uInt, Quantity > meanInterval
the key is the spwID, the value is the meanInterval for the subscan and that spwID
Definition MSMetaData.h:100
casacore::MSMetaData::SubScanProperties::beginTime
Double beginTime
Definition MSMetaData.h:95
casacore::MSMetaData::SubScanProperties::ddIDs
std::set< uInt > ddIDs
Definition MSMetaData.h:96
casacore::MSMetaData::SubScanProperties::stateIDs
std::set< Int > stateIDs
Definition MSMetaData.h:110
casacore::MSMetaData::SubScanProperties::firstExposureTime
FirstExposureTimeMap firstExposureTime
The Int represents the data description ID, The Double represents the time of the first time stamp,...
Definition MSMetaData.h:105
casacore::MSMetaData::SubScanProperties::acRows
rownr_t acRows
number of auto-correlation rows
Definition MSMetaData.h:91
casacore::MSMetaData::SubScanProperties::timeProps
std::map< Double, TimeStampProperties > timeProps
Definition MSMetaData.h:111
casacore::MSMetaData::SubScanProperties::spwNRows
std::map< uInt, rownr_t > spwNRows
number of rows for each spectral window
Definition MSMetaData.h:109
casacore::MSMetaData::TimeStampProperties
Definition MSMetaData.h:76
casacore::MSMetaData::TimeStampProperties::nrows
rownr_t nrows
Definition MSMetaData.h:78
casacore::MSMetaData::TimeStampProperties::ddIDs
std::set< Int > ddIDs
Definition MSMetaData.h:77
casacore::ScanKey
A scan is a unique combination of observation ID, array ID, and scan number Negative values are allow...
Definition MSKeys.h:57
casacore::SourceKey
represents primary key in the SOURCE table
Definition MSKeys.h:107
casacore::SubScanKey
A sub scan is a unique combination of observation ID, array ID, scan number, and field ID.
Definition MSKeys.h:40