casacore
MSMetaData.h
Go to the documentation of this file.
1 //# MSMetaData.h
2 //# Copyright (C) 1998,1999,2000,2001
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id: MSMetaData.h 21586 2015-03-25 13:46:25Z gervandiepen $
27 
28 #ifndef MS_MSMETADATA_H
29 #define MS_MSMETADATA_H
30 
31 #include <casacore/casa/aips.h>
32 #include <casacore/casa/Quanta/QVector.h>
33 #include <casacore/measures/Measures/MFrequency.h>
34 #include <casacore/measures/Measures/MPosition.h>
35 #include <casacore/ms/MeasurementSets/MeasurementSet.h>
36 #include <casacore/ms/MeasurementSets/MSPointingColumns.h>
37 #include <casacore/casa/Utilities/CountedPtr.h>
38 #include <casacore/tables/Tables/TableProxy.h>
39 #include <map>
40 
41 namespace casacore {
42 
43 template <class T> class ArrayColumn;
44 struct ArrayKey;
45 struct ScanKey;
46 struct SourceKey;
47 struct SubScanKey;
48 
49 // <summary>
50 // Class to interrogate an MS for metadata. Interrogation happens on demand
51 // and resulting metadata are stored for use by subsequent queries if the
52 // cache has not exceeded the specified limit. Caching of MS main table columns
53 // has been removed because the cache can be swamped by columns for large
54 // MSes, meaning that smaller data structures, which are more computationally
55 // expensive to create, aren't cached. Also, the column data is usually only
56 // needed temporarily to compute smaller data structures, and the column data
57 // is not particularly expensive to recreate if necessary.
58 // Parallel processing is enabled using openmp.
59 // </summary>
60 
61 class MSMetaData {
62 
63 public:
64 
65  // for retrieving stats
70  };
71 
72  enum SQLDSwitch {
76  };
77 
79  std::set<Int> ddIDs;
81  };
82 
83  struct ColumnStats {
87  };
88 
89  typedef std::map<Int, std::pair<Double, Quantity> > FirstExposureTimeMap;
90 
92  // number of auto-correlation rows
94  // number of cross-correlation rows.
96  std::set<Int> antennas;
98  std::set<uInt> ddIDs;
100  // the key is the spwID, the value is the meanInterval for
101  // the subscan and that spwID
102  std::map<uInt, Quantity> meanInterval;
103  // The Int represents the data description ID,
104  // The Double represents the time of the first time stamp,
105  // The Quantity represents the exposure time for the corresponding
106  // data description ID and time stamp
109  std::set<uInt> spws;
110  // number of rows for each spectral window
111  std::map<uInt, uInt> spwNRows;
112  std::set<Int> stateIDs;
113  std::map<Double, TimeStampProperties> timeProps;
114  };
115 
116  // construct an object which stores a pointer to the MS and queries the MS
117  // only as necessary. The MeasurementSet pointer passed in should not go out
118  // of scope in the calling code until the caller has finished with this object,
119  // or else subsequent method calls on this object will result in a segmentation
120  // fault; the pointer is not copied.
121  // <src>maxCacheSizeMB</src> is the maximum cache size in megabytes. <=0 means
122  // do not use a cache, in which case, each method call will have to (re)query
123  // the MS. It is highly recommended to use a cache of reasonable size for the
124  // specified MS if multiple methods are going to be called.
125  MSMetaData(const MeasurementSet *const &ms, const Float maxCacheSizeMB);
126 
127  virtual ~MSMetaData();
128 
129  // get the antenna diameters
130  QVD getAntennaDiameters() const;
131 
132  // if the antenna name appears multiple times in the antenna table, the *last* ID
133  // that it is associated with is returned.
134  uInt getAntennaID(const String& antennaName) const;
135 
136  // get all the antenna IDs for the antenna with the specified name.
137  std::set<uInt> getAntennaIDs(const String& antennaName) const;
138 
139  // The returned IDs are ordered in the way they appear in the atenna table
140  vector<std::set<uInt> > getAntennaIDs(const vector<String>& antennaNames) const;
141 
142  // In the first instance of getAntennaNames, namesToID map will have the *last* ID
143  // of the antenna name, if it appears multiple times in the antenna table. In the second
144  // occurrence, namesToIDsMap will have the full set of IDs for antenna names that appear
145  // multiple times.
146 
147  vector<String> getAntennaNames(
148  std::map<String, uInt>& namesToIDsMap,
149  const vector<uInt>& antennaIDs=vector<uInt>(0)
150  ) const;
151 
152  vector<String> getAntennaNames(
153  std::map<String, std::set<uInt> >& namesToIDsMap,
154  const vector<uInt>& antennaIDs=vector<uInt>(0)
155  ) const;
156 
157  // get the antenna stations for the specified antenna IDs
158  vector<String> getAntennaStations(const vector<uInt>& antennaIDs=vector<uInt>());
159 
160  // get the antenna stations for the specified antenna names. The outer vector is ordered
161  // respective to antennaNames. Because an antenna name can appear more than once in
162  // the antenna table, the inner vector is ordered by row number in which that antenna name
163  // appears.
164  vector<std::vector<String> > getAntennaStations(const vector<String>& antennaNames);
165 
166  // get the set of antenna IDs for the specified scan.
167  std::set<Int> getAntennasForScan(const ScanKey& scan) const;
168 
169  // POLARIZATION.CORR_PRODUCT
170  vector<Array<Int> > getCorrProducts() const;
171 
172  // POLARIZATION.CORR_TYPE
173  vector<vector<Int> > getCorrTypes() const;
174 
175  vector<uInt> getDataDescIDToSpwMap() const;
176 
177  vector<uInt> getDataDescIDToPolIDMap() const;
178 
179  // Get the FIELD.SOURCE_ID column.
180  vector<Int> getFieldTableSourceIDs() const;
181 
182  // get the mapping of field ID to scans
183  vector<std::set<ScanKey> > getFieldToScansMap() const;
184 
185  std::map<String, std::set<Int> > getIntentToFieldsMap();
186 
187  std::map<String, std::set<ScanKey> > getIntentToScansMap();
188 
189  std::map<String, std::set<uInt> > getIntentToSpwsMap();
190 
191  std::set<String> getIntentsForScan(const ScanKey& scan) const;
192 
193  std::set<String> getIntentsForSubScan(const SubScanKey& subScan) const;
194 
195  std::shared_ptr<const std::map<SubScanKey, std::set<String> > > getSubScanToIntentsMap() const;
196 
197  // get all intents, in no particular (nor guaranteed) order.
198  std::set<String> getIntents() const;
199 
200  // get a set of intents corresponding to a specified field
201  std::set<String> getIntentsForField(Int fieldID);
202 
203  // get a set of intents corresponding to a specified field name
204  std::set<String> getIntentsForField(String field);
205 
206  // get a set of intents corresponding to the specified spectral window
207  std::set<String> getIntentsForSpw(const uInt spw);
208 
209  // number of correlations from the polarization table.
210  vector<Int> getNumCorrs() const;
211 
212  //SOURCE.PROPER_MOTION, first value in pair is longitudinal proper motion,
213  // second is latiduninal
214  vector<std::pair<Quantity, Quantity> > getProperMotions() const;
215 
216  // get unique scan numbers
217  std::set<Int> getScanNumbers(Int obsID, Int arrayID) const;
218 
219  // get a set of scan numbers for the specified stateID, obsID, and arrayID.
220  // If obsID and/or arrayID is negative, all observation IDs and/or array IDs
221  // will be used.
222  std::set<Int> getScansForState(
223  Int stateID, Int obsID, Int arrayID
224  ) const;
225 
226  // get the mapping of scans to states
227  std::map<ScanKey, std::set<Int> > getScanToStatesMap() const;
228 
229  // SOURCE.DIRECTION
230  vector<MDirection> getSourceDirections() const;
231 
232  // SOURCE.NAME
233  vector<String> getSourceNames() const;
234 
235  // Get the SOURCE.SOURCE_ID column. This is a very unfortunate column name,
236  // because generally an "ID" column of the table with the same name refers to
237  // the row number in that table. But not in this case.
238  vector<Int> getSourceTableSourceIDs() const;
239 
240  // SOURCE.TIME
241  std::shared_ptr<const Quantum<Vector<Double> > > getSourceTimes() const;
242 
243  // get a set of spectral windows for which the specified <src>intent</src>
244  // applies.
245  virtual std::set<uInt> getSpwsForIntent(const String& intent);
246 
247  // get the number of visibilities
248  uInt nRows() const;
249 
250  uInt nRows(CorrelationType cType);
251 
252  std::shared_ptr<const std::map<SubScanKey, uInt> > getNRowMap(CorrelationType type) const;
253 
254  uInt nRows(
255  CorrelationType cType, Int arrayID, Int observationID,
256  Int scanNumber, Int fieldID
257  ) const;
258 
259  uInt nRows(CorrelationType cType, uInt fieldID) const;
260 
261  // get number of spectral windows
262  uInt nSpw(Bool includewvr) const;
263 
264  // number of unique states (number of rows from the STATE table)
265  uInt nStates() const;
266 
267  // get the number of fields.
268  uInt nFields() const;
269 
270  // get a mapping of spectral window ID to data descrption IDs
271  std::vector<std::set<uInt> > getSpwToDataDescriptionIDMap() const;
272 
273  // get a set of spectral windows corresponding to the specified fieldID
274  std::set<uInt> getSpwsForField(const Int fieldID) const;
275 
276  // get a set of spectral windows corresponding to the specified field name
277  std::set<uInt> getSpwsForField(const String& fieldName);
278 
279  // get the values of the CODE column from the field table
280  vector<String> getFieldCodes() const;
281 
282  // get the set of field IDs corresponding to the specified spectral window.
283  std::set<Int> getFieldIDsForSpw(const uInt spw);
284 
285  // get the set of field names corresponding to the specified spectral window.
286  std::set<String> getFieldNamesForSpw(const uInt spw);
287 
288  // get the mapping of fields to spws
289  std::map<Int, std::set<uInt> > getFieldsToSpwsMap() const;
290 
291  // get rest frequencies from the SOURCE table
292  std::map<SourceKey, std::shared_ptr<vector<MFrequency> > > getRestFrequencies() const;
293 
294  // get the set of spectral windows for the specified scan.
295  std::set<uInt> getSpwsForScan(const ScanKey& scan) const;
296 
297  // get the set of spectral windows for the specified subscan.
298  std::set<uInt> getSpwsForSubScan(const SubScanKey& subScan) const;
299 
300  // get the set of scan numbers for the specified spectral window.
301  std::set<Int> getScansForSpw(uInt spw, Int obsID, Int arrayID) const;
302 
303  // get the complete mapping of scans to spws
304  std::map<ScanKey, std::set<uInt> > getScanToSpwsMap() const;
305 
306  // get the complete mapping of spws to scans
307  std::vector<std::set<ScanKey> > getSpwToScansMap() const;
308 
309  // get the transitions from the SOURCE table. If there are no transitions
310  // for a particular key, the shared ptr contains the null ptr.
311  std::map<SourceKey, std::shared_ptr<vector<String> > > getTransitions() const;
312 
313  // get the number of antennas in the ANTENNA table
314  uInt nAntennas() const;
315 
316  // ALMA-specific. get set of spectral windows used for TDM. These are windows that have
317  // 64, 128, or 256 channels
318  std::set<uInt> getTDMSpw();
319 
320  // ALMA-specific. get set of spectral windows used for FDM. These are windows that do not
321  // have 1, 4, 64, 128, or 256 channels.
322  std::set<uInt> getFDMSpw();
323 
324  // ALMA-specific. get spectral windows that have been averaged. These are windows with 1 channel.
325  std::set<uInt> getChannelAvgSpw();
326 
327  // ALMA-specific. Get the spectral window set used for WVR measurements. These have 4 channels each.
328  std::set<uInt> getWVRSpw() const;
329 
330  // ALMA-specific. Get the square law detector (total power) spectral windows.
331  std::set<uInt> getSQLDSpw();
332 
333  // Get the scan numbers which fail into the specified time range (center-tol to center+tol),
334  // inclusive. A negative value of obsID and/or arrayID indicates that all observation IDs
335  // and/or all arrayIDs should be used.
336  std::set<Int> getScansForTimes(
337  Double center, Double tol, Int obsID, Int arrayID
338  ) const;
339 
340  // Get the times for the specified scans
341  std::set<Double> getTimesForScans(std::set<ScanKey> scans) const;
342 
343  // get the times for the specified scan.
344  // The return values come from the TIME column.
345  std::set<Double> getTimesForScan(const ScanKey& scan) const;
346 
347  std::map<uInt, std::set<Double> > getSpwToTimesForScan(const ScanKey& scan) const;
348 
349  // get the time range for the specified scan. The pair will contain
350  // the start and stop time of the scan, determined from min(TIME(x)-0.5*INTERVAL(x)) and
351  // max(TIME(x)-0.5*INTERVAL(x))
352  std::pair<Double, Double> getTimeRangeForScan(const ScanKey& scanKey) const;
353 
354  // get the map of scans to time ranges.
355  std::shared_ptr<const std::map<ScanKey, std::pair<Double,Double> > > getScanToTimeRangeMap() const;
356 
357  // get the stateIDs associated with the specified scan. If obsID and/or arrayID
358  // is negative, all observation IDs and/or array IDs will be used.
359  std::set<Int> getStatesForScan(Int obsID, Int arrayID, Int scan) const;
360 
361  // get a map of spectral windows to unique timestamps.
362  std::vector<std::set<Double> > getTimesForSpws(Bool showProgress=True) const;
363 
364  // get the position of the specified antenna relative to the observatory position.
365  // the three vector returned represents the longitudinal, latitudinal, and elevation
366  // offsets (elements 0, 1, and 2 respectively). The longitude and latitude offsets are
367  // measured along the surface of a sphere centered at the earth's center and whose surface
368  // intersects the position of the observatory.
369  QVD getAntennaOffset(uInt which) const;
370 
371  // If the antenna name appears mulitple times, this will return the offset for the first
372  // occurrence of it in the antenna table
373  QVD getAntennaOffset(const String& name) const;
374 
375  // If the antenna name appears mulitple times, this will return all the offsets for it,
376  // in the order they appear in the antenna table
377  std::vector<QVD> getAntennaOffsets(const String& name) const;
378 
379  vector<QVD > getAntennaOffsets() const;
380 
381  // get the positions of the specified antennas. If <src>which</src> is empty, return
382  // all antenna positions.
383  vector<MPosition> getAntennaPositions(
384  const vector<uInt>& which=std::vector<uInt>(0)
385  ) const;
386 
387  // <src>names</src> cannot be empty.
388  vector<vector<MPosition> > getAntennaPositions(const vector<String>& names);
389 
390  // the first key in the returned map is the spectral window ID, the second is
391  // the average interval for the specified scan for that spw.
392  std::map<uInt, Double> getAverageIntervalsForScan(const ScanKey& scan) const;
393 
394  // the first key in the returned map is the spectral window ID, the second is
395  // the average interval for the specified sub scan for that spw.
396  std::map<uInt, Quantity> getAverageIntervalsForSubScan(const SubScanKey& subScan) const;
397 
398  vector<uInt> getBBCNos() const;
399 
400  std::map<uInt, std::set<uInt> > getBBCNosToSpwMap(SQLDSwitch sqldSwitch);
401 
402  vector<vector<Double> > getEdgeChans();
403  //Get the phase direction for a given field id and epoch
404  //interpolate polynomial if it is the field id is such or use ephemerides table
405  //if that is attached to that field id
407  const MEpoch& ep=MEpoch(Quantity(0.0, Unit("s")))) const ;
408 
409  // Get the reference direction for a given field ID and epoch interpolate
410  // polynomial if it is the field ID is such or use ephemerides table
411  // if that is attached to that field ID
413  const uInt fieldID,
414  const MEpoch& ep=MEpoch(Quantity(0.0, Unit("s")))
415  ) const;
416 
417  // get the field IDs for the specified field name. Case insensitive.
418  std::set<Int> getFieldIDsForField(const String& field) const;
419 
420  // get a list of the field names in the order in which they appear in the
421  // FIELD table.
422  vector<String> getFieldNames() const;
423 
424  // get field IDs associated with the specified scan number.
425  std::set<Int> getFieldsForScan(const ScanKey& scan) const;
426 
427  // get the field IDs associated with the specified scans
428  std::set<Int> getFieldsForScans(
429  const std::set<Int>& scans, Int obsID, Int arrayID
430  ) const;
431 
432  // get the field IDs associated with the specified scans
433  std::set<Int> getFieldsForScans(const std::set<ScanKey>& scans) const;
434 
435  // get the field IDs associated with the specified intent.
436  std::set<Int> getFieldsForIntent(const String& intent);
437 
438  // get the field IDs associated with the specified source.
439  std::set<Int> getFieldsForIntent(uInt sourceID) const;
440 
441  std::map<Int, std::set<Int> > getFieldsForSourceMap() const;
442 
443  std::map<Int, std::set<String> > getFieldNamesForSourceMap() const;
444 
445  // get the field names associated with the specified field IDs. If <src>fieldIDs</src>
446  // is empty, a vector of all the field names is returned.
447  vector<String> getFieldNamesForFieldIDs(const vector<uInt>& fieldIDs);
448 
449  // Get the fields which fail into the specified time range (center-tol to center+tol)
450  std::set<Int> getFieldsForTimes(Double center, Double tol);
451 
452  // max cache size in MB
453  Float getMaxCacheSizeMB() const { return _maxCacheMB; }
454 
455  // get telescope names in the order they are listed in the OBSERVATION table. These are
456  // the telescopes (observatories), not the antenna names.
457  vector<String> getObservatoryNames();
458 
459  // get the position of the specified telescope (observatory).
461 
462  // get the phase directions from the FIELD subtable. The <src>ep</src> parameter
463  // specifies for which epoch to return the directions of any ephemeris objects
464  // in the data set. It is ignored for non-ephemeris objects.
465  vector<MDirection> getPhaseDirs(const MEpoch& ep=MEpoch(Quantity(0.0, Unit("s")))) const;
466 
467  // get all ScanKeys in the dataset
468  std::set<ScanKey> getScanKeys() const;
469 
470  // get all ScanKeys in the dataset that have the specified <src>arrayKey</src>.
471  // If negative values for either the obsID and/or arrayID portions of the ArrayKey
472  // indicate that all obsIDs and/or arrayIDs should be used.
473  std::set<ScanKey> getScanKeys(const ArrayKey& arrayKey) const;
474 
475  // get the scans associated with the specified intent
476  std::set<Int> getScansForIntent(
477  const String& intent, Int obsID, Int arrayID
478  ) const;
479 
480  // get the scan numbers associated with the specified field ID.
481  std::set<Int> getScansForFieldID(Int fieldID, Int obsID, Int arrayID) const;
482 
483  // get the scan numbers associated with the specified field. Subclasses should not implement or override.
484  std::set<Int> getScansForField(const String& field, Int obsID, Int arrayID) const;
485 
486  // The first value of the pair is spw, the second is polarization ID.
487  std::map<std::pair<uInt, uInt>, uInt> getSpwIDPolIDToDataDescIDMap() const;
488 
489  // get a map of the spwIDs to spw names from the spw table
490  vector<String> getSpwNames() const;
491 
492  // get all the spws associated with the data description IDs listed in the main table.
493  // This will not correspond to a list of the row numbers in the SPECTRAL_WINDOW table
494  // if there are data description IDs that are not in the main table.
495  std::set<uInt> getSpwIDs() const;
496 
497  // get all sub scan keys for the specified array key.
498  std::set<SubScanKey> getSubScanKeys(const ArrayKey& arrayKey) const;
499 
500  // get the sub scan properties for the specified sub scan.
501 
502  SubScanProperties getSubScanProperties(
503  const SubScanKey& subScan, Bool showProgress=False
504  ) const;
505 
506  std::shared_ptr<const std::map<SubScanKey, SubScanProperties> > getSubScanProperties(
507  Bool showProgress=False
508  ) const;
509 
510  // If True, force the subscan properties structure to be
511  // cached regardless of the stipulations on the maximum cache. Normally,
512  // the subscan properties structure is small compared to the size of any
513  // one column that is necessary to create it, and since creating this
514  // structure can be very expensive, especially for large datasets, it
515  // is often a good idea to cache it if it will be accessed many times.
517 
518  // get a data structure, consumable by users, representing a summary of the dataset
519  Record getSummary() const;
520 
521  // get the times for which the specified field was observed
522  std::set<Double> getTimesForField(Int fieldID);
523 
524  // get the time stamps associated with the specified intent
525  std::set<Double> getTimesForIntent(const String& intent) const;
526  Bool hasBBCNo() const;
527 
528  //std::map<Double, Double> getExposuresForTimes() const;
529 
530  // get the unique baselines in the MS. These are not necessarily every combination of the
531  // n(n-1)/2 possible antenna pairs, but rather the number of unique baselines represented in
532  // the main MS table, which in theory can be less than n(n-1)/2 (for example if samples for
533  // certain antenna pairs are not recorded. The returned Matrix is nAnts x nAnts in size. Pairs
534  // that are true represent baselines represented in the main MS table.
536 
537  // get the number of unique baselines represented in the main MS table which in theory can be
538  // less than n*(n-1)/2. If <src>includeAutoCorrelation</src> is True, include autocorrelation
539  // "baselines" in the enumeration.
540  virtual uInt nBaselines(Bool includeAutoCorrelation=False);
541 
542  // get the effective total exposure time. This is the effective time spent collecting unflagged data.
544 
545  // get the number of scans in the dataset
546  uInt nScans();
547 
548  // get the number of observations (from the OBSERVATIONS table) in the dataset
549  uInt nObservations() const;
550 
551  // get the contents of the OBSERVER column from the OBSERVATIONS table
552  vector<String> getObservers() const;
553 
554  // get the contents of the PROJECT column from the OBSERVATIONS table
555  vector<String> getProjects() const;
556 
557  // get the contents of the SCHEDULE column from the OBSERVATIONS table
558  // Note that the embedded vectors may have different lengths
559  vector<vector<String> > getSchedules() const;
560 
561  // get the time ranges from the OBSERVATION table
562  vector<std::pair<MEpoch, MEpoch> > getTimeRangesOfObservations() const;
563 
564  // get the number of arrays (from the ARRAY table) in the dataset
565  uInt nArrays();
566 
567  // get the number of data description IDs (from the DATA_DESCRIPTION table)
568  uInt nDataDescriptions() const;
569 
570  // get the number of unflagged rows
571  Double nUnflaggedRows() const;
572 
574 
576  CorrelationType cType, Int arrayID, uInt observationID,
577  Int scanNumber, uInt fieldID
578  ) const;
579 
580  Double nUnflaggedRows(CorrelationType cType, Int fieldID) const;
581 
582  inline Float getCache() const { return _cacheMB;}
583 
584  vector<Double> getBandWidths() const;
585 
586  vector<Quantity> getCenterFreqs() const;
587 
588  // get the effective bandwidth for each channel. Each element in
589  // the returned vector represents a separate spectral window, with
590  // ID given by its location in the vector. If asVelWidths is True,
591  // convert the values to velocity widths.
592  vector<QVD> getChanEffectiveBWs(Bool asVelWidths) const;
593 
594  vector<QVD > getChanFreqs() const;
595 
596  // get the resolution for each channel. Each element in
597  // the returned vector represents a separate spectral window, with
598  // ID given by its location in the vector. If asVelWidths is True,
599  // convert the values to velocity widths.
600  vector<QVD> getChanResolutions(Bool asVelWidths) const;
601 
602  vector<QVD > getChanWidths() const;
603 
604  vector<Quantity> getMeanFreqs() const;
605 
606  vector<Int> getNetSidebands() const;
607 
608  vector<MFrequency> getRefFreqs() const;
609 
610  vector<uInt> nChans() const;
611 
612  uInt nPol();
613 
614  // DEPRECATED
615  // get a map of data desc ID, scan number pair to exposure time for the first time
616  // for that data desc ID, scan number pair
617  std::vector<std::map<Int, Quantity> > getFirstExposureTimeMap();
618 
619  // get map of scans to first exposure times
620  std::map<ScanKey, FirstExposureTimeMap> getScanToFirstExposureTimeMap(Bool showProgress) const;
621 
622  // get polarization IDs for the specified scan and spwid
623  std::set<uInt> getPolarizationIDs(uInt obsID, Int arrayID, Int scan, uInt spwid) const;
624 
625  // get the unique antennas (the union of the ANTENNA_1 and ANTENNA_2 columns) from
626  // the main table
627  const std::set<Int>& getUniqueAntennaIDs() const;
628 
629  // get unique data description IDs that exist in the main table
630  std::set<uInt> getUniqueDataDescIDs() const;
631 
632  // DEPRECATED because of spelling error. Use getUniqueFieldIDs()
633  // instead.
634  inline std::set<Int> getUniqueFiedIDs() const {
635  return getUniqueFieldIDs();
636  }
637 
638  // get unique field IDs that exist in the main table.
639  std::set<Int> getUniqueFieldIDs() const;
640 
641  // get the pointing directions associated with antenna1 and antenna2 for
642  // the specified row of the main MS table
643  std::pair<MDirection, MDirection> getPointingDirection(
644  Int& ant1, Int& ant2, Double& time, uInt row,
645  Bool interpolate=false, Int initialguess=0
646  ) const;
647 
648  // get the time range for the entire dataset. min(TIME(x) - 0.5*INTERVAL(x)) to
649  // max(TIME(x) + 0.5*INTERVAL(x))
650  std::pair<Double, Double> getTimeRange(Bool showProgress=False) const;
651 
652  // Number of unique values from SOURCE.SOURCE_ID
654 
655  // get the unique spectral window IDs represented by the data description
656  // IDs that appear in the main table
657  std::set<uInt> getUniqueSpwIDs() const;
658 
659  const MeasurementSet* getMS() const { return _ms; }
660 
662 
663  // get statistics related to the values of the INTERVAL column. Returned
664  // values are in seconds. All values in this column are used in the computation,
665  // including those which associated row flags may be set.
666  ColumnStats getIntervalStatistics() const;
667 
668 private:
669 
670  struct ScanProperties {
671  // The Int represents the data description ID,
672  // The Double represents the time of the first time stamp,
673  // The Quantity represents the exposure time for the corresponding
674  // data description ID and time stamp
676  // the key is the spwID, the value is the meanInterval for
677  // the subscan and that spwID
678  std::map<uInt, Quantity> meanInterval;
679  // number of rows for each spectral window
680  std::map<uInt, uInt> spwNRows;
681  // time range (which takes into account helf of the corresponding
682  // interval, which is not accounted for in the SubScanProperties times
683  std::pair<Double, Double> timeRange;
684  // times for each spectral window
685  std::map<uInt, std::set<Double> > times;
686  };
687 
688  struct SpwProperties {
693  // The sum of all channel frequencies divided by the number of channels
695  // The mean of the low frequency extent of the lowest frequency channel and
696  // the high frequency extend of the highest frequency channel. Often, but not
697  // necessarily, the same as meanfreq
700  // The center frequencies of the two channels at the edges of the window
701  vector<Double> edgechans;
703  // from the REF_FREQUENCY column
706  // EFFECTIVE_BANDWIDTH
708  // RESOLUTION
710  };
711 
712  // represents non-primary key data for a SOURCE table row
715  std::shared_ptr<vector<MFrequency> > restfreq;
716  std::shared_ptr<vector<String> > transition;
717  };
718 
719  // The general pattern is that a mutable gets set only once, on demand, when its
720  // setter is called for the first time. If this pattern is broken, defective behavior
721  // will occur.
722 
725  mutable Float _cacheMB;
729  mutable std::map<ScanKey, std::set<uInt> > _scanToSpwsMap, _scanToDDIDsMap;
731  mutable std::map<Int, std::set<uInt> > _fieldToSpwMap;
732  mutable std::map<ScanKey, std::set<Int> > _scanToStatesMap, _scanToFieldsMap, _scanToAntennasMap;
733  mutable std::map<Int, std::set<Int> > _fieldToStatesMap, _stateToFieldsMap, _sourceToFieldsMap;
734  mutable std::map<std::pair<uInt, uInt>, uInt> _spwPolIDToDataDescIDMap;
735  mutable std::map<String, std::set<uInt> > _antennaNameToIDMap;
736  mutable std::shared_ptr<const std::map<ScanKey, ScanProperties> > _scanProperties;
737  mutable std::shared_ptr<const std::map<SubScanKey, SubScanProperties> > _subScanProperties;
738 
739  mutable std::map<String, std::set<Int> > _intentToFieldIDMap;
740  mutable std::map<String, std::set<ScanKey> > _intentToScansMap;
741  mutable std::map<String, std::set<SubScanKey> > _intentToSubScansMap;
742  mutable std::map<std::pair<ScanKey, uInt>, std::set<uInt> > _scanSpwToPolIDMap;
743  mutable std::set<String> _uniqueIntents;
746  mutable std::shared_ptr<std::map<SubScanKey, uInt> > _subScanToNACRowsMap, _subScanToNXCRowsMap;
747  mutable std::shared_ptr<std::map<Int, uInt> > _fieldToNACRowsMap, _fieldToNXCRowsMap;
748  mutable std::map<ScanKey, std::set<String> > _scanToIntentsMap;
749  mutable std::shared_ptr<const std::map<SubScanKey, std::set<String> > > _subScanToIntentsMap;
750  mutable vector<std::set<String> > _stateToIntentsMap, _spwToIntentsMap, _fieldToIntentsMap;
751  mutable vector<SpwProperties> _spwInfo;
752  mutable vector<std::set<Int> > _spwToFieldIDsMap, _obsToArraysMap;
753  mutable vector<std::set<ScanKey> > _spwToScansMap, _ddidToScansMap, _fieldToScansMap;
754 
755  mutable vector<String> _fieldNames, _antennaNames, _observatoryNames,
757  mutable vector<vector<String> > _schedules;
758  mutable vector<vector<Int> > _corrTypes;
759  mutable vector<Array<Int> >_corrProds;
760 
761  mutable std::shared_ptr<std::map<ScanKey, std::set<Double> > > _scanToTimesMap;
762  std::map<String, std::set<uInt> > _intentToSpwsMap;
763  mutable std::map<String, std::set<Double> > _intentToTimesMap;
764 
765  std::shared_ptr<std::map<Int, std::set<Double> > > _fieldToTimesMap;
766  std::shared_ptr<std::map<Double, std::set<Int> > > _timeToFieldsMap;
767 
768  mutable vector<MPosition> _observatoryPositions, _antennaPositions;
769  mutable vector<QVD > _antennaOffsets;
774  mutable std::shared_ptr<vector<Double> > _unflaggedFieldNACRows, _unflaggedFieldNXCRows;
775  mutable std::shared_ptr<std::map<SubScanKey, Double> > _unflaggedSubScanNACRows, _unflaggedSubScanNXCRows;
777  const vector<const Table*> _taqlTempTable;
778 
780  vector<std::map<Int, Quantity> > _firstExposureTimeMap;
782 
783  mutable std::set<ArrayKey> _arrayKeys;
784  mutable std::set<ScanKey> _scanKeys;
785  mutable std::set<SubScanKey> _subscans;
786  mutable std::map<ScanKey, std::set<SubScanKey> > _scanToSubScans;
787  mutable std::map<ArrayKey, std::set<SubScanKey> > _arrayToSubScans;
788 
789  mutable vector<std::pair<MEpoch, MEpoch> > _timeRangesForObs;
790 
791  mutable vector<MDirection> _phaseDirs, _sourceDirs;
792 
793  mutable vector<std::pair<Quantity, Quantity> > _properMotions;
794 
795  mutable std::map<SourceKey, SourceProperties> _sourceInfo;
796  mutable std::shared_ptr<std::set<Int> > _ephemFields;
797  mutable std::shared_ptr<const Quantum<Vector<Double> > > _sourceTimes;
798 
799  // disallow copy constructor and = operator
800  MSMetaData(const MSMetaData&);
802 
803  // This comment from thunter in the original ValueMapping python class
804  // # Determine the number of polarizations for the first OBSERVE_TARGET intent.
805  // # Used by plotbandpass for BPOLY plots since the number of pols cannot be inferred
806  // # correctly from the caltable alone. You cannot not simply use the first row, because
807  // # it may be a pointing scan which may have different number of polarizations than what
808  // # the TARGET and BANDPASS calibrator will have.
809  // # -- T. Hunter
810  // uInt _getNumberOfPolarizations();
811 
812  void _setSpwInfo(const MeasurementSet& ms);
813 
814  // set metadata from OBSERVATION table
815  void _setObservation(const MeasurementSet& ms);
816 
817  Bool _cacheUpdated(const Float incrementInBytes) const;
818 
819  void _checkField(uInt fieldID) const;
820 
821  void _checkScan(const ScanKey& key) const;
822 
823  void _checkScans(const std::set<ScanKey>& scanKeys) const;
824 
825  void _checkSubScan(const SubScanKey& key) const;
826 
827  static void _checkTolerance(const Double tol);
828 
830  std::shared_ptr<std::map<ScanKey, MSMetaData::ScanProperties> >& scanProps,
831  std::shared_ptr<std::map<SubScanKey, MSMetaData::SubScanProperties> >& subScanProps,
832  Bool showProgress
833  ) const;
834 
835  static void _getScalarIntColumn(
836  Vector<Int>& v, TableProxy& table, const String& colname,
837  Int beginRow, Int nrows
838  );
839 
840  static void _getScalarDoubleColumn(
841  Vector<Double>& v, TableProxy& table, const String& colname,
842  Int beginRow, Int nrows
843  );
844 
845  static void _getScalarQuantDoubleColumn(
846  Quantum<Vector<Double> >& v, TableProxy& table, const String& colname,
847  Int beginRow, Int nrows
848  );
849 
850  void _mergeScanProps(
851  std::shared_ptr<std::map<ScanKey, MSMetaData::ScanProperties> >& scanProps,
852  std::shared_ptr<std::map<SubScanKey, MSMetaData::SubScanProperties> >& subScanProps,
853  const std::vector<
854  std::pair<std::map<ScanKey, ScanProperties>, std::map<SubScanKey, SubScanProperties> >
855  >& props
856  ) const;
857 
858  void _createScanRecords(
859  Record& parent, const ArrayKey& arrayKey,
860  const std::map<SubScanKey, SubScanProperties>& subScanProps
861  ) const;
862 
864  Record& parent, uInt& scanNRows, std::set<Int>& antennasForScan,
865  const ScanKey& scanKey, const std::map<SubScanKey, SubScanProperties>& subScanProps
866  ) const;
867 
868  static void _createTimeStampRecords(
869  Record& parent,
870  const SubScanProperties& subScanProps
871  );
872 
873  // convert a QVD in frequency units to velocity units using
874  // the give reference frequency. No explicit checking is done
875  // for unit correctness of the inputs.
876  static QVD _freqWidthToVelWidth(const QVD& v, const Quantity& refFreq);
877 
878  // if _scanProps has been generated, just return it. If the caller has
879  // configured the object to generate _scanProps at some point, this call will
880  // generate it. Otherwise, the returned object contains a null pointer.
881  std::shared_ptr<const std::map<ScanKey, ScanProperties> > _generateScanPropsIfWanted() const;
882 
883  // if _subScanProperties has been generated, just return it. If
884  // the caller has configured the object to generate _subScanPropertiess
885  // at some point, this call will generate it. Otherwise, the returned object
886  // contains a null pointer.
887  std::shared_ptr<const std::map<SubScanKey, SubScanProperties> >
889 
890  vector<String> _getAntennaNames(
891  std::map<String, std::set<uInt> >& namesToIDsMap
892  ) const;
893 
894  vector<MPosition> _getAntennaPositions() const;
895 
896  void _getAntennas(
897  std::shared_ptr<Vector<Int> >& ant1,
898  std::shared_ptr<Vector<Int> >& ant2
899  ) const;
900 
901  std::shared_ptr<Vector<Int> > _getArrayIDs() const;
902 
903  std::map<ArrayKey, std::set<SubScanKey> > _getArrayKeysToSubScanKeys() const;
904 
905  // Uses openmp for parallel processing
906  std::pair<std::map<ScanKey, ScanProperties>, std::map<SubScanKey, SubScanProperties> >
908  const Vector<Int>& scans, const Vector<Int>& fields,
909  const Vector<Int>& ddIDs, const Vector<Int>& states,
910  const Vector<Double>& times, const Vector<Int>& arrays,
911  const Vector<Int>& observations, const Vector<Int>& ant1,
912  const Vector<Int>& ant2, const Quantum<Vector<Double> >& exposureTimes,
913  const Quantum<Vector<Double> >& intervalTimes, const vector<uInt>& ddIDToSpw,
914  uInt beginRow, uInt endRow
915  ) const;
916 
917  std::shared_ptr<Vector<Int> > _getDataDescIDs() const;
918 
919  // get the field IDs of ephemeris objects
920  std::shared_ptr<std::set<Int> > _getEphemFieldIDs() const;
921 
922  std::shared_ptr<Quantum<Vector<Double> > > _getExposureTimes() const;
923 
924  std::shared_ptr<Vector<Int> > _getFieldIDs() const;
925 
926  // If there are no intents, then fieldToIntentsMap will be of length
927  // nFields() and all of its entries will be the empty set, and
928  // intentToFieldsMap will be empty
930  vector<std::set<String> >& fieldToIntentsMap,
931  std::map<String, std::set<Int> >& intentToFieldsMap
932  );
933 
935  vector<std::set<ScanKey> >& fieldToScansMap,
936  std::map<ScanKey, std::set<Int> >& scanToFieldsMap
937  ) const;
938 
940  std::map<Int, std::set<uInt> >& fieldToSpwMap,
941  vector<std::set<Int> >& spwToFieldMap
942  ) const;
943 
945  std::map<Int, std::set<Int> >& fieldToStatesMap,
946  std::map<Int, std::set<Int> >& stateToFieldsMap
947  );
948 
950  std::shared_ptr<std::map<Int, std::set<Double> > >& fieldToTimesMap,
951  std::shared_ptr<std::map<Double, std::set<Int> > >& timesToFieldMap
952  );
953 
954  std::shared_ptr<ArrayColumn<Bool> > _getFlags() const;
955 
956  std::map<String, std::set<Double> > _getIntentsToTimesMap() const;
957 
958  std::shared_ptr<Quantum<Vector<Double> > > _getIntervals() const;
959 
960  std::shared_ptr<Vector<Int> > _getObservationIDs() const;
961 
962  std::shared_ptr<Vector<Int> > _getScans() const;
963 
964  vector<std::set<String> > _getSpwToIntentsMap();
965 
966  std::shared_ptr<Vector<Int> > _getStateIDs() const;
967 
968  std::shared_ptr<Vector<Double> > _getTimes() const;
969 
970  //std::shared_ptr<std::map<Double, TimeStampProperties> > _getTimeStampProperties() const;
971 
972  Bool _hasIntent(const String& intent) const;
973 
974  Bool _hasFieldID(Int fieldID) const;
975 
976  Bool _hasStateID(Int stateID) const;
977 
978  void _hasAntennaID(Int antennaID);
979 
980  std::map<Double, Double> _getTimeToTotalBWMap(
981  const Vector<Double>& times, const Vector<Int>& ddIDs
982  );
983 
985  const MSPointingColumns& pCols, const Int& index,
986  const Double& time
987  ) const;
988 
989  //map<SubScanKey, Quantity> _getMeanExposureTimes() const;
990 
991  vector<std::set<Int> > _getObservationIDToArrayIDsMap() const;
992 
993  vector<MPosition> _getObservatoryPositions();
994 
995  void _getRowStats(
996  uInt& nACRows, uInt& nXCRows,
997  std::map<SubScanKey, uInt>*& subScanToNACRowsMap,
998  std::map<SubScanKey, uInt>*& subScanToNXCRowsMap,
999  std::map<Int, uInt>*& fieldToNACRowsMap,
1000  std::map<Int, uInt>*& fieldToNXCRowsMap
1001  ) const;
1002 
1003  void _getRowStats(
1004  uInt& nACRows, uInt& nXCRows,
1005  std::shared_ptr<std::map<SubScanKey, uInt> >& scanToNACRowsMap,
1006  std::shared_ptr<std::map<SubScanKey, uInt> >& scanToNXCRowsMap,
1007  std::shared_ptr<std::map<Int, uInt> >& fieldToNACRowsMap,
1008  std::shared_ptr<std::map<Int, uInt> >& fieldToNXCRowsMap
1009  ) const;
1010 
1011  // get scan properties
1012  std::shared_ptr<const std::map<ScanKey, MSMetaData::ScanProperties> > _getScanProperties(
1013  Bool showProgress
1014  ) const;
1015 
1016  // get the scan keys in the specified set that have the associated arrayKey
1017  std::set<ScanKey> _getScanKeys(
1018  const std::set<ScanKey>& scanKeys, const ArrayKey& arrayKey
1019  ) const;
1020 
1021  // get all valid scan numbers associated with the specified arrayKey
1022  std::set<Int> _getScanNumbers(const ArrayKey& arrayKey) const;
1023 
1024  void _getScansAndDDIDMaps(
1025  std::map<ScanKey, std::set<uInt> >& scanToDDIDMap,
1026  vector<std::set<ScanKey> >& ddIDToScanMap
1027  ) const;
1028 
1030  std::map<ScanKey, std::set<String> >& scanToIntentsMap,
1031  std::map<String, std::set<ScanKey> >& intentToScansMap
1032  ) const;
1033 
1034  void _getScansAndSpwMaps(
1035  std::map<ScanKey, std::set<uInt> >& scanToSpwMap,
1036  vector<std::set<ScanKey> >& spwToScanMap
1037  ) const;
1038 
1039  std::map<ScanKey, std::set<Int> > _getScanToAntennasMap() const;
1040 
1041  std::map<ScanKey, std::set<SubScanKey> > _getScanToSubScansMap() const;
1042 
1043  std::shared_ptr<std::map<ScanKey, std::set<Double> > > _getScanToTimesMap() const;
1044 
1045  std::map<SourceKey, SourceProperties> _getSourceInfo() const;
1046 
1047  vector<SpwProperties> _getSpwInfo(
1048  std::set<uInt>& avgSpw, std::set<uInt>& tdmSpw,
1049  std::set<uInt>& fdmSpw, std::set<uInt>& wvrSpw,
1050  std::set<uInt>& sqldSpw
1051  ) const;
1052 
1054  vector<std::set<String> >& spwToIntentsMap,
1055  std::map<String, std::set<uInt> >& intentToSpwsMap
1056  );
1057 
1058  vector<SpwProperties> _getSpwInfo2(
1059  std::set<uInt>& avgSpw, std::set<uInt>& tdmSpw, std::set<uInt>& fdmSpw,
1060  std::set<uInt>& wvrSpw, std::set<uInt>& sqldSpw
1061  ) const;
1062 
1063  void _getStateToIntentsMap(
1064  vector<std::set<String> >& statesToIntentsMap,
1065  std::set<String>& uniqueIntents
1066  ) const;
1067 
1068  vector<String> _getStationNames();
1069 
1071  std::shared_ptr<const std::map<SubScanKey, std::set<String> > >& subScanToIntentsMap,
1072  std::map<String, std::set<SubScanKey> >& intentToSubScansMap
1073  ) const;
1074 
1076  std::shared_ptr<const std::map<ScanKey, ScanProperties> >& scanProps,
1077  std::shared_ptr<const std::map<SubScanKey, SubScanProperties> >& subScanProps,
1078  Bool showProgress
1079  ) const;
1080 
1081  std::set<SubScanKey> _getSubScanKeys() const;
1082 
1083  // get subscans related to the given scan
1084  std::set<SubScanKey> _getSubScanKeys(const ScanKey& scanKey) const;
1085 
1086  void _getUnflaggedRowStats(
1087  Double& nACRows, Double& nXCRows,
1088  std::shared_ptr<std::map<SubScanKey, Double> >& subScanToNACRowsMap,
1089  std::shared_ptr<std::map<SubScanKey, Double> >& subScanToNXCRowsMap,
1090  std::shared_ptr<vector<Double> >& fieldToNACRowsMap,
1091  std::shared_ptr<vector<Double> >& fieldToNXCRowsMap
1092  ) const;
1093 
1094  void _getUnflaggedRowStats(
1095  Double& nACRows, Double& nXCRows,
1096  vector<Double>*& fieldNACRows, vector<Double>*& fieldNXCRows,
1097  std::map<SubScanKey, Double>*& scanNACRows,
1098  std::map<SubScanKey, Double>*& scanNXCRows
1099  ) const;
1100 
1102  FirstExposureTimeMap& current, const FirstExposureTimeMap& test
1103  );
1104 
1106  FirstExposureTimeMap& current, Int dataDescID,
1107  Double time, Double exposure, const Unit& eunit
1108  );
1109 
1110  static uInt _sizeof(const std::map<Double, MSMetaData::TimeStampProperties> & m);
1111 
1112  template <class T>
1113  static uInt _sizeof(const std::map<T, std::set<String> >& m);
1114 
1115  template <class T, class U>
1116  static uInt _sizeof(const std::map<T, std::set<U> >& m);
1117 
1118  template <class T, class U>
1119  static uInt _sizeof(const std::map<T, U>& m);
1120 
1121  static uInt _sizeof(const vector<std::set<String> >& m);
1122 
1123  static uInt _sizeof(const vector<String>& m);
1124 
1125  static uInt _sizeof(const vector<vector<String> >& m);
1126 
1127  template <class T>
1128  static uInt _sizeof(const vector<T>& v);
1129 
1130  static uInt _sizeof(const Quantum<Vector<Double> >& m);
1131 
1132  template <class T>
1133  static uInt _sizeof(const vector<std::set<T> >& v);
1134 
1135  template <class T> static uInt _sizeof(const std::map<String, std::set<T> >& map);
1136 
1137  static uInt _sizeof(const vector<std::map<Int, Quantity> >& map);
1138 
1139  static uInt _sizeof(const std::map<std::pair<Int, uInt>, std::set<uInt> >& map);
1140 
1141  static std::map<Int, uInt> _toUIntMap(const Vector<Int>& v);
1142 
1143  template <class T> std::shared_ptr<Vector<T> > _getMainScalarColumn(
1145  ) const;
1146 
1147 };
1148 
1149 
1150 
1151 }
1152 
1153 #endif
casacore::MSMetaData::_getSpwToIntentsMap
vector< std::set< String > > _getSpwToIntentsMap()
casacore::MSMetaData::getFieldTableSourceIDs
vector< Int > getFieldTableSourceIDs() const
Get the FIELD.SOURCE_ID column.
casacore::MSMetaData::_unflaggedFieldNXCRows
std::shared_ptr< vector< Double > > _unflaggedFieldNXCRows
Definition: MSMetaData.h:774
casacore::MSMetaData::_fieldNames
vector< String > _fieldNames
Definition: MSMetaData.h:755
casacore::MSMetaData::getWVRSpw
std::set< uInt > getWVRSpw() const
ALMA-specific.
casacore::MSMetaData::_arrayToSubScans
std::map< ArrayKey, std::set< SubScanKey > > _arrayToSubScans
Definition: MSMetaData.h:787
casacore::MSMetaData::_getAntennaNames
vector< String > _getAntennaNames(std::map< String, std::set< uInt > > &namesToIDsMap) const
casacore::MSMetaData::_nUnflaggedACRows
Double _nUnflaggedACRows
Definition: MSMetaData.h:773
casacore::MSMetaData::_cacheMB
Float _cacheMB
Definition: MSMetaData.h:725
casacore::MFrequency
A Measure: wave characteristics.
Definition: MFrequency.h:161
casacore::MSMetaData::getFieldIDsForSpw
std::set< Int > getFieldIDsForSpw(const uInt spw)
get the set of field IDs corresponding to the specified spectral window.
casacore::MSMetaData::SubScanProperties::timeProps
std::map< Double, TimeStampProperties > timeProps
Definition: MSMetaData.h:113
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::_scanToDDIDsMap
std::map< ScanKey, std::set< uInt > > _scanToDDIDsMap
Definition: MSMetaData.h:729
casacore::MSMetaData::_nObservations
uInt _nObservations
Definition: MSMetaData.h:727
casacore::MSMetaData::getChanFreqs
vector< QVD > getChanFreqs() const
casacore::Matrix< Bool >
casacore::MSMetaData::getTransitions
std::map< SourceKey, std::shared_ptr< vector< String > > > getTransitions() const
get the transitions from the SOURCE table.
casacore::MSMetaData::_fieldToTimesMap
std::shared_ptr< std::map< Int, std::set< Double > > > _fieldToTimesMap
Definition: MSMetaData.h:765
casacore::MSMetaData::getObservers
vector< String > getObservers() const
get the contents of the OBSERVER column from the OBSERVATIONS table
casacore::MSMetaData::getUniqueDataDescIDs
std::set< uInt > getUniqueDataDescIDs() const
get unique data description IDs that exist in the main table
casacore::MSMetaData::_scanToStatesMap
std::map< ScanKey, std::set< Int > > _scanToStatesMap
Definition: MSMetaData.h:732
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::nChans
vector< uInt > nChans() const
casacore::MSMetaData::_cacheUpdated
Bool _cacheUpdated(const Float incrementInBytes) const
casacore::MSMetaData::getFieldsToSpwsMap
std::map< Int, std::set< uInt > > getFieldsToSpwsMap() const
get the mapping of fields to spws
casacore::MSMetaData::_getInterpolatedDirection
MDirection _getInterpolatedDirection(const MSPointingColumns &pCols, const Int &index, const Double &time) const
casacore::MSMetaData::getAntennasForScan
std::set< Int > getAntennasForScan(const ScanKey &scan) const
get the set of antenna IDs for the specified scan.
casacore::MSMetaData::getProjects
vector< String > getProjects() const
get the contents of the PROJECT column from the OBSERVATIONS table
casacore::MSMetaData::getFieldToScansMap
vector< std::set< ScanKey > > getFieldToScansMap() const
get the mapping of field ID to scans
casacore::MSMetaData::_getScansAndIntentsMaps
void _getScansAndIntentsMaps(std::map< ScanKey, std::set< String > > &scanToIntentsMap, std::map< String, std::set< ScanKey > > &intentToScansMap) const
casacore::MSMetaData::TimeStampProperties::ddIDs
std::set< Int > ddIDs
Definition: MSMetaData.h:79
casacore::MSMetaData::nFields
uInt nFields() const
get the number of fields.
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::MEpoch
A Measure: instant in time.
Definition: MEpoch.h:104
casacore::MPosition
A Measure: position on Earth.
Definition: MPosition.h:79
casacore::scanKey
ScanKey scanKey(const SubScanKey &subScanKey)
create a ScanKey from a SubScanKey, just omits the SubScanKey's fieldID
Definition: MSKeys.h:66
casacore::MSMetaData::_hasStateID
Bool _hasStateID(Int stateID) const
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::getRestFrequencies
std::map< SourceKey, std::shared_ptr< vector< MFrequency > > > getRestFrequencies() const
get rest frequencies from the SOURCE table
casacore::MSMetaData::_scanToSpwsMap
std::map< ScanKey, std::set< uInt > > _scanToSpwsMap
Definition: MSMetaData.h:729
casacore::MSMetaData::_intentToSubScansMap
std::map< String, std::set< SubScanKey > > _intentToSubScansMap
Definition: MSMetaData.h:741
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:675
casacore::MSMetaData::_antennaNameToIDMap
std::map< String, std::set< uInt > > _antennaNameToIDMap
Definition: MSMetaData.h:735
casacore::MSMetaData::getMaxCacheSizeMB
Float getMaxCacheSizeMB() const
max cache size in MB
Definition: MSMetaData.h:453
casacore::MSMetaData::_hasAntennaID
void _hasAntennaID(Int antennaID)
casacore::MSMetaData::_getScanProperties
std::shared_ptr< const std::map< ScanKey, MSMetaData::ScanProperties > > _getScanProperties(Bool showProgress) const
get scan properties
casacore::MSMetaData::_getScansAndSpwMaps
void _getScansAndSpwMaps(std::map< ScanKey, std::set< uInt > > &scanToSpwMap, vector< std::set< ScanKey > > &spwToScanMap) const
casacore::MSMetaData::_toUIntMap
static std::map< Int, uInt > _toUIntMap(const Vector< Int > &v)
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::_getRowStats
void _getRowStats(uInt &nACRows, uInt &nXCRows, std::map< SubScanKey, uInt > *&subScanToNACRowsMap, std::map< SubScanKey, uInt > *&subScanToNXCRowsMap, std::map< Int, uInt > *&fieldToNACRowsMap, std::map< Int, uInt > *&fieldToNXCRowsMap) const
casacore::MSMetaData::_scanToAntennasMap
std::map< ScanKey, std::set< Int > > _scanToAntennasMap
Definition: MSMetaData.h:732
casacore::MSMetaData::~MSMetaData
virtual ~MSMetaData()
casacore::MSMetaData::_fieldToStatesMap
std::map< Int, std::set< Int > > _fieldToStatesMap
Definition: MSMetaData.h:733
casacore::MSMetaData::getSubScanKeys
std::set< SubScanKey > getSubScanKeys(const ArrayKey &arrayKey) const
get all sub scan keys for the specified array key.
casacore::MSMetaData::_nrows
uInt _nrows
Definition: MSMetaData.h:727
casacore::MSMetaData::getCache
Float getCache() const
Definition: MSMetaData.h:582
casacore::MSMetaData::_subScanProperties
std::shared_ptr< const std::map< SubScanKey, SubScanProperties > > _subScanProperties
Definition: MSMetaData.h:737
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::getSpwsForScan
std::set< uInt > getSpwsForScan(const ScanKey &scan) const
get the set of spectral windows for the specified scan.
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::getFieldsForSourceMap
std::map< Int, std::set< Int > > getFieldsForSourceMap() const
casacore::MSMetaData::SQLD_EXCLUDE
Definition: MSMetaData.h:74
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::ColumnStats::min
Double min
Definition: MSMetaData.h:86
casacore::MSMetaData::_schedules
vector< vector< String > > _schedules
Definition: MSMetaData.h:757
casacore::MSMetaData::getEffectiveTotalExposureTime
Quantity getEffectiveTotalExposureTime()
get the effective total exposure time.
casacore::MSMetaData::getSpwsForSubScan
std::set< uInt > getSpwsForSubScan(const SubScanKey &subScan) const
get the set of spectral windows for the specified subscan.
casacore::MSMetaData::getTimesForScan
std::set< Double > getTimesForScan(const ScanKey &scan) const
get the times for the specified scan.
casacore::MSMetaData::_taqlTempTable
const vector< const Table * > _taqlTempTable
Definition: MSMetaData.h:777
casacore::MSMetaData::_source_sourceIDs
vector< Int > _source_sourceIDs
Definition: MSMetaData.h:781
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:102
casacore::MSMetaData::_sqldSpw
std::set< uInt > _sqldSpw
Definition: MSMetaData.h:745
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::_fieldToIntentsMap
vector< std::set< String > > _fieldToIntentsMap
Definition: MSMetaData.h:750
casacore::MSMetaData::_subScanToNACRowsMap
std::shared_ptr< std::map< SubScanKey, uInt > > _subScanToNACRowsMap
Definition: MSMetaData.h:746
casacore::MSMetaData::_getMainScalarColumn
std::shared_ptr< Vector< T > > _getMainScalarColumn(MSMainEnums::PredefinedColumns col) const
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:683
casacore::MSMetaData::_nXCRows
uInt _nXCRows
Definition: MSMetaData.h:727
casacore::MSMetaData::SubScanProperties::acRows
uInt acRows
number of auto-correlation rows
Definition: MSMetaData.h:93
casacore::MSMetaData::_getTimes
std::shared_ptr< Vector< Double > > _getTimes() const
casacore::MSMetaData::_intentToScansMap
std::map< String, std::set< ScanKey > > _intentToScansMap
Definition: MSMetaData.h:740
casacore::MSMetaData::_forceSubScanPropsToCache
Bool _forceSubScanPropsToCache
Definition: MSMetaData.h:779
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:107
casacore::MSMetaData::_getScalarQuantDoubleColumn
static void _getScalarQuantDoubleColumn(Quantum< Vector< Double > > &v, TableProxy &table, const String &colname, Int beginRow, Int nrows)
casacore::MSMetaData::getNumCorrs
vector< Int > getNumCorrs() const
number of correlations from the polarization table.
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::getFieldNamesForSpw
std::set< String > getFieldNamesForSpw(const uInt spw)
get the set of field names corresponding to the specified spectral window.
casacore::MSMetaData::SQLD_INCLUDE
Definition: MSMetaData.h:73
casacore::MSMetaData::SpwProperties::resolution
QVD resolution
RESOLUTION.
Definition: MSMetaData.h:709
casacore::MSMetaData::SpwProperties
Definition: MSMetaData.h:688
casacore::MSMetaData::_nDataDescIDs
uInt _nDataDescIDs
Definition: MSMetaData.h:727
casacore::MSMetaData::getEdgeChans
vector< vector< Double > > getEdgeChans()
casacore::MSMetaData::_getAntennaPositions
vector< MPosition > _getAntennaPositions() const
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::_getEphemFieldIDs
std::shared_ptr< std::set< Int > > _getEphemFieldIDs() const
get the field IDs of ephemeris objects
casacore::MSMetaData::getSQLDSpw
std::set< uInt > getSQLDSpw()
ALMA-specific.
casacore::MSMetaData::_nUnflaggedXCRows
Double _nUnflaggedXCRows
Definition: MSMetaData.h:773
casacore::MSMetaData::_uniqueAntennaIDs
std::set< Int > _uniqueAntennaIDs
Definition: MSMetaData.h:744
casacore::MSMetaData::getTDMSpw
std::set< uInt > getTDMSpw()
ALMA-specific.
casacore::MSMetaData::SpwProperties::effbw
QVD effbw
EFFECTIVE_BANDWIDTH.
Definition: MSMetaData.h:707
casacore::MSMetaData::getSpwToDataDescriptionIDMap
std::vector< std::set< uInt > > getSpwToDataDescriptionIDMap() const
get a mapping of spectral window ID to data descrption IDs
casacore::MSMetaData::getAntennaDiameters
QVD getAntennaDiameters() const
get the antenna diameters
casacore::MSMetaData::SpwProperties::chanfreqs
QVD chanfreqs
Definition: MSMetaData.h:690
casacore::MSMetaData::_nAntennas
uInt _nAntennas
Definition: MSMetaData.h:727
casacore::MSMetaData::SubScanProperties::stateIDs
std::set< Int > stateIDs
Definition: MSMetaData.h:112
casacore::MSMetaData::BOTH
Definition: MSMetaData.h:69
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::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::hasBBCNo
Bool hasBBCNo() const
casacore::MSMetaData::_getFieldIDs
std::shared_ptr< Vector< Int > > _getFieldIDs() const
casacore::MSMetaData::getIntents
std::set< String > getIntents() const
get all intents, in no particular (nor guaranteed) order.
casacore::MSMetaData::_arrayKeys
std::set< ArrayKey > _arrayKeys
Definition: MSMetaData.h:783
casacore::MSMetaData::getUniqueBaselines
Matrix< Bool > getUniqueBaselines()
std::map<Double, Double> getExposuresForTimes() const;
casacore::MSMetaData::_getFieldsAndSpwMaps
void _getFieldsAndSpwMaps(std::map< Int, std::set< uInt > > &fieldToSpwMap, vector< std::set< Int > > &spwToFieldMap) const
casacore::MSMetaData::_uniqueBaselines
Matrix< Bool > _uniqueBaselines
Definition: MSMetaData.h:771
casacore::MSMetaData::getNRowMap
std::shared_ptr< const std::map< SubScanKey, uInt > > getNRowMap(CorrelationType type) const
casacore::MSMetaData::SpwProperties::nchans
uInt nchans
Definition: MSMetaData.h:699
casacore::MSMetaData::getBandWidths
vector< Double > getBandWidths() const
casacore::MSMetaData::nObservations
uInt nObservations() const
get the number of observations (from the OBSERVATIONS table) in the dataset
casacore::MSMetaData::_antennaNames
vector< String > _antennaNames
Definition: MSMetaData.h:755
casacore::MSMetaData::_unflaggedSubScanNACRows
std::shared_ptr< std::map< SubScanKey, Double > > _unflaggedSubScanNACRows
Definition: MSMetaData.h:775
casacore::MSMetaData::_dataDescIDToPolIDMap
vector< uInt > _dataDescIDToPolIDMap
Definition: MSMetaData.h:730
casacore::MSMetaData::_getFlags
std::shared_ptr< ArrayColumn< Bool > > _getFlags() const
casacore::MSMetaData::_modifyFirstExposureTimeIfNecessary
static void _modifyFirstExposureTimeIfNecessary(FirstExposureTimeMap &current, const FirstExposureTimeMap &test)
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::_scanToTimesMap
std::shared_ptr< std::map< ScanKey, std::set< Double > > > _scanToTimesMap
Definition: MSMetaData.h:761
casacore::MSMetaData::_fdmSpw
std::set< uInt > _fdmSpw
Definition: MSMetaData.h:745
casacore::MSMetaData::_createSubScanRecords
void _createSubScanRecords(Record &parent, uInt &scanNRows, std::set< Int > &antennasForScan, const ScanKey &scanKey, const std::map< SubScanKey, SubScanProperties > &subScanProps) const
casacore::MSMetaData::getCorrProducts
vector< Array< Int > > getCorrProducts() const
POLARIZATION.CORR_PRODUCT.
casacore::MSMetaData::SQLDSwitch
SQLDSwitch
Definition: MSMetaData.h:72
casacore::MSMetaData::getMS
const MeasurementSet * getMS() const
Definition: MSMetaData.h:659
casacore::MSMetaData::_stationNames
vector< String > _stationNames
Definition: MSMetaData.h:755
casacore::MSMetaData::SubScanProperties::antennas
std::set< Int > antennas
Definition: MSMetaData.h:96
casacore::MSMetaData::getTimesForScans
std::set< Double > getTimesForScans(std::set< ScanKey > scans) const
Get the times for the specified scans.
casacore::MSMetaData::getAntennaPositions
vector< MPosition > getAntennaPositions(const vector< uInt > &which=std::vector< uInt >(0)) const
get the positions of the specified antennas.
casacore::MSMetaData::SubScanProperties::ddIDs
std::set< uInt > ddIDs
Definition: MSMetaData.h:98
casacore::MSMetaData::SubScanProperties::beginTime
Double beginTime
Definition: MSMetaData.h:97
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:678
casacore::MSMetaData::getAntennaStations
vector< String > getAntennaStations(const vector< uInt > &antennaIDs=vector< uInt >())
get the antenna stations for the specified antenna IDs
casacore::MSMetaData::getFieldNamesForSourceMap
std::map< Int, std::set< String > > getFieldNamesForSourceMap() const
casacore::MSMetaData::getDataDescIDToSpwMap
vector< uInt > getDataDescIDToSpwMap() const
casacore::MSMetaData::SpwProperties::reffreq
MFrequency reffreq
from the REF_FREQUENCY column
Definition: MSMetaData.h:704
casacore::MSMetaData::ColumnStats::median
Double median
Definition: MSMetaData.h:85
casacore::MSMetaData::_getStationNames
vector< String > _getStationNames()
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::getIntentToFieldsMap
std::map< String, std::set< Int > > getIntentToFieldsMap()
casacore::MSMetaData::getSpwToTimesForScan
std::map< uInt, std::set< Double > > getSpwToTimesForScan(const ScanKey &scan) const
casacore::MSMetaData::_uniqueIntents
std::set< String > _uniqueIntents
Definition: MSMetaData.h:743
casacore::ArrayKey
An ArrayKey is a unique combination of observation ID and array ID Negative values are allowed to ind...
Definition: MSKeys.h:89
casacore::MSMetaData::_fieldCodes
vector< String > _fieldCodes
Definition: MSMetaData.h:755
casacore::MSMetaData::getSubScanProperties
SubScanProperties getSubScanProperties(const SubScanKey &subScan, Bool showProgress=False) const
get the sub scan properties for the specified sub scan.
casacore::MSMetaData::SubScanProperties::spws
std::set< uInt > spws
Definition: MSMetaData.h:109
casacore::MSMetaData::getBBCNos
vector< uInt > getBBCNos() const
casacore::MSMetaData::SpwProperties::name
String name
Definition: MSMetaData.h:705
casacore::MSMetaData::_sourceToFieldsMap
std::map< Int, std::set< Int > > _sourceToFieldsMap
Definition: MSMetaData.h:733
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::ColumnStats
Definition: MSMetaData.h:83
casacore::MSMetaData::nSpw
uInt nSpw(Bool includewvr) const
get number of spectral windows
casacore::MSMetaData::_getObservationIDToArrayIDsMap
vector< std::set< Int > > _getObservationIDToArrayIDsMap() const
map<SubScanKey, Quantity> _getMeanExposureTimes() const;
casacore::MSMetaData::_uniqueStateIDs
std::set< Int > _uniqueStateIDs
Definition: MSMetaData.h:744
casacore::MSMetaData::_obsToArraysMap
vector< std::set< Int > > _obsToArraysMap
Definition: MSMetaData.h:752
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::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::Float
float Float
Definition: aipstype.h:54
casacore::MSMetaData::getTimeRangeForScan
std::pair< Double, Double > getTimeRangeForScan(const ScanKey &scanKey) const
get the time range for the specified scan.
casacore::MSMetaData::ColumnStats::max
Double max
Definition: MSMetaData.h:84
casacore::MSMetaData::_nFields
uInt _nFields
Definition: MSMetaData.h:727
casacore::MSMetaData::_spwInfo
vector< SpwProperties > _spwInfo
Definition: MSMetaData.h:751
casacore::MSMetaData::getFieldsForIntent
std::set< Int > getFieldsForIntent(const String &intent)
get the field IDs associated with the specified intent.
casacore::MSMetaData::_getArrayKeysToSubScanKeys
std::map< ArrayKey, std::set< SubScanKey > > _getArrayKeysToSubScanKeys() const
casacore::MSMetaData::SubScanProperties::meanExposureTime
Quantity meanExposureTime
Definition: MSMetaData.h:108
casacore::MSMetaData::_checkScan
void _checkScan(const ScanKey &key) const
casacore::MSMetaData::_intentToSpwsMap
std::map< String, std::set< uInt > > _intentToSpwsMap
Definition: MSMetaData.h:762
casacore::MSMetaData::getIntervalStatistics
ColumnStats getIntervalStatistics() const
get statistics related to the values of the INTERVAL column.
casacore::MSMetaData::_stateToFieldsMap
std::map< Int, std::set< Int > > _stateToFieldsMap
Definition: MSMetaData.h:733
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::Double
double Double
Definition: aipstype.h:55
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::_getFieldsAndScansMaps
void _getFieldsAndScansMaps(vector< std::set< ScanKey > > &fieldToScansMap, std::map< ScanKey, std::set< Int > > &scanToFieldsMap) const
casacore::MSMetaData::ScanProperties::times
std::map< uInt, std::set< Double > > times
times for each spectral window
Definition: MSMetaData.h:685
casacore::MSMetaData::getMeanFreqs
vector< Quantity > getMeanFreqs() const
casacore::MSMetaData::_properMotions
vector< std::pair< Quantity, Quantity > > _properMotions
Definition: MSMetaData.h:793
casacore::MSMetaData::SpwProperties::bbcno
uInt bbcno
Definition: MSMetaData.h:702
casacore::MSMetaData::_createTimeStampRecords
static void _createTimeStampRecords(Record &parent, const SubScanProperties &subScanProps)
casacore::MSMetaData::_getScans
std::shared_ptr< Vector< Int > > _getScans() const
casacore::MSMetaData::getScanToFirstExposureTimeMap
std::map< ScanKey, FirstExposureTimeMap > getScanToFirstExposureTimeMap(Bool showProgress) const
get map of scans to first exposure times
casacore::MSMetaData::getUniqueFiedIDs
std::set< Int > getUniqueFiedIDs() const
DEPRECATED because of spelling error.
Definition: MSMetaData.h:634
casacore::False
const Bool False
Definition: aipstype.h:44
casacore::uInt
unsigned int uInt
Definition: aipstype.h:51
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::_fieldToScansMap
vector< std::set< ScanKey > > _fieldToScansMap
Definition: MSMetaData.h:753
casacore::MSMetaData::_observatoryPositions
vector< MPosition > _observatoryPositions
Definition: MSMetaData.h:768
casacore::MSMetaData::getScanKeys
std::set< ScanKey > getScanKeys() const
get all ScanKeys in the dataset
casacore::MSMetaData::_scanToFieldsMap
std::map< ScanKey, std::set< Int > > _scanToFieldsMap
Definition: MSMetaData.h:732
casacore::MSMainEnums::PredefinedColumns
PredefinedColumns
The Main table colums with predefined meaning.
Definition: MSMainEnums.h:65
casacore::MSMetaData::_spwToScansMap
vector< std::set< ScanKey > > _spwToScansMap
Definition: MSMetaData.h:753
casacore::MSMetaData::_getScanToTimesMap
std::shared_ptr< std::map< ScanKey, std::set< Double > > > _getScanToTimesMap() 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::SpwProperties::edgechans
vector< Double > edgechans
The center frequencies of the two channels at the edges of the window.
Definition: MSMetaData.h:701
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::setShowProgress
void setShowProgress(Bool b)
Definition: MSMetaData.h:661
casacore::MSMetaData::SpwProperties::chanwidths
QVD chanwidths
Definition: MSMetaData.h:691
casacore::MSMetaData::getRefFreqs
vector< MFrequency > getRefFreqs() const
casacore::MSMetaData::_getObservatoryPositions
vector< MPosition > _getObservatoryPositions()
casacore::MSMetaData::SQLD_ONLY
Definition: MSMetaData.h:75
casacore::MSMetaData::SourceProperties::restfreq
std::shared_ptr< vector< MFrequency > > restfreq
Definition: MSMetaData.h:715
casacore::MSMetaData::_setObservation
void _setObservation(const MeasurementSet &ms)
set metadata from OBSERVATION table
casacore::MSMetaData::nStates
uInt nStates() const
number of unique states (number of rows from the STATE table)
casacore::MSMetaData::getObservatoryNames
vector< String > getObservatoryNames()
get telescope names in the order they are listed in the OBSERVATION table.
casacore::MSMetaData::getTimeRangesOfObservations
vector< std::pair< MEpoch, MEpoch > > getTimeRangesOfObservations() const
get the time ranges from the OBSERVATION table
casacore::MSMetaData::CROSS
Definition: MSMetaData.h:68
casacore::MSMetaData::_unflaggedSubScanNXCRows
std::shared_ptr< std::map< SubScanKey, Double > > _unflaggedSubScanNXCRows
Definition: MSMetaData.h:775
casacore::MSMetaData::_fieldToNXCRowsMap
std::shared_ptr< std::map< Int, uInt > > _fieldToNXCRowsMap
Definition: MSMetaData.h:747
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::TimeStampProperties::nrows
uInt nrows
Definition: MSMetaData.h:80
casacore::MSMetaData::getObservatoryPosition
MPosition getObservatoryPosition(uInt which) const
get the position of the specified telescope (observatory).
casacore::MSMetaData::getSubScanToIntentsMap
std::shared_ptr< const std::map< SubScanKey, std::set< String > > > getSubScanToIntentsMap() const
casacore::MSMetaData::_intentToFieldIDMap
std::map< String, std::set< Int > > _intentToFieldIDMap
Definition: MSMetaData.h:739
casacore::MSMetaData::_getScalarDoubleColumn
static void _getScalarDoubleColumn(Vector< Double > &v, TableProxy &table, const String &colname, Int beginRow, Int nrows)
casacore::MSMetaData::_getDataDescIDs
std::shared_ptr< Vector< Int > > _getDataDescIDs() const
casacore::MSMetaData::nUniqueSourceIDsFromSourceTable
uInt nUniqueSourceIDsFromSourceTable() const
Number of unique values from SOURCE.SOURCE_ID.
casacore::MSMetaData::_field_sourceIDs
vector< Int > _field_sourceIDs
Definition: MSMetaData.h:781
casacore::MSMetaData::getFieldCodes
vector< String > getFieldCodes() const
get the values of the CODE column from the field table
casacore::MSMetaData::FirstExposureTimeMap
std::map< Int, std::pair< Double, Quantity > > FirstExposureTimeMap
Definition: MSMetaData.h:89
casacore::MSMetaData::_nStates
uInt _nStates
Definition: MSMetaData.h:727
casacore::MSMetaData::_getTimeToTotalBWMap
std::map< Double, Double > _getTimeToTotalBWMap(const Vector< Double > &times, const Vector< Int > &ddIDs)
casacore::MSMetaData::_subscans
std::set< SubScanKey > _subscans
Definition: MSMetaData.h:785
casacore::MSMetaData::_setSpwInfo
void _setSpwInfo(const MeasurementSet &ms)
This comment from thunter in the original ValueMapping python class.
casacore::MSMetaData::ScanProperties::spwNRows
std::map< uInt, uInt > spwNRows
number of rows for each spectral window
Definition: MSMetaData.h:680
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::_scanToSubScans
std::map< ScanKey, std::set< SubScanKey > > _scanToSubScans
Definition: MSMetaData.h:786
casacore::MDirection
A Measure: astronomical direction.
Definition: MDirection.h:174
casacore::SubScanKey
A sub scan is a unique combination of observation ID, array ID, scan number, and field ID.
Definition: MSKeys.h:42
casacore::MSMetaData::_corrTypes
vector< vector< Int > > _corrTypes
Definition: MSMetaData.h:758
casacore::MSMetaData::getStatesForScan
std::set< Int > getStatesForScan(Int obsID, Int arrayID, Int scan) const
get the stateIDs associated with the specified scan.
casacore::MSMetaData::_dataDescIDToSpwMap
vector< uInt > _dataDescIDToSpwMap
Definition: MSMetaData.h:730
casacore::MSMetaData::_checkField
void _checkField(uInt fieldID) const
casacore::MSMetaData::_spwToFieldIDsMap
vector< std::set< Int > > _spwToFieldIDsMap
Definition: MSMetaData.h:752
casacore::MSMetaData::_avgSpw
std::set< uInt > _avgSpw
Definition: MSMetaData.h:745
casacore::Quantity
Quantum< Double > Quantity
Definition: Quantum.h:38
casacore::MSMetaData::_getIntentsToTimesMap
std::map< String, std::set< Double > > _getIntentsToTimesMap() const
casacore::MSMetaData::_sourceNames
vector< String > _sourceNames
Definition: MSMetaData.h:755
casacore::MSMetaData::getTimesForField
std::set< Double > getTimesForField(Int fieldID)
get the times for which the specified field was observed
casacore::MSMetaData::_checkSubScan
void _checkSubScan(const SubScanKey &key) const
casacore::Int
int Int
Definition: aipstype.h:50
casacore
this file contains all the compiler specific defines
Definition: mainpage.dox:28
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::getSourceTimes
std::shared_ptr< const Quantum< Vector< Double > > > getSourceTimes() const
SOURCE.TIME.
casacore::MSMetaData::SubScanProperties
Definition: MSMetaData.h:91
casacore::MSMetaData::_tdmSpw
std::set< uInt > _tdmSpw
Definition: MSMetaData.h:745
casacore::MSMetaData::getSummary
Record getSummary() const
get a data structure, consumable by users, representing a summary of the dataset
casacore::MSMetaData::_getStateIDs
std::shared_ptr< Vector< Int > > _getStateIDs() const
casacore::MSMetaData::_nScans
uInt _nScans
Definition: MSMetaData.h:727
casacore::MSMetaData::_getScanToAntennasMap
std::map< ScanKey, std::set< Int > > _getScanToAntennasMap() const
casacore::MSMetaData::getSpwsForField
std::set< uInt > getSpwsForField(const Int fieldID) const
get a set of spectral windows corresponding to the specified fieldID
casacore::MSMetaData::_getScalarIntColumn
static void _getScalarIntColumn(Vector< Int > &v, TableProxy &table, const String &colname, Int beginRow, Int nrows)
casacore::MSMetaData::getIntentsForSubScan
std::set< String > getIntentsForSubScan(const SubScanKey &subScan) const
casacore::MSMetaData::_getSubScanKeys
std::set< SubScanKey > _getSubScanKeys() const
casacore::MSMetaData::getFieldIDsForField
std::set< Int > getFieldIDsForField(const String &field) const
get the field IDs for the specified field name.
casacore::MSMetaData::getAntennaOffsets
vector< QVD > getAntennaOffsets() const
casacore::MSMetaData::getIntentsForScan
std::set< String > getIntentsForScan(const ScanKey &scan) const
casacore::MSMetaData::_sourceInfo
std::map< SourceKey, SourceProperties > _sourceInfo
Definition: MSMetaData.h:795
casacore::True
const Bool True
Definition: aipstype.h:43
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::_subScanToIntentsMap
std::shared_ptr< const std::map< SubScanKey, std::set< String > > > _subScanToIntentsMap
Definition: MSMetaData.h:749
casacore::MSMetaData::_phaseDirs
vector< MDirection > _phaseDirs
Definition: MSMetaData.h:791
casacore::MSMetaData::getScanToSpwsMap
std::map< ScanKey, std::set< uInt > > getScanToSpwsMap() const
get the complete mapping of scans to spws
casacore::MSMetaData::getIntentToSpwsMap
std::map< String, std::set< uInt > > getIntentToSpwsMap()
casacore::MSMetaData::getSourceDirections
vector< MDirection > getSourceDirections() const
SOURCE.DIRECTION.
casacore::MSMetaData::_getObservationIDs
std::shared_ptr< Vector< Int > > _getObservationIDs() const
casacore::MSMetaData::getTimeRange
std::pair< Double, Double > getTimeRange(Bool showProgress=False) const
get the time range for the entire dataset.
casacore::MSMetaData::nPol
uInt nPol()
casacore::time
TableExprNode time(const TableExprNode &node)
Definition: ExprNode.h:1537
casacore::MSMetaData::getIntentsForField
std::set< String > getIntentsForField(Int fieldID)
get a set of intents corresponding to a specified field
casacore::MSMetaData::getChanWidths
vector< QVD > getChanWidths() const
casacore::MSMetaData::_getScansAndDDIDMaps
void _getScansAndDDIDMaps(std::map< ScanKey, std::set< uInt > > &scanToDDIDMap, vector< std::set< ScanKey > > &ddIDToScanMap) const
casacore::MSMetaData::nScans
uInt nScans()
get the number of scans in the dataset
casacore::MSMetaData::_getFieldsAndStatesMaps
void _getFieldsAndStatesMaps(std::map< Int, std::set< Int > > &fieldToStatesMap, std::map< Int, std::set< Int > > &stateToFieldsMap)
casacore::MSMetaData::_fieldToSpwMap
std::map< Int, std::set< uInt > > _fieldToSpwMap
Definition: MSMetaData.h:731
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, uInt beginRow, uInt endRow) const
Uses openmp for parallel processing.
casacore::MSMetaData::_uniqueDataDescIDs
std::set< uInt > _uniqueDataDescIDs
Definition: MSMetaData.h:745
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::_numCorrs
vector< Int > _numCorrs
Definition: MSMetaData.h:781
casacore::MSMetaData::SourceProperties::name
String name
Definition: MSMetaData.h:714
casacore::MSMetaData::nDataDescriptions
uInt nDataDescriptions() const
get the number of data description IDs (from the DATA_DESCRIPTION table)
casacore::MSMetaData
Class to interrogate an MS for metadata. Interrogation happens on demand and resulting metadata are s...
Definition: MSMetaData.h:61
casacore::MSMetaData::getNetSidebands
vector< Int > getNetSidebands() const
casacore::MSMetaData::getDataDescIDToPolIDMap
vector< uInt > getDataDescIDToPolIDMap() const
casacore::MSMetaData::nUnflaggedRows
Double nUnflaggedRows() const
get the number of unflagged rows
casacore::MSMetaData::_scanSpwToPolIDMap
std::map< std::pair< ScanKey, uInt >, std::set< uInt > > _scanSpwToPolIDMap
Definition: MSMetaData.h:742
casacore::MSMetaData::_wvrSpw
std::set< uInt > _wvrSpw
Definition: MSMetaData.h:745
casacore::MSMetaData::AUTO
Definition: MSMetaData.h:67
casacore::MSMetaData::getAntennaOffset
QVD getAntennaOffset(uInt which) const
get the position of the specified antenna relative to the observatory position.
casacore::MSMetaData::_timeRangesForObs
vector< std::pair< MEpoch, MEpoch > > _timeRangesForObs
Definition: MSMetaData.h:789
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::SpwProperties::bandwidth
Double bandwidth
Definition: MSMetaData.h:689
casacore::MSMetaData::SubScanProperties::endTime
Double endTime
Definition: MSMetaData.h:99
casacore::MSMetaData::operator=
MSMetaData operator=(const MSMetaData &)
casacore::MSMetaData::_getScanNumbers
std::set< Int > _getScanNumbers(const ArrayKey &arrayKey) const
get all valid scan numbers associated with the specified arrayKey
casacore::MSMetaData::_showProgress
Bool _showProgress
Definition: MSMetaData.h:724
casacore::MeasurementSet
A Table intended to hold astronomical data (a set of Measurements).
Definition: MeasurementSet.h:241
casacore::MSMetaData::SubScanProperties::spwNRows
std::map< uInt, uInt > spwNRows
number of rows for each spectral window
Definition: MSMetaData.h:111
casacore::MSMetaData::_getSourceInfo
std::map< SourceKey, SourceProperties > _getSourceInfo() const
casacore::MSMetaData::_fieldToNACRowsMap
std::shared_ptr< std::map< Int, uInt > > _fieldToNACRowsMap
Definition: MSMetaData.h:747
casacore::MSMetaData::_projects
vector< String > _projects
Definition: MSMetaData.h:755
casacore::MSMetaData::_getStateToIntentsMap
void _getStateToIntentsMap(vector< std::set< String > > &statesToIntentsMap, std::set< String > &uniqueIntents) const
casacore::MSMetaData::_intentToTimesMap
std::map< String, std::set< Double > > _intentToTimesMap
Definition: MSMetaData.h:763
casacore::MSMetaData::_unflaggedFieldNACRows
std::shared_ptr< vector< Double > > _unflaggedFieldNACRows
Definition: MSMetaData.h:774
casacore::MSMetaData::_observers
vector< String > _observers
Definition: MSMetaData.h:755
casacore::MSMetaData::_observatoryNames
vector< String > _observatoryNames
Definition: MSMetaData.h:755
casacore::MSMetaData::CorrelationType
CorrelationType
for retrieving stats
Definition: MSMetaData.h:66
casacore::MSMetaData::getSourceTableSourceIDs
vector< Int > getSourceTableSourceIDs() const
Get the SOURCE.SOURCE_ID column.
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::_spwInfoStored
Bool _spwInfoStored
Definition: MSMetaData.h:779
casacore::MSMetaData::getScanToStatesMap
std::map< ScanKey, std::set< Int > > getScanToStatesMap() const
get the mapping of scans to states
casacore::MSMetaData::SubScanProperties::xcRows
uInt xcRows
number of cross-correlation rows.
Definition: MSMetaData.h:95
casacore::MSMetaData::getFDMSpw
std::set< uInt > getFDMSpw()
ALMA-specific.
casacore::MSMetaData::_corrProds
vector< Array< Int > > _corrProds
Definition: MSMetaData.h:759
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::getScansForIntent
std::set< Int > getScansForIntent(const String &intent, Int obsID, Int arrayID) const
get the scans associated with the specified intent
casacore::MSMetaData::_getIntervals
std::shared_ptr< Quantum< Vector< Double > > > _getIntervals() const
casacore::String
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::MSMetaData::getChannelAvgSpw
std::set< uInt > getChannelAvgSpw()
ALMA-specific.
casacore::MSMetaData::nAntennas
uInt nAntennas() const
get the number of antennas in the ANTENNA table
casacore::MSMetaData::_scanProperties
std::shared_ptr< const std::map< ScanKey, ScanProperties > > _scanProperties
Definition: MSMetaData.h:736
casacore::MSMetaData::TimeStampProperties
Definition: MSMetaData.h:78
casacore::MSMetaData::_sourceTimes
std::shared_ptr< const Quantum< Vector< Double > > > _sourceTimes
Definition: MSMetaData.h:797
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::Bool
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::MSMetaData::_nArrays
uInt _nArrays
Definition: MSMetaData.h:727
casacore::MSMetaData::_createScanRecords
void _createScanRecords(Record &parent, const ArrayKey &arrayKey, const std::map< SubScanKey, SubScanProperties > &subScanProps) const
casacore::MSMetaData::_firstExposureTimeMap
vector< std::map< Int, Quantity > > _firstExposureTimeMap
Definition: MSMetaData.h:780
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::QVector< Double >
casacore::MSMetaData::_sourceDirs
vector< MDirection > _sourceDirs
Definition: MSMetaData.h:791
casacore::MSMetaData::getFieldNamesForFieldIDs
vector< String > getFieldNamesForFieldIDs(const vector< uInt > &fieldIDs)
get the field names associated with the specified field IDs.
casacore::MSMetaData::_getExposureTimes
std::shared_ptr< Quantum< Vector< Double > > > _getExposureTimes() const
casacore::MSMetaData::_hasFieldID
Bool _hasFieldID(Int fieldID) const
casacore::MSMetaData::getTimesForSpws
std::vector< std::set< Double > > getTimesForSpws(Bool showProgress=True) const
get a map of spectral windows to unique timestamps.
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::TableProxy
High-level interface to tables.
Definition: TableProxy.h:103
casacore::MSMetaData::getPointingDirection
std::pair< MDirection, MDirection > getPointingDirection(Int &ant1, Int &ant2, Double &time, uInt row, Bool interpolate=false, Int initialguess=0) const
get the pointing directions associated with antenna1 and antenna2 for the specified row of the main M...
casacore::MSMetaData::_spwToIntentsMap
vector< std::set< String > > _spwToIntentsMap
Definition: MSMetaData.h:750
casacore::Record
A hierarchical collection of named fields of various types.
Definition: Record.h:180
casacore::MSMetaData::_getScanToSubScansMap
std::map< ScanKey, std::set< SubScanKey > > _getScanToSubScansMap() const
casacore::MSMetaData::getUniqueFieldIDs
std::set< Int > getUniqueFieldIDs() const
get unique field IDs that exist in the main table.
casacore::MSMetaData::getSpwToScansMap
std::vector< std::set< ScanKey > > getSpwToScansMap() const
get the complete mapping of spws to scans
casacore::MSMetaData::_antennaPositions
vector< MPosition > _antennaPositions
Definition: MSMetaData.h:768
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::Unit
defines physical units
Definition: Unit.h:189
casacore::MSMetaData::SourceProperties::transition
std::shared_ptr< vector< String > > transition
Definition: MSMetaData.h:716
casacore::MSMetaData::getSourceNames
vector< String > getSourceNames() const
SOURCE.NAME.
casacore::Vector< Int >
casacore::MSMetaData::_antennaOffsets
vector< QVD > _antennaOffsets
Definition: MSMetaData.h:769
casacore::MSMetaData::_stateToIntentsMap
vector< std::set< String > > _stateToIntentsMap
Definition: MSMetaData.h:750
casacore::ScanKey
A scan is a unique combination of observation ID, array ID, and scan number Negative values are allow...
Definition: MSKeys.h:59
casacore::MSMetaData::ScanProperties
Definition: MSMetaData.h:670
casacore::MSMetaData::_hasIntent
Bool _hasIntent(const String &intent) const
std::shared_ptr<std::map<Double, TimeStampProperties> > _getTimeStampProperties() const;
casacore::MSMetaData::getIntentsForSpw
std::set< String > getIntentsForSpw(const uInt spw)
get a set of intents corresponding to the specified spectral window
casacore::MSMetaData::_checkScans
void _checkScans(const std::set< ScanKey > &scanKeys) const
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:698
casacore::MSMetaData::_generateSubScanPropsIfWanted
std::shared_ptr< const std::map< SubScanKey, SubScanProperties > > _generateSubScanPropsIfWanted() const
if _subScanProperties has been generated, just return it.
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::_uniqueFieldIDs
std::set< Int > _uniqueFieldIDs
Definition: MSMetaData.h:744
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:723
casacore::MSMetaData::_ephemFields
std::shared_ptr< std::set< Int > > _ephemFields
Definition: MSMetaData.h:796
casacore::MSMetaData::_maxCacheMB
const Float _maxCacheMB
Definition: MSMetaData.h:726
casacore::MSMetaData::_scanKeys
std::set< ScanKey > _scanKeys
Definition: MSMetaData.h:784
casacore::MSMetaData::_nPol
uInt _nPol
Definition: MSMetaData.h:727
casacore::MSMetaData::_antennaDiameters
QVD _antennaDiameters
Definition: MSMetaData.h:770
casacore::MSMetaData::_exposureTime
Quantity _exposureTime
Definition: MSMetaData.h:772
casacore::MSMetaData::_timeToFieldsMap
std::shared_ptr< std::map< Double, std::set< Int > > > _timeToFieldsMap
Definition: MSMetaData.h:766
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::getIntentToScansMap
std::map< String, std::set< ScanKey > > getIntentToScansMap()
casacore::MSMetaData::getChanEffectiveBWs
vector< QVD > getChanEffectiveBWs(Bool asVelWidths) const
get the effective bandwidth for each channel.
casacore::MSMetaData::_scanToIntentsMap
std::map< ScanKey, std::set< String > > _scanToIntentsMap
Definition: MSMetaData.h:748
casacore::MSMetaData::_ddidToScansMap
vector< std::set< ScanKey > > _ddidToScansMap
Definition: MSMetaData.h:753
casacore::MSMetaData::_getArrayIDs
std::shared_ptr< Vector< Int > > _getArrayIDs() const
casacore::MSMetaData::_nSpw
uInt _nSpw
Definition: MSMetaData.h:727
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::_taqlTableName
const String _taqlTableName
Definition: MSMetaData.h:776
casacore::MSPointingColumns
A class to provide easy access to MSPointing columns.
Definition: MSPointingColumns.h:79
casacore::Quantum
Quantities (i.e. dimensioned values)
Definition: MeasValue.h:40
casacore::MSMetaData::_checkTolerance
static void _checkTolerance(const Double tol)
casacore::MSMetaData::SpwProperties::netsideband
Int netsideband
Definition: MSMetaData.h:692
casacore::MSMetaData::nArrays
uInt nArrays()
get the number of arrays (from the ARRAY table) in the dataset
casacore::MSMetaData::getBBCNosToSpwMap
std::map< uInt, std::set< uInt > > getBBCNosToSpwMap(SQLDSwitch sqldSwitch)
casacore::MSMetaData::getCenterFreqs
vector< Quantity > getCenterFreqs() const
casacore::MSMetaData::_generateScanPropsIfWanted
std::shared_ptr< const std::map< ScanKey, ScanProperties > > _generateScanPropsIfWanted() const
if _scanProps has been generated, just return it.
casacore::MSMetaData::getTimesForIntent
std::set< Double > getTimesForIntent(const String &intent) const
get the time stamps associated with the specified intent
casacore::MSMetaData::getScanNumbers
std::set< Int > getScanNumbers(Int obsID, Int arrayID) const
get unique scan numbers
casacore::MSMetaData::_getAntennas
void _getAntennas(std::shared_ptr< Vector< Int > > &ant1, std::shared_ptr< Vector< Int > > &ant2) const
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::getCorrTypes
vector< vector< Int > > getCorrTypes() const
POLARIZATION.CORR_TYPE.
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::_spwPolIDToDataDescIDMap
std::map< std::pair< uInt, uInt >, uInt > _spwPolIDToDataDescIDMap
Definition: MSMetaData.h:734
casacore::MSMetaData::SpwProperties::meanfreq
Quantity meanfreq
The sum of all channel frequencies divided by the number of channels.
Definition: MSMetaData.h:694
casacore::MSMetaData::getFieldsForScan
std::set< Int > getFieldsForScan(const ScanKey &scan) const
get field IDs associated with the specified scan number.
casacore::MSMetaData::getSpwNames
vector< String > getSpwNames() const
get a map of the spwIDs to spw names from the spw table
casacore::MSMetaData::nRows
uInt nRows() const
get the number of visibilities
casacore::MSMetaData::_getSpwsAndIntentsMaps
void _getSpwsAndIntentsMaps(vector< std::set< String > > &spwToIntentsMap, std::map< String, std::set< uInt > > &intentToSpwsMap)
casacore::MSMetaData::SourceProperties
represents non-primary key data for a SOURCE table row
Definition: MSMetaData.h:713
casacore::MSMetaData::_subScanToNXCRowsMap
std::shared_ptr< std::map< SubScanKey, uInt > > _subScanToNXCRowsMap
Definition: MSMetaData.h:746
casacore::MSMetaData::_nACRows
uInt _nACRows
Definition: MSMetaData.h:727
casacore::MSMetaData::_sizeof
static uInt _sizeof(const std::map< Double, MSMetaData::TimeStampProperties > &m)
casacore::MSMetaData::getChanResolutions
vector< QVD > getChanResolutions(Bool asVelWidths) const
get the resolution for each channel.
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.