MSMetaData.h

Go to the documentation of this file.
00001 //# MSMetaData.h
00002 //# Copyright (C) 1998,1999,2000,2001
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: MSMetaData.h 21586 2015-03-25 13:46:25Z gervandiepen $
00027 
00028 #ifndef MS_MSMETADATA_H
00029 #define MS_MSMETADATA_H
00030 
00031 #include <casacore/casa/aips.h>
00032 #include <casacore/casa/Quanta/QVector.h>
00033 #include <casacore/measures/Measures/MFrequency.h>
00034 #include <casacore/measures/Measures/MPosition.h>
00035 #include <casacore/ms/MeasurementSets/MeasurementSet.h>
00036 #include <casacore/ms/MeasurementSets/MSPointingColumns.h>
00037 #include <casacore/casa/Utilities/CountedPtr.h>
00038 #include <map>
00039 
00040 namespace casacore {
00041 
00042 template <class T> class ArrayColumn;
00043 struct ArrayKey;
00044 struct ScanKey;
00045 struct SourceKey;
00046 struct SubScanKey;
00047 
00048 // <summary>
00049 // Class to interrogate  an MS for metadata. Interrogation happens on demand
00050 // and resulting metadata are stored for use by subsequent queries if the
00051 // cache has not exceeded the specified limit.
00052 // Parallel processing is enabled using openmp.
00053 // </summary>
00054 
00055 class MSMetaData {
00056 
00057 public:
00058 
00059     // for retrieving stats
00060     enum CorrelationType {
00061         AUTO,
00062         CROSS,
00063         BOTH
00064     };
00065 
00066     enum SQLDSwitch {
00067         SQLD_INCLUDE,
00068         SQLD_EXCLUDE,
00069         SQLD_ONLY
00070     };
00071 
00072     struct TimeStampProperties {
00073         std::set<Int> ddIDs;
00074         uInt nrows;
00075     };
00076 
00077     typedef std::map<Int, std::pair<Double, Quantity> > FirstExposureTimeMap;
00078 
00079     struct SubScanProperties {
00080         // number of auto-correlation rows
00081         uInt acRows;
00082         // number of cross-correlation rows.
00083         uInt xcRows;
00084         std::set<Int> antennas;
00085         Double beginTime;
00086         std::set<uInt> ddIDs;
00087         Double endTime;
00088         // the key is the spwID, the value is the meanInterval for
00089         // the subscan and that spwID
00090         std::map<uInt, Quantity> meanInterval;
00091         // The Int represents the data description ID,
00092         // The Double represents the time of the first time stamp,
00093         // The Quantity represents the exposure time for the corresponding
00094         // data description ID and time stamp
00095         FirstExposureTimeMap firstExposureTime;
00096         Quantity meanExposureTime;
00097         std::set<uInt> spws;
00098         // number of rows for each spectral window
00099         std::map<uInt, uInt> spwNRows;
00100         std::set<Int> stateIDs;
00101         std::map<Double, TimeStampProperties> timeProps;
00102     };
00103 
00104     // construct an object which stores a pointer to the MS and queries the MS
00105     // only as necessary. The MeasurementSet pointer passed in should not go out
00106     // of scope in the calling code until the caller has finished with this object,
00107     // or else subsequent method calls on this object will result in a segmentation
00108     // fault; the pointer is not copied.
00109     // <src>maxCacheSizeMB</src> is the maximum cache size in megabytes. <=0 means
00110     // do not use a cache, in which case, each method call will have to (re)query
00111     // the MS. It is highly recommended to use a cache of reasonable size for the
00112     // specified MS if multiple methods are going to be called.
00113     MSMetaData(const MeasurementSet *const &ms, const Float maxCacheSizeMB);
00114 
00115     virtual ~MSMetaData();
00116 
00117     // get the antenna diameters
00118     QVD getAntennaDiameters() const;
00119 
00120     // get the antenna ID for the antenna with the specified name.
00121     uInt getAntennaID(const String& antennaName) const;
00122 
00123     vector<uInt> getAntennaIDs(const vector<String>& antennaNames) const;
00124 
00125     // get the name of the antenna for the specified antenna ID
00126     vector<String> getAntennaNames(
00127         std::map<String, uInt>& namesToIDsMap,
00128         const vector<uInt>& antennaIDs=vector<uInt>(0)
00129     ) const;
00130 
00131     // get the antenna stations for the specified antenna IDs
00132     vector<String> getAntennaStations(const vector<uInt>& antennaIDs=vector<uInt>());
00133 
00134     // get the antenna stations for the specified antenna names
00135     vector<String> getAntennaStations(const vector<String>& antennaNames);
00136 
00137     // get the set of antenna IDs for the specified scan.
00138     std::set<Int> getAntennasForScan(const ScanKey& scan) const;
00139 
00140     // POLARIZATION.CORR_PRODUCT
00141     vector<Array<Int> > getCorrProducts() const;
00142 
00143     // POLARIZATION.CORR_TYPE
00144     vector<vector<Int> > getCorrTypes() const;
00145 
00146     vector<uInt> getDataDescIDToSpwMap() const;
00147 
00148     vector<uInt> getDataDescIDToPolIDMap() const;
00149 
00150     // Get the FIELD.SOURCE_ID column.
00151     vector<Int> getFieldTableSourceIDs() const;
00152 
00153     // get the mapping of field ID to scans
00154     vector<std::set<ScanKey> > getFieldToScansMap() const;
00155 
00156     std::map<String, std::set<Int> > getIntentToFieldsMap();
00157 
00158     std::map<String, std::set<ScanKey> > getIntentToScansMap();
00159 
00160     std::map<String, std::set<uInt> > getIntentToSpwsMap();
00161 
00162     std::set<String> getIntentsForScan(const ScanKey& scan) const;
00163 
00164     std::set<String> getIntentsForSubScan(const SubScanKey& subScan) const;
00165 
00166     SHARED_PTR<const std::map<SubScanKey, std::set<String> > > getSubScanToIntentsMap() const;
00167 
00168     // get all intents, in no particular (nor guaranteed) order.
00169     std::set<String> getIntents() const;
00170 
00171     // get a set of intents corresponding to a specified field
00172     std::set<String> getIntentsForField(Int fieldID);
00173 
00174     // get a set of intents corresponding to the specified spectral window
00175     std::set<String> getIntentsForSpw(const uInt spw);
00176 
00177     // number of correlations from the polarization table.
00178     vector<Int> getNumCorrs() const;
00179 
00180     //SOURCE.PROPER_MOTION, first value in pair is longitudinal proper motion,
00181     // second is latiduninal
00182     vector<std::pair<Quantity, Quantity> > getProperMotions() const;
00183 
00184     // get unique scan numbers
00185     std::set<Int> getScanNumbers(Int obsID, Int arrayID) const;
00186 
00187     // get a set of scan numbers for the specified stateID, obsID, and arrayID.
00188     // If obsID and/or arrayID is negative, all observation IDs and/or array IDs
00189     // will be used.
00190     std::set<Int> getScansForState(
00191         Int stateID, Int obsID, Int arrayID
00192     ) const;
00193 
00194     // get the mapping of scans to states
00195     std::map<ScanKey, std::set<Int> > getScanToStatesMap() const;
00196 
00197     // SOURCE.DIRECTION
00198     vector<MDirection> getSourceDirections() const;
00199 
00200     // SOURCE.NAME
00201     vector<String> getSourceNames() const;
00202 
00203     // Get the SOURCE.SOURCE_ID column. This is a very unfortunate column name,
00204     // because generally an "ID" column of the table with the same name refers to
00205     // the row number in that table. But not in this case.
00206     vector<Int> getSourceTableSourceIDs() const;
00207 
00208     // get a set of spectral windows for which the specified <src>intent</src>
00209     // applies.
00210     virtual std::set<uInt> getSpwsForIntent(const String& intent);
00211 
00212     // get the number of visibilities
00213     uInt nRows() const;
00214 
00215     uInt nRows(CorrelationType cType);
00216 
00217     SHARED_PTR<const std::map<SubScanKey, uInt> > getNRowMap(CorrelationType type) const;
00218 
00219     uInt nRows(
00220         CorrelationType cType, Int arrayID, Int observationID,
00221         Int scanNumber, Int fieldID
00222     ) const;
00223 
00224     uInt nRows(CorrelationType cType, uInt fieldID) const;
00225 
00226     // get number of spectral windows
00227     uInt nSpw(Bool includewvr) const;
00228 
00229     // number of unique states (number of rows from the STATE table)
00230     uInt nStates() const;
00231 
00232     // get the number of fields.
00233     uInt nFields() const;
00234 
00235     // get a mapping of spectral window ID to data descrption IDs
00236     std::vector<std::set<uInt> > getSpwToDataDescriptionIDMap() const;
00237 
00238     // get a set of spectral windows corresponding to the specified fieldID
00239     std::set<uInt> getSpwsForField(const Int fieldID) const;
00240 
00241     // get a set of spectral windows corresponding to the specified field name
00242     std::set<uInt> getSpwsForField(const String& fieldName);
00243 
00244     // get the values of the CODE column from the field table
00245     vector<String> getFieldCodes() const;
00246 
00247     // get the set of field IDs corresponding to the specified spectral window.
00248     std::set<Int> getFieldIDsForSpw(const uInt spw);
00249 
00250     // get the set of field names corresponding to the specified spectral window.
00251     std::set<String> getFieldNamesForSpw(const uInt spw);
00252 
00253     // get the mapping of fields to spws
00254     std::map<Int, std::set<uInt> > getFieldsToSpwsMap() const;
00255 
00256     // get rest frequencies from the SOURCE table
00257     std::map<SourceKey, SHARED_PTR<vector<MFrequency> > > getRestFrequencies() const;
00258 
00259     // get the set of spectral windows for the specified scan.
00260     std::set<uInt> getSpwsForScan(const ScanKey& scan) const;
00261 
00262     // get the set of spectral windows for the specified subscan.
00263     std::set<uInt> getSpwsForSubScan(const SubScanKey& subScan) const;
00264 
00265     // get the set of scan numbers for the specified spectral window.
00266     std::set<Int> getScansForSpw(uInt spw, Int obsID, Int arrayID) const;
00267 
00268     // get the complete mapping of scans to spws
00269     std::map<ScanKey, std::set<uInt> > getScanToSpwsMap() const;
00270 
00271     // get the complete mapping of spws to scans
00272     std::vector<std::set<ScanKey> > getSpwToScansMap() const;
00273 
00274     // get the transitions from the SOURCE table. If there are no transitions
00275     // for a particular key, the shared ptr contains the null ptr.
00276     std::map<SourceKey, SHARED_PTR<vector<String> > > getTransitions() const;
00277 
00278     // get the number of antennas in the ANTENNA table
00279     uInt nAntennas() const;
00280 
00281     // ALMA-specific. get set of spectral windows used for TDM. These are windows that have
00282     // 64, 128, or 256 channels
00283     std::set<uInt> getTDMSpw();
00284 
00285     // ALMA-specific. get set of spectral windows used for FDM. These are windows that do not
00286     // have 1, 4, 64, 128, or 256 channels.
00287     std::set<uInt> getFDMSpw();
00288 
00289     // ALMA-specific. get spectral windows that have been averaged. These are windows with 1 channel.
00290     std::set<uInt> getChannelAvgSpw();
00291 
00292     // ALMA-specific. Get the spectral window set used for WVR measurements. These have 4 channels each.
00293     std::set<uInt> getWVRSpw() const;
00294 
00295     // ALMA-specific. Get the square law detector (total power) spectral windows.
00296     std::set<uInt> getSQLDSpw();
00297 
00298     // Get the scan numbers which fail into the specified time range (center-tol to center+tol),
00299     // inclusive. A negative value of obsID and/or arrayID indicates that all observation IDs
00300     // and/or all arrayIDs should be used.
00301     std::set<Int> getScansForTimes(
00302         Double center, Double tol, Int obsID, Int arrayID
00303     ) const;
00304 
00305     // Get the times for the specified scans
00306     std::set<Double> getTimesForScans(std::set<ScanKey> scans) const;
00307 
00308     // get the times for the specified scan.
00309     // The return values come from the TIME column.
00310     std::set<Double> getTimesForScan(const ScanKey& scan) const;
00311 
00312     std::map<uInt, std::set<Double> > getSpwToTimesForScan(const ScanKey& scan) const;
00313 
00314     // get the time range for the specified scan. The pair will contain
00315     // the start and stop time of the scan, determined from min(TIME(x)-0.5*INTERVAL(x)) and
00316     // max(TIME(x)-0.5*INTERVAL(x))
00317     std::pair<Double, Double> getTimeRangeForScan(const ScanKey& scanKey) const;
00318 
00319     // get the map of scans to time ranges.
00320     SHARED_PTR<const std::map<ScanKey, std::pair<Double,Double> > > getScanToTimeRangeMap() const;
00321 
00322     // get the times for the specified scan
00323     // std::set<Double> getTimesForScan(const uInt scan) const;
00324 
00325     // get the stateIDs associated with the specified scan. If obsID and/or arrayID
00326     // is negative, all observation IDs and/or array IDs will be used.
00327     std::set<Int> getStatesForScan(Int obsID, Int arrayID, Int scan) const;
00328 
00329     // get the position of the specified antenna relative to the observatory position.
00330     // the three vector returned represents the longitudinal, latitudinal, and elevation
00331     // offsets (elements 0, 1, and 2 respectively). The longitude and latitude offsets are
00332     // measured along the surface of a sphere centered at the earth's center and whose surface
00333     // intersects the position of the observatory.
00334     QVD getAntennaOffset(uInt which);
00335 
00336     QVD getAntennaOffset(const String& name);
00337 
00338     vector<QVD > getAntennaOffsets() const;
00339 
00340     // get the positions of the specified antennas. If <src>which</src> is empty, return
00341     // all antenna positions.
00342     vector<MPosition> getAntennaPositions(
00343         const vector<uInt>& which=std::vector<uInt>(0)
00344     ) const;
00345 
00346     // <src>names</src> cannot be empty.
00347     vector<MPosition> getAntennaPositions(const vector<String>& names);
00348 
00349     // the first key in the returned map is the spectral window ID, the second is
00350     // the average interval for the specified scan for that spw.
00351     std::map<uInt, Double> getAverageIntervalsForScan(const ScanKey& scan) const;
00352 
00353     // the first key in the returned map is the spectral window ID, the second is
00354     // the average interval for the specified sub scan for that spw.
00355     std::map<uInt, Quantity> getAverageIntervalsForSubScan(const SubScanKey& subScan) const;
00356 
00357     vector<uInt> getBBCNos() const;
00358 
00359     std::map<uInt, std::set<uInt> > getBBCNosToSpwMap(SQLDSwitch sqldSwitch);
00360 
00361     vector<vector<Double> > getEdgeChans();
00362     //Get the phase direction for a given field id and epoch
00363     //interpolate polynomial if it is the field id  is such or use ephemerides table 
00364     //if that is attached to that field id
00365     MDirection phaseDirFromFieldIDAndTime(const uInt fieldID,  
00366                           const MEpoch& ep=MEpoch(Quantity(0.0, Unit("s")))) const ;
00367 
00368     // Get the reference direction for a given field ID and epoch interpolate
00369     // polynomial if it is the field ID is such or use ephemerides table
00370     // if that is attached to that field ID
00371     MDirection getReferenceDirection(
00372         const uInt fieldID,
00373         const MEpoch& ep=MEpoch(Quantity(0.0, Unit("s")))
00374     ) const;
00375     
00376     // get the field IDs for the specified field name. Case insensitive.
00377     std::set<Int> getFieldIDsForField(const String& field) const;
00378     
00379     // get a list of the field names in the order in which they appear in the FIELD table.
00380     vector<String> getFieldNames() const;
00381 
00382     // get field IDs associated with the specified scan number.
00383     std::set<Int> getFieldsForScan(const ScanKey& scan) const;
00384 
00385     // get the field IDs associated with the specified scans
00386     std::set<Int> getFieldsForScans(
00387         const std::set<Int>& scans, Int obsID, Int arrayID
00388     ) const;
00389 
00390     // get the field IDs associated with the specified scans
00391     std::set<Int> getFieldsForScans(const std::set<ScanKey>& scans) const;
00392 
00393     // get the field IDs associated with the specified intent.
00394     std::set<Int> getFieldsForIntent(const String& intent);
00395 
00396     // get the field IDs associated with the specified source.
00397     std::set<Int> getFieldsForIntent(uInt sourceID) const;
00398 
00399     std::map<Int, std::set<Int> > getFieldsForSourceMap() const;
00400 
00401     std::map<Int, std::set<String> > getFieldNamesForSourceMap() const;
00402 
00403     // get the field names associated with the specified field IDs. If <src>fieldIDs</src>
00404     // is empty, a vector of all the field names is returned.
00405     vector<String> getFieldNamesForFieldIDs(const vector<uInt>& fieldIDs);
00406 
00407     // Get the fields which fail into the specified time range (center-tol to center+tol)
00408     std::set<Int> getFieldsForTimes(Double center, Double tol);
00409 
00410     // max cache size in MB
00411     Float getMaxCacheSizeMB() const { return _maxCacheMB; }
00412 
00413     // get telescope names in the order they are listed in the OBSERVATION table. These are
00414     // the telescopes (observatories), not the antenna names.
00415     vector<String> getObservatoryNames();
00416 
00417     // get the position of the specified telescope (observatory).
00418     MPosition getObservatoryPosition(uInt which) const;
00419 
00420     // get the phase directions from the FIELD subtable. The <src>ep</src> parameter
00421     // specifies for which epoch to return the directions of any ephemeris objects
00422     // in the data set. It is ignored for non-ephemeris objects.
00423     vector<MDirection> getPhaseDirs(const MEpoch& ep=MEpoch(Quantity(0.0, Unit("s")))) const;
00424 
00425     // get all ScanKeys in the dataset
00426     std::set<ScanKey> getScanKeys() const;
00427 
00428     // get all ScanKeys in the dataset that have the specified <src>arrayKey</src>.
00429     // If negative values for either the obsID and/or arrayID portions of the ArrayKey
00430     // indicate that all obsIDs and/or arrayIDs should be used.
00431     std::set<ScanKey> getScanKeys(const ArrayKey& arrayKey) const;
00432 
00433     // get the scans associated with the specified intent
00434     std::set<Int> getScansForIntent(
00435         const String& intent, Int obsID, Int arrayID
00436     ) const;
00437 
00438     // get the scan numbers associated with the specified field ID.
00439     std::set<Int> getScansForFieldID(Int fieldID, Int obsID, Int arrayID) const;
00440 
00441     // get the scan numbers associated with the specified field. Subclasses should not implement or override.
00442     std::set<Int> getScansForField(const String& field, Int obsID, Int arrayID) const;
00443 
00444     // The first value of the pair is spw, the second is polarization ID.
00445     std::map<std::pair<uInt, uInt>, uInt> getSpwIDPolIDToDataDescIDMap() const;
00446 
00447     // get a map of the spwIDs to spw names from the spw table
00448     vector<String> getSpwNames() const;
00449 
00450     // get all the spws associated with the data description IDs listed in the main table.
00451     // This will not correspond to a list of the row numbers in the SPECTRAL_WINDOW table
00452     // if there are data description IDs that are not in the main table.
00453     std::set<uInt> getSpwIDs() const;
00454 
00455     // get all sub scan keys for the specified array key.
00456     std::set<SubScanKey> getSubScanKeys(const ArrayKey& arrayKey) const;
00457 
00458     // get the sub scan properties for the specified sub scan.
00459 
00460     SubScanProperties getSubScanProperties(
00461         const SubScanKey& subScan, Bool showProgress=False
00462     ) const;
00463 
00464     SHARED_PTR<const std::map<SubScanKey, SubScanProperties> > getSubScanProperties(
00465         Bool showProgress=False
00466     ) const;
00467 
00468     // If True, force the subscan properties structure to be
00469     // cached regardless of the stipulations on the maximum cache. Normally,
00470     // the subscan properties structure is small compared to the size of any
00471     // one column that is necessary to create it, and since creating this
00472     // structure can be very expensive, especially for large datasets, it
00473     // is often a good idea to cache it if it will be accessed many times.
00474     void setForceSubScanPropsToCache(Bool b) { _forceSubScanPropsToCache = b; }
00475 
00476     // get a data structure, consumable by users, representing a summary of the dataset
00477     Record getSummary() const;
00478 
00479     // get the times for which the specified field was observed
00480     std::set<Double> getTimesForField(Int fieldID);
00481 
00482     // get the time stamps associated with the specified intent
00483     std::set<Double> getTimesForIntent(const String& intent) const;
00484     Bool hasBBCNo() const;
00485 
00486     //std::map<Double, Double> getExposuresForTimes() const;
00487 
00488     // get the unique baselines in the MS. These are not necessarily every combination of the
00489     // n(n-1)/2 possible antenna pairs, but rather the number of unique baselines represented in
00490     // the main MS table, which in theory can be less than n(n-1)/2 (for example if samples for
00491     // certain antenna pairs are not recorded. The returned Matrix is nAnts x nAnts in size. Pairs
00492     // that are true represent baselines represented in the main MS table.
00493     Matrix<Bool> getUniqueBaselines();
00494 
00495     // get the number of unique baselines represented in the main MS table which in theory can be
00496     // less than n*(n-1)/2. If <src>includeAutoCorrelation</src> is True, include autocorrelation
00497     // "baselines" in the enumeration.
00498     virtual uInt nBaselines(Bool includeAutoCorrelation=False);
00499 
00500     // get the effective total exposure time. This is the effective time spent collecting unflagged data.
00501     Quantity getEffectiveTotalExposureTime();
00502 
00503     // get the number of scans in the dataset
00504     uInt nScans();
00505 
00506     // get the number of observations (from the OBSERVATIONS table) in the dataset
00507     uInt nObservations() const;
00508 
00509     // get the contents of the OBSERVER column from the OBSERVATIONS table
00510     vector<String> getObservers() const;
00511 
00512     // get the contents of the PROJECT column from the OBSERVATIONS table
00513     vector<String> getProjects() const;
00514 
00515     // get the contents of the SCHEDULE column from the OBSERVATIONS table
00516     // Note that the embedded vectors may have different lengths
00517     vector<vector<String> > getSchedules() const;
00518 
00519     // get the time ranges from the OBSERVATION table
00520     vector<std::pair<MEpoch, MEpoch> > getTimeRangesOfObservations() const;
00521 
00522     // get the number of arrays (from the ARRAY table) in the dataset
00523     uInt nArrays();
00524 
00525     // get the number of data description IDs (from the DATA_DESCRIPTION table)
00526     uInt nDataDescriptions() const;
00527 
00528     // get the number of unflagged rows
00529     Double nUnflaggedRows() const;
00530 
00531     Double nUnflaggedRows(CorrelationType cType) const;
00532 
00533     Double nUnflaggedRows(
00534         CorrelationType cType, Int arrayID, uInt observationID,
00535         Int scanNumber, uInt fieldID
00536     ) const;
00537 
00538     Double nUnflaggedRows(CorrelationType cType, Int fieldID) const;
00539 
00540     inline Float getCache() const { return _cacheMB;}
00541 
00542     vector<Double> getBandWidths() const;
00543 
00544     vector<Quantity> getCenterFreqs() const;
00545 
00546     // get the effective bandwidth for each channel. Each element in
00547     // the returned vector represents a separate spectral window, with
00548     // ID given by its location in the vector. If asVelWidths is True,
00549     // convert the values to velocity widths.
00550     vector<QVD> getChanEffectiveBWs(Bool asVelWidths) const;
00551 
00552     vector<QVD > getChanFreqs() const;
00553 
00554     // get the resolution for each channel. Each element in
00555     // the returned vector represents a separate spectral window, with
00556     // ID given by its location in the vector. If asVelWidths is True,
00557     // convert the values to velocity widths.
00558     vector<QVD> getChanResolutions(Bool asVelWidths) const;
00559 
00560     vector<QVD > getChanWidths() const;
00561 
00562     vector<Quantity> getMeanFreqs() const;
00563 
00564     vector<Int> getNetSidebands() const;
00565 
00566     vector<MFrequency> getRefFreqs() const;
00567 
00568     vector<uInt> nChans() const;
00569 
00570     uInt nPol();
00571 
00572     // DEPRECATED
00573     // get a map of data desc ID, scan number pair to exposure time for the first time
00574     // for that data desc ID, scan number pair
00575     std::vector<std::map<Int, Quantity> > getFirstExposureTimeMap();
00576 
00577     // get map of scans to first exposure times
00578     std::map<ScanKey, FirstExposureTimeMap> getScanToFirstExposureTimeMap(Bool showProgress) const;
00579 
00580     // get polarization IDs for the specified scan and spwid
00581     std::set<uInt> getPolarizationIDs(uInt obsID, Int arrayID, Int scan, uInt spwid) const;
00582 
00583     // get the unique antennas (the union of the ANTENNA_1 and ANTENNA_2 columns) from
00584     // the main table
00585     const std::set<Int>& getUniqueAntennaIDs() const;
00586 
00587     // get unique data description IDs that exist in the main table
00588     std::set<uInt> getUniqueDataDescIDs() const;
00589 
00590     // DEPRECATED because of spelling error. Use getUniqueFieldIDs()
00591     // instead.
00592     inline std::set<Int> getUniqueFiedIDs() const {
00593         return getUniqueFieldIDs();
00594     }
00595 
00596     // get unique field IDs that exist in the main table.
00597     std::set<Int> getUniqueFieldIDs() const;
00598 
00599     // get the pointing directions associated with antenna1 and antenna2 for
00600     // the specified row of the main MS table
00601     std::pair<MDirection, MDirection> getPointingDirection(
00602         Int& ant1, Int& ant2, Double& time, uInt row,
00603         Bool interpolate=false, Int initialguess=0
00604     ) const;
00605 
00606     // get the time range for the entire dataset. min(TIME(x) - 0.5*INTERVAL(x)) to
00607     // max(TIME(x) + 0.5*INTERVAL(x))
00608     std::pair<Double, Double> getTimeRange(Bool showProgress=False) const;
00609 
00610     // Number of unique values from SOURCE.SOURCE_ID
00611     uInt nUniqueSourceIDsFromSourceTable() const;
00612 
00613     // get the unique spectral window IDs represented by the data description
00614     // IDs that appear in the main table
00615     std::set<uInt> getUniqueSpwIDs() const;
00616 
00617     const MeasurementSet* getMS() const { return _ms; }
00618 
00619     void setShowProgress(Bool b) { _showProgress = b; }
00620 
00621 private:
00622 
00623     struct ScanProperties {
00624         // The Int represents the data description ID,
00625         // The Double represents the time of the first time stamp,
00626         // The Quantity represents the exposure time for the corresponding
00627         // data description ID and time stamp
00628         FirstExposureTimeMap firstExposureTime;
00629         // the key is the spwID, the value is the meanInterval for
00630         // the subscan and that spwID
00631         std::map<uInt, Quantity> meanInterval;
00632         // number of rows for each spectral window
00633         std::map<uInt, uInt> spwNRows;
00634         // time range (which takes into account helf of the corresponding
00635         // interval, which is not accounted for in the SubScanProperties times
00636         std::pair<Double, Double> timeRange;
00637         // times for each spectral window
00638         std::map<uInt, std::set<Double> > times;
00639     };
00640 
00641     struct SpwProperties {
00642         Double bandwidth;
00643         QVD chanfreqs;
00644         QVD chanwidths;
00645         Int netsideband;
00646         // The sum of all channel frequencies divided by the number of channels
00647         Quantity meanfreq;
00648         // The mean of the low frequency extent of the lowest frequency channel and
00649         // the high frequency extend of the highest frequency channel. Often, but not
00650         // necessarily, the same as meanfreq
00651         Quantity centerfreq;
00652         uInt nchans;
00653         // The center frequencies of the two channels at the edges of the window
00654         vector<Double> edgechans;
00655         uInt bbcno;
00656         // from the REF_FREQUENCY column
00657         MFrequency reffreq;
00658         String name;
00659         // EFFECTIVE_BANDWIDTH
00660         QVD effbw;
00661         // RESOLUTION
00662         QVD resolution;
00663     };
00664 
00665     // represents non-primary key data for a SOURCE table row
00666     struct SourceProperties {
00667         String name;
00668         SHARED_PTR<vector<MFrequency> > restfreq;
00669         SHARED_PTR<vector<String> > transition;
00670     };
00671 
00672     // The general pattern is that a mutable gets set only once, on demand, when its
00673     // setter is called for the first time. If this pattern is broken, defective behavior
00674     // will occur.
00675 
00676     const MeasurementSet* _ms;
00677     Bool _showProgress;
00678     mutable Float _cacheMB;
00679     const Float _maxCacheMB;
00680     mutable uInt _nStates, _nACRows, _nXCRows, _nSpw, _nFields, _nAntennas,
00681         _nObservations, _nScans, _nArrays, _nrows, _nPol, _nDataDescIDs;
00682     mutable std::map<ScanKey, std::set<uInt> > _scanToSpwsMap, _scanToDDIDsMap;
00683     mutable vector<uInt> _dataDescIDToSpwMap, _dataDescIDToPolIDMap;
00684     mutable std::map<Int, std::set<uInt> > _fieldToSpwMap;
00685     mutable std::map<ScanKey, std::set<Int> > _scanToStatesMap, _scanToFieldsMap, _scanToAntennasMap;
00686     mutable std::map<Int, std::set<Int> >    _fieldToStatesMap, _stateToFieldsMap, _sourceToFieldsMap;
00687     mutable std::map<std::pair<uInt, uInt>, uInt> _spwPolIDToDataDescIDMap;
00688     mutable std::map<String, uInt> _antennaNameToIDMap;
00689     mutable SHARED_PTR<const std::map<ScanKey, ScanProperties> > _scanProperties;
00690     mutable SHARED_PTR<const std::map<SubScanKey, SubScanProperties> > _subScanProperties;
00691 
00692     mutable std::map<String, std::set<Int> > _intentToFieldIDMap;
00693     mutable std::map<String, std::set<ScanKey> > _intentToScansMap;
00694     mutable std::map<String, std::set<SubScanKey> > _intentToSubScansMap;
00695     mutable std::map<std::pair<ScanKey, uInt>, std::set<uInt> > _scanSpwToPolIDMap;
00696     mutable std::set<String> _uniqueIntents;
00697     mutable std::set<Int>  _uniqueFieldIDs, _uniqueStateIDs, _uniqueAntennaIDs;
00698     mutable std::set<uInt> _avgSpw, _tdmSpw, _fdmSpw, _wvrSpw, _sqldSpw, _uniqueDataDescIDs;
00699     mutable SHARED_PTR<Vector<Int> > _antenna1, _antenna2, _scans, _fieldIDs,
00700         _stateIDs, _dataDescIDs, _observationIDs, _arrayIDs;
00701     mutable SHARED_PTR<std::map<SubScanKey, uInt> > _subScanToNACRowsMap, _subScanToNXCRowsMap;
00702     mutable SHARED_PTR<std::map<Int, uInt> > _fieldToNACRowsMap, _fieldToNXCRowsMap;
00703     mutable std::map<ScanKey, std::set<String> > _scanToIntentsMap;
00704     mutable SHARED_PTR<const std::map<SubScanKey, std::set<String> > > _subScanToIntentsMap;
00705     mutable vector<std::set<String> > _stateToIntentsMap, _spwToIntentsMap, _fieldToIntentsMap;
00706     mutable vector<SpwProperties> _spwInfo;
00707     mutable vector<std::set<Int> > _spwToFieldIDsMap, _obsToArraysMap;
00708     mutable vector<std::set<ScanKey> > _spwToScansMap, _ddidToScansMap, _fieldToScansMap;
00709 
00710     mutable vector<String> _fieldNames, _antennaNames, _observatoryNames,
00711         _stationNames, _observers, _projects, _sourceNames, _fieldCodes;
00712     mutable vector<vector<String> > _schedules;
00713     mutable vector<vector<Int> > _corrTypes;
00714     mutable vector<Array<Int> >_corrProds;
00715 
00716     mutable SHARED_PTR<Vector<Double> > _times;
00717     mutable SHARED_PTR<Quantum<Vector<Double> > > _exposures, _intervals;
00718     mutable SHARED_PTR<std::map<ScanKey, std::set<Double> > > _scanToTimesMap;
00719     std::map<String, std::set<uInt> > _intentToSpwsMap;
00720     mutable std::map<String, std::set<Double> > _intentToTimesMap;
00721 
00722     SHARED_PTR<std::map<Int, std::set<Double> > > _fieldToTimesMap;
00723     SHARED_PTR<std::map<Double, std::set<Int> > > _timeToFieldsMap;
00724 
00725     mutable vector<MPosition> _observatoryPositions, _antennaPositions;
00726     mutable vector<QVD > _antennaOffsets;
00727     mutable QVD _antennaDiameters;
00728     Matrix<Bool> _uniqueBaselines;
00729     Quantity _exposureTime;
00730     mutable Double _nUnflaggedACRows, _nUnflaggedXCRows;
00731     mutable SHARED_PTR<vector<Double> > _unflaggedFieldNACRows, _unflaggedFieldNXCRows;
00732     mutable SHARED_PTR<std::map<SubScanKey, Double> > _unflaggedSubScanNACRows, _unflaggedSubScanNXCRows;
00733     const String _taqlTableName;
00734     const vector<const Table*> _taqlTempTable;
00735     mutable SHARED_PTR<ArrayColumn<Bool> > _flagsColumn;
00736 
00737     mutable Bool _spwInfoStored, _forceSubScanPropsToCache;
00738     vector<std::map<Int, Quantity> > _firstExposureTimeMap;
00739     mutable vector<Int> _numCorrs, _source_sourceIDs, _field_sourceIDs;
00740 
00741     mutable std::set<ArrayKey> _arrayKeys;
00742     mutable std::set<ScanKey> _scanKeys;
00743     mutable std::set<SubScanKey> _subscans;
00744     mutable std::map<ScanKey, std::set<SubScanKey> > _scanToSubScans;
00745     mutable std::map<ArrayKey, std::set<SubScanKey> > _arrayToSubScans;
00746 
00747     mutable vector<std::pair<MEpoch, MEpoch> > _timeRangesForObs;
00748 
00749     mutable vector<MDirection> _phaseDirs, _sourceDirs;
00750 
00751     mutable vector<std::pair<Quantity, Quantity> > _properMotions;
00752 
00753     mutable std::map<SourceKey, SourceProperties> _sourceInfo;
00754     mutable SHARED_PTR<std::set<Int> > _ephemFields;
00755 
00756     // disallow copy constructor and = operator
00757     MSMetaData(const MSMetaData&);
00758     MSMetaData operator =(const MSMetaData&);
00759 
00760     // This comment from thunter in the original ValueMapping python class
00761     // # Determine the number of polarizations for the first OBSERVE_TARGET intent.
00762     // # Used by plotbandpass for BPOLY plots since the number of pols cannot be inferred
00763     // # correctly from the caltable alone.  You cannot not simply use the first row, because
00764     // # it may be a pointing scan which may have different number of polarizations than what
00765     // # the TARGET and BANDPASS calibrator will have.
00766     // # -- T. Hunter
00767     // uInt _getNumberOfPolarizations();
00768 
00769     void _setSpwInfo(const MeasurementSet& ms);
00770 
00771     // set metadata from OBSERVATION table
00772     void _setObservation(const MeasurementSet& ms);
00773 
00774     Bool _cacheUpdated(const Float incrementInBytes) const;
00775 
00776     void _checkField(uInt fieldID) const;
00777 
00778     void _checkScan(const ScanKey& key) const;
00779 
00780     void _checkScans(const std::set<ScanKey>& scanKeys) const;
00781 
00782     void _checkSubScan(const SubScanKey& key) const;
00783 
00784     static void _checkTolerance(const Double tol);
00785 
00786     void _computeScanAndSubScanProperties(
00787         SHARED_PTR<std::map<ScanKey, MSMetaData::ScanProperties> >& scanProps,
00788         SHARED_PTR<std::map<SubScanKey, MSMetaData::SubScanProperties> >& subScanProps,
00789         Bool showProgress
00790     ) const;
00791 
00792     void _createScanRecords(
00793         Record& parent, const ArrayKey& arrayKey,
00794         const std::map<SubScanKey, SubScanProperties>& subScanProps
00795     ) const;
00796 
00797     void _createSubScanRecords(
00798         Record& parent, uInt& scanNRows, std::set<Int>& antennasForScan,
00799         const ScanKey& scanKey, const std::map<SubScanKey, SubScanProperties>& subScanProps
00800     ) const;
00801 
00802     static void _createTimeStampRecords(
00803         Record& parent,
00804         const SubScanProperties& subScanProps
00805     );
00806 
00807     // convert a QVD in frequency units to velocity units using
00808     // the give reference frequency. No explicit checking is done
00809     // for unit correctness of the inputs.
00810     static QVD _freqWidthToVelWidth(const QVD& v, const Quantity& refFreq);
00811 
00812     // if _scanProps has been generated, just return it. If the caller has
00813     // configured the object to generate _scanProps at some point, this call will
00814     // generate it. Otherwise, the returned object contains a null pointer.
00815     SHARED_PTR<const map<ScanKey, ScanProperties> > _generateScanPropsIfWanted() const;
00816 
00817     // if _subScanProperties has been generated, just return it. If
00818     // the caller has configured the object to generate _subScanPropertiess
00819     // at some point, this call will generate it. Otherwise, the returned object
00820     // contains a null pointer.
00821     SHARED_PTR<const map<SubScanKey, SubScanProperties> >
00822     _generateSubScanPropsIfWanted() const;
00823 
00824     vector<String> _getAntennaNames(
00825         std::map<String, uInt>& namesToIDsMap
00826     ) const;
00827 
00828     vector<MPosition> _getAntennaPositions() const;
00829 
00830     void _getAntennas(
00831         SHARED_PTR<Vector<Int> >& ant1,
00832         SHARED_PTR<Vector<Int> >& ant2
00833     ) const;
00834 
00835     SHARED_PTR<Vector<Int> > _getArrayIDs() const;
00836 
00837     std::map<ArrayKey, std::set<SubScanKey> > _getArrayKeysToSubScanKeys() const;
00838 
00839     // Uses openmp for parallel processing
00840     pair<std::map<ScanKey, ScanProperties>, std::map<SubScanKey, SubScanProperties> >
00841     _getChunkSubScanProperties(
00842         SHARED_PTR<const Vector<Int> > scans, SHARED_PTR<const Vector<Int> > fields,
00843         SHARED_PTR<const Vector<Int> > ddIDs, SHARED_PTR<const Vector<Int> > states,
00844         SHARED_PTR<const Vector<Double> > times, SHARED_PTR<const Vector<Int> > arrays,
00845         SHARED_PTR<const Vector<Int> > observations, SHARED_PTR<const Vector<Int> > ant1,
00846         SHARED_PTR<const Vector<Int> > ant2, SHARED_PTR<const Quantum<Vector<Double> > > exposureTimes,
00847         SHARED_PTR<const Quantum<Vector<Double> > > intervalTimes, const vector<uInt>& ddIDToSpw,
00848         uInt beginRow, uInt endRow
00849     ) const;
00850 
00851     SHARED_PTR<Vector<Int> > _getDataDescIDs() const;
00852 
00853     // get the field IDs of ephemeris objects
00854     SHARED_PTR<std::set<Int> > _getEphemFieldIDs() const;
00855 
00856     SHARED_PTR<Quantum<Vector<Double> > > _getExposureTimes() const;
00857 
00858     SHARED_PTR<Vector<Int> > _getFieldIDs() const;
00859 
00860     // If there are no intents, then fieldToIntentsMap will be of length
00861     // nFields() and all of its entries will be the empty set, and
00862     // intentToFieldsMap will be empty
00863     void _getFieldsAndIntentsMaps(
00864         vector<std::set<String> >& fieldToIntentsMap,
00865         std::map<String, std::set<Int> >& intentToFieldsMap
00866     );
00867 
00868     void _getFieldsAndScansMaps(
00869         vector<std::set<ScanKey> >& fieldToScansMap,
00870         std::map<ScanKey, std::set<Int> >& scanToFieldsMap
00871     ) const;
00872 
00873     void _getFieldsAndSpwMaps(
00874         std::map<Int, std::set<uInt> >& fieldToSpwMap,
00875         vector<std::set<Int> >& spwToFieldMap
00876     ) const;
00877 
00878     void _getFieldsAndStatesMaps(
00879         std::map<Int, std::set<Int> >& fieldToStatesMap,
00880         std::map<Int, std::set<Int> >& stateToFieldsMap
00881     );
00882 
00883     void _getFieldsAndTimesMaps(
00884         SHARED_PTR<std::map<Int, std::set<Double> > >& fieldToTimesMap,
00885         SHARED_PTR<std::map<Double, std::set<Int> > >& timesToFieldMap
00886     );
00887 
00888     SHARED_PTR<ArrayColumn<Bool> > _getFlags() const;
00889 
00890     std::map<String, std::set<Double> > _getIntentsToTimesMap() const;
00891 
00892     SHARED_PTR<Quantum<Vector<Double> > > _getIntervals() const;
00893 
00894     SHARED_PTR<Vector<Int> > _getObservationIDs() const;
00895 
00896     SHARED_PTR<Vector<Int> > _getScans() const;
00897 
00898     vector<std::set<String> > _getSpwToIntentsMap();
00899 
00900     SHARED_PTR<Vector<Int> > _getStateIDs() const;
00901 
00902     SHARED_PTR<Vector<Double> > _getTimes() const;
00903 
00904     //SHARED_PTR<std::map<Double, TimeStampProperties> > _getTimeStampProperties() const;
00905 
00906     Bool _hasIntent(const String& intent) const;
00907 
00908     Bool _hasFieldID(Int fieldID) const;
00909 
00910     Bool _hasStateID(Int stateID) const;
00911 
00912     void _hasAntennaID(Int antennaID);
00913 
00914     std::map<Double, Double> _getTimeToTotalBWMap(
00915         const Vector<Double>& times, const Vector<Int>& ddIDs
00916     );
00917 
00918     MDirection _getInterpolatedDirection(
00919         const ROMSPointingColumns& pCols, const Int& index,
00920         const Double& time
00921     ) const;
00922 
00923     //map<SubScanKey, Quantity> _getMeanExposureTimes() const;
00924 
00925     vector<std::set<Int> > _getObservationIDToArrayIDsMap() const;
00926 
00927     vector<MPosition> _getObservatoryPositions();
00928 
00929     void _getRowStats(
00930         uInt& nACRows, uInt& nXCRows,
00931         std::map<SubScanKey, uInt>*& subScanToNACRowsMap,
00932         std::map<SubScanKey, uInt>*& subScanToNXCRowsMap,
00933         std::map<Int, uInt>*& fieldToNACRowsMap,
00934         std::map<Int, uInt>*& fieldToNXCRowsMap
00935     ) const;
00936 
00937     void _getRowStats(
00938         uInt& nACRows, uInt& nXCRows,
00939         SHARED_PTR<std::map<SubScanKey, uInt> >& scanToNACRowsMap,
00940         SHARED_PTR<std::map<SubScanKey, uInt> >& scanToNXCRowsMap,
00941         SHARED_PTR<std::map<Int, uInt> >& fieldToNACRowsMap,
00942         SHARED_PTR<std::map<Int, uInt> >& fieldToNXCRowsMap
00943     ) const;
00944 
00945     // get scan properties
00946     SHARED_PTR<const std::map<ScanKey, MSMetaData::ScanProperties> > _getScanProperties(
00947         Bool showProgress
00948     ) const;
00949 
00950     // get the scan keys in the specified set that have the associated arrayKey
00951     std::set<ScanKey> _getScanKeys(
00952         const std::set<ScanKey>& scanKeys, const ArrayKey& arrayKey
00953     ) const;
00954 
00955     // get all valid scan numbers associated with the specified arrayKey
00956     std::set<Int> _getScanNumbers(const ArrayKey& arrayKey) const;
00957 
00958     void _getScansAndDDIDMaps(
00959         std::map<ScanKey, std::set<uInt> >& scanToDDIDMap,
00960         vector<std::set<ScanKey> >& ddIDToScanMap
00961     ) const;
00962 
00963     void _getScansAndIntentsMaps(
00964         std::map<ScanKey, std::set<String> >& scanToIntentsMap,
00965         std::map<String, std::set<ScanKey> >& intentToScansMap
00966     ) const;
00967 
00968     void _getScansAndSpwMaps(
00969         std::map<ScanKey, std::set<uInt> >& scanToSpwMap,
00970         vector<std::set<ScanKey> >& spwToScanMap
00971     ) const;
00972 
00973     std::map<ScanKey, std::set<Int> > _getScanToAntennasMap() const;
00974 
00975     std::map<ScanKey, std::set<SubScanKey> > _getScanToSubScansMap() const;
00976 
00977     SHARED_PTR<std::map<ScanKey, std::set<Double> > > _getScanToTimesMap() const;
00978 
00979     std::map<SourceKey, SourceProperties> _getSourceInfo() const;
00980 
00981     vector<SpwProperties> _getSpwInfo(
00982         std::set<uInt>& avgSpw, std::set<uInt>& tdmSpw,
00983         std::set<uInt>& fdmSpw, std::set<uInt>& wvrSpw,
00984         std::set<uInt>& sqldSpw
00985     ) const;
00986 
00987     void _getSpwsAndIntentsMaps(
00988         vector<std::set<String> >& spwToIntentsMap,
00989         std::map<String, std::set<uInt> >& intentToSpwsMap
00990     );
00991 
00992     vector<SpwProperties>  _getSpwInfo2(
00993         std::set<uInt>& avgSpw, std::set<uInt>& tdmSpw, std::set<uInt>& fdmSpw,
00994         std::set<uInt>& wvrSpw, std::set<uInt>& sqldSpw
00995     ) const;
00996 
00997     void _getStateToIntentsMap(
00998         vector<std::set<String> >& statesToIntentsMap,
00999         std::set<String>& uniqueIntents
01000     ) const;
01001 
01002     vector<String> _getStationNames();
01003 
01004     void _getSubScansAndIntentsMaps(
01005         SHARED_PTR<const std::map<SubScanKey, std::set<String> > >& subScanToIntentsMap,
01006         std::map<String, std::set<SubScanKey> >& intentToSubScansMap
01007     ) const;
01008 
01009     void _getScanAndSubScanProperties(
01010         SHARED_PTR<const std::map<ScanKey, ScanProperties> >& scanProps,
01011         SHARED_PTR<const std::map<SubScanKey, SubScanProperties> >& subScanProps,
01012         Bool showProgress
01013     ) const;
01014 
01015     std::set<SubScanKey> _getSubScanKeys() const;
01016 
01017     // get subscans related to the given scan
01018     std::set<SubScanKey> _getSubScanKeys(const ScanKey& scanKey) const;
01019 
01020     void _getUnflaggedRowStats(
01021         Double& nACRows, Double& nXCRows,
01022         SHARED_PTR<std::map<SubScanKey, Double> >& subScanToNACRowsMap,
01023         SHARED_PTR<std::map<SubScanKey, Double> >& subScanToNXCRowsMap,
01024         SHARED_PTR<vector<Double> >& fieldToNACRowsMap,
01025         SHARED_PTR<vector<Double> >& fieldToNXCRowsMap
01026     ) const;
01027 
01028     void _getUnflaggedRowStats(
01029         Double& nACRows, Double& nXCRows,
01030         vector<Double>*& fieldNACRows, vector<Double>*& fieldNXCRows,
01031         std::map<SubScanKey, Double>*& scanNACRows,
01032         std::map<SubScanKey, Double>*& scanNXCRows
01033     ) const;
01034 
01035     static void _modifyFirstExposureTimeIfNecessary(
01036         FirstExposureTimeMap& current, const FirstExposureTimeMap& test
01037     );
01038 
01039     static void _modifyFirstExposureTimeIfNecessary(
01040         FirstExposureTimeMap& current, Int dataDescID,
01041         Double time, Double exposure, const Unit& eunit
01042     );
01043 
01044     static uInt _sizeof(const std::map<Double, MSMetaData::TimeStampProperties> & m);
01045 
01046     template <class T>
01047     static uInt _sizeof(const std::map<T, std::set<String> >& m);
01048 
01049     template <class T, class U>
01050     static uInt _sizeof(const std::map<T, std::set<U> >& m);
01051 
01052     template <class T, class U>
01053     static uInt _sizeof(const std::map<T, U>& m);
01054 
01055     static uInt _sizeof(const vector<std::set<String> >& m);
01056 
01057     static uInt _sizeof(const vector<String>& m);
01058 
01059     static uInt _sizeof(const vector<vector<String> >& m);
01060 
01061     template <class T>
01062     static uInt _sizeof(const vector<T>& v);
01063 
01064     static uInt _sizeof(const Quantum<Vector<Double> >& m);
01065 
01066     template <class T>
01067     static uInt _sizeof(const vector<std::set<T> >& v);
01068 
01069     template <class T> static uInt _sizeof(const std::map<String, std::set<T> >& map);
01070 
01071     static uInt _sizeof(const vector<std::map<Int, Quantity> >& map);
01072 
01073     static uInt _sizeof(const std::map<std::pair<Int, uInt>, std::set<uInt> >& map);
01074 
01075     static std::map<Int, uInt> _toUIntMap(const Vector<Int>& v);
01076 
01077     template <class T> SHARED_PTR<Vector<T> > _getMainScalarColumn(
01078         MSMainEnums::PredefinedColumns col
01079     ) const;
01080 
01081 };
01082 
01083 
01084 
01085 }
01086 
01087 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1