casacore
MeasurementSet.h
Go to the documentation of this file.
1 //# MeasurementSet.h: A Table to hold astronomical data (a set of Measurements)
2 //# Copyright (C) 1996,1997,1999,2000,2001,2003
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 //#
27 //# $Id$
28 
29 #ifndef MS_MEASUREMENTSET_H
30 #define MS_MEASUREMENTSET_H
31 
32 #include <casacore/casa/aips.h>
33 #include <casacore/ms/MeasurementSets/MSTable.h>
34 #include <casacore/ms/MeasurementSets/MSMainEnums.h>
35 #include <casacore/ms/MeasurementSets/MSAntenna.h>
36 #include <casacore/ms/MeasurementSets/MSDataDescription.h>
37 #include <casacore/ms/MeasurementSets/MSDoppler.h>
38 #include <casacore/ms/MeasurementSets/MSFeed.h>
39 #include <casacore/ms/MeasurementSets/MSField.h>
40 #include <casacore/ms/MeasurementSets/MSFlagCmd.h>
41 #include <casacore/ms/MeasurementSets/MSFreqOffset.h>
42 #include <casacore/ms/MeasurementSets/MSHistory.h>
43 #include <casacore/ms/MeasurementSets/MSObservation.h>
44 #include <casacore/ms/MeasurementSets/MSPointing.h>
45 #include <casacore/ms/MeasurementSets/MSPolarization.h>
46 #include <casacore/ms/MeasurementSets/MSProcessor.h>
47 #include <casacore/ms/MeasurementSets/MSSource.h>
48 #include <casacore/ms/MeasurementSets/MSSpectralWindow.h>
49 #include <casacore/ms/MeasurementSets/MSState.h>
50 #include <casacore/ms/MeasurementSets/MSSysCal.h>
51 #include <casacore/ms/MeasurementSets/MSWeather.h>
52 #include <set>
53 
54 
55 namespace casacore { //# NAMESPACE CASACORE - BEGIN
56 
57 class MrsEligibility { // Memory Resident Subtable (Mrs) Eligibility (no pun intended)
58 
59 public:
60 
62 
63  friend MrsEligibility operator- (const MrsEligibility & a, SubtableId subtableId);
64  friend MrsEligibility operator+ (const MrsEligibility & a, SubtableId subtableId);
65  friend MrsEligibility operator- (const MrsEligibility & a, const MrsEligibility & b);
66  friend MrsEligibility operator+ (const MrsEligibility & a, const MrsEligibility & b);
67 
68  // Returns true if the specified subtable is in the set of subtables
69  // eligible for memory residency.
70  Bool isEligible (SubtableId subtableId) const;
71 
72  // Factory methods to create MrsEligibility sets. The two variable argument methods
73  // require that the list be terminated by using the id MSMainEnums::UNDEFINED_KEYWORD.
74  //
75  static MrsEligibility allEligible ();
77  static MrsEligibility noneEligible ();
78  static MrsEligibility eligibleSubtables (SubtableId subtableId, ...);
79  static MrsEligibility allButTheseSubtables (SubtableId ineligibleSubtableId, ...);
80 
81 private:
82 
83  typedef std::set<MSMainEnums::PredefinedKeywords> Eligible;
84 
86 
88 
89  static Bool isSubtable (SubtableId subtableId);
90 };
91 
92 // Creates a new MrsEligibilitySet by adding or removing the specified subtable or
93 // the specified set of subtables.
98 
99 //# Forward Declarations, more could be if they weren't part of the
100 //# static classes
101 class SetupNewTable;
102 template <class T> class Block;
103 class MDirection;
104 class MEpoch;
105 class MFrequency;
106 class MPosition;
107 class Record;
108 
109 //# forward declared so that the following typedef is up-front
111 
112 // MeasurementSet is too cumbersome for a number of common uses,
113 // so we give a typedef here.
114 typedef MeasurementSet MS;
115 
116 // <summary>
117 // A Table intended to hold astronomical data (a set of Measurements).
118 // </summary>
119 
120 // <use visibility=export>
121 
122 // <reviewed reviewer="Bob Garwood" date="1997/02/01" tests="tMeasurementSet.cc" demos="">
123 
124 // <prerequisite>
125 // <li> <linkto module="Tables:description">Tables</linkto> module
126 // <li> <linkto class="MSTable">MSTable</linkto>
127 // </prerequisite>
128 //
129 // <etymology>
130 // The MeasurementSet is where all data are ultimately to be found
131 // in Casacore. Since, this is a collection of
132 // measurements (either actual or simulated), the term MeasurementSet
133 // seems appropriate.
134 // </etymology>
135 //
136 // <synopsis>
137 // A MeasurementSet is a Table. Most operations on a MeasurementSet are
138 // Table operations. See the <linkto module="Tables:description">Tables</linkto>
139 // module for a list of those operations. The member functions provided by this
140 // class are primarily convenience functions to help users follow the
141 // agreed upon column and keyword naming conventions. They are useful when
142 // creating a Table following the MeasurementSet conventions from
143 // scratch as well as when creating the column objects to access those
144 // columns.
145 //
146 // The standard way of accessing
147 // table columns is through Strings. Mistakes in typing the column
148 // name will not be caught at compile time (and may not be caught at
149 // run time). We have therefore decided to use an enumeration
150 // to specify columns so that many mistakes will be caught at compile
151 // time. This requires functions to map to and from this enumeration
152 // to the strings that are ultimately used.
153 //
154 // Upon destruction, the table is checked to see that the
155 // MeasurementSet remains valid, i.e., all required columns are present
156 // An exception is thrown if not all required columns are present
157 // Nevertheless, the table will be flushed to disk if it is writable -
158 // preserving its state.
159 //
160 // A MeasurementSet has a number of required subtables. These are stored
161 // as keywords in the Table. Access to these subtables is provided via
162 // member functions (e.g. antenna() for the ANTENNA table). All subtables
163 // have associated MeasurementSet-like classes defined for them (MSAntenna
164 // for the ANTENNA table) which provide analogous column and keyword mapping
165 // as provided here.
166 //
167 // While the class name, MeasurementSet, is descriptive, it is often
168 // too long for many common uses. The typedef MS is provided as
169 // a convenient shorthand for MeasurementSet. The example below uses this
170 // typedef.
171 //
172 // Due to the inheritance scheme, it was necessary to separate the enumerations
173 // used by MeasurementSet into a separate class,
174 // <linkto class=MSMainEnums>MSMainEnums</linkto>.
175 //
176 // </synopsis>
177 //
178 // <example>
179 // This example illustrates a simple use of the MeasurementSet class.
180 // <srcblock>
181 // // create the table descriptor
182 // TableDesc simpleDesc = MS::requiredTableDesc();
183 // // set up a new table
184 // SetupNewTable newTab("simpleTab", simpleDesc, Table::New);
185 // // create the MeasurementSet
186 // MeasurementSet simpleMS(newTab);
187 // // now we need to define all required subtables
188 // // the following call does this for us if we don't need to
189 // // specify details of Storage Managers for columns.
190 // simpleMS.createDefaultSubtables(Table::New);
191 // // fill MeasurementSet via its Table interface
192 // // For example, construct one of the columns
193 // TableColumn feed(simpleMS, MS::columnName(MS::FEED1));
194 // uInt rownr = 0;
195 // // add a row
196 // simpleMS.addRow();
197 // // set the values in that row, e.g. the feed column
198 // feed.putScalar(rownr,1);
199 // // Access a subtable
200 // ArrayColumn<Double> antpos(simpleMS.antenna(),
201 // MSAntenna::columnName(MSAntenna::POSITION));
202 // simpleMS.antenna().addRow();
203 // Array<Double> position(3);
204 // position(0)=1.; position(1)=2.; position(2)=3.;
205 // antpos.put(0,position);
206 // // etc.
207 // </srcblock>
208 //
209 // </example>
210 //
211 // <motivation>
212 // The Table module is more than adequate as a container of data.
213 // However, in order for applications to be useful with data from
214 // different sources, some conventions need to be adopted in the use
215 // of Tables to store data. The MeasurementSet is
216 // where those conventions are defined and, to some extent, enforced.
217 //
218 // There are a number of reasons why MeasurementSet is more
219 // than just a Table.
220 // <ul>
221 // <li> To provide one location where the column and keyword names, data
222 // types, and table comment strings are found.
223 // <li> To provide one location where the required table descriptor for
224 // the MeasurementSet is found.
225 // <li> To provide a means of verifying the validity of a MeasurementSet
226 // at construction and destruction.
227 // <li> To allow application programmers to catch name or data type
228 // mistakes at compile time rather than at run time.
229 // </ul>
230 //
231 // </motivation>
232 //
233 // <todo asof="1996/2/22">
234 // <li> referenceCopy() should be more flexible with the storage managers used
235 // for the columns which are not merely references.
236 // <li> When ForwardColumnEngine is fixed so that it can deal with
237 // tables already in the cache, modify the test program. It may also
238 // be necessary to modify referenceCopy().
239 // </todo>
240 
241 class MeasurementSet : public MSTable<MSMainEnums>,
242  public MSMainEnums
243 {
244 
245 public:
246  // This constructs an empty MeasurementSet, only useful to assign to
247  // (it is not a valid MS yet).
248  MeasurementSet ();
249 
250  // These constructors mirror the Table ones with additional checking
251  // on validity (verifying that the MS will have the required columns
252  // and keywords)
253  // An exception is thrown if the constructed Table is not a valid MS
254  // <thrown>
255  // <li> AipsError
256  // </thrown>
257  // <group name=tableLikeConstructors>
258 
262 
264  bool doNotLockSubtables, TableOption = Table::Old);
265  // Allows keeping subtables unlocked/read-locked independent of lock
266  // mode of main table.
267 
268  MeasurementSet (const String &tableName, const String &tableDescName,
270  MeasurementSet (const String &tableName, const String &tableDescName,
272  MeasurementSet (SetupNewTable &newTab, uInt nrrow = 0,
273  Bool initialize = False);
275  uInt nrrow = 0, Bool initialize = False);
276  MeasurementSet (const Table &table, const MeasurementSet * otherMs = NULL);
277 
278 #ifdef HAVE_MPI
279  MeasurementSet (MPI_Comm comm, SetupNewTable &newTab, uInt nrrow = 0,
280  Bool initialize = False);
281  MeasurementSet (MPI_Comm comm, SetupNewTable &newTab, const TableLock& lockOptions,
282  uInt nrrow = 0, Bool initialize = False);
283 #endif // HAVE_MPI
284 
285  MeasurementSet (const MeasurementSet &other);
286  // </group>
287 
288  // As with tables, the destructor writes the table if necessary.
289  // Additional checking is done here to verify that all required
290  // columns are still present.
291  // If it is NOT valid, it will write the table and then throw an exception.
292  // <thrown>
293  // <li> AipsError
294  // </thrown>
295  virtual ~MeasurementSet();
296 
297  // Assignment operator, reference semantics
299 
300  // Make a special copy of this MS which references all columns from
301  // this MS except those mentioned; those are empty and writable.
302  // Each forwarded column has the same writable status as the underlying
303  // column. The mentioned columns all use the AipsIO storage manager.
304  // The main use of this is for the synthesis package where corrected and
305  // model visibilities are stored as new DATA columns in an MS which
306  // references the raw MS for the other columns. Except for these special
307  // cases, the use of this function will be rare.
308  MeasurementSet referenceCopy(const String& newTableName,
309  const Block<String>& writableColumns) const;
310 
311  // Converts the MS to make the specified set of subtables memory resident.
312  void
313  setMemoryResidentSubtables (const MrsEligibility & mrsEligibility);
314 
315  // Return the name of each of the subtables. This should be used by the
316  // filler to create the subtables in the correct location.
317  // <group>
318  String antennaTableName() const;
320  String dopplerTableName() const;
321  String feedTableName() const;
322  String fieldTableName() const;
323  String flagCmdTableName() const;
324  String freqOffsetTableName() const;
325  String historyTableName() const;
327  String pointingTableName() const;
329  String processorTableName() const;
330  String sourceTableName() const;
332  String stateTableName() const;
333  String sysCalTableName() const;
334  String weatherTableName() const;
335  // </group>
336 
337  // Access functions for the subtables, using the MS-like interface for each
338  // <group>
342  MSFeed& feed() {return feed_p;}
343  MSField& field() {return field_p;}
351  MSSource& source() {return source_p;}
353  MSState& state() {return state_p;}
354  MSSysCal& sysCal() {return sysCal_p;}
356  const MSAntenna& antenna() const {return antenna_p;}
358  const MSDoppler& doppler() const {return doppler_p;}
359  const MSFeed& feed() const {return feed_p;}
360  const MSField& field() const {return field_p;}
361  const MSFlagCmd& flagCmd() const {return flagCmd_p;}
362  const MSFreqOffset& freqOffset() const {return freqOffset_p;}
363  const MSHistory& history() const {return history_p;}
364  const MSObservation& observation() const {return observation_p;}
365  const MSPointing& pointing() const {return pointing_p;}
366  const MSPolarization& polarization() const {return polarization_p;}
367  const MSProcessor& processor() const {return processor_p;}
368  const MSSource& source() const {return source_p;}
370  const MSState& state() const {return state_p;}
371  const MSSysCal& sysCal() const {return sysCal_p;}
372  const MSWeather& weather() const {return weather_p;}
373  // </group>
374 
376 
377  // Initialize the references to the subtables. You need to call
378  // this only if you assign new subtables to the table keywords.
379  // This also checks for validity of the table and its subtables.
380  // Set clear to True to clear the subtable references (used in assignment)
381  void initRefs(Bool clear=False);
382 
383  // Create default subtables: fills the required subtable keywords with
384  // tables of the correct type, mainly for testing and as an example of
385  // how to do this for specific fillers. In practice these tables will
386  // often have more things specified, like dimensions of arrays and
387  // storage managers for the various columns.
389 #ifdef HAVE_MPI
390  void createDefaultSubtables(MPI_Comm comm, Table::TableOption option=Table::Scratch);
391 #endif // HAVE_MPI
392 
393  // Initialize the statics appropriately. This does not need to be
394  // called by users, it is called by the implementation class
395  // MSTableImpl.
396  static MSTableMaps initMaps();
397 
398  // Create DATA column from existing FLOAT_DATA column. Noop if DATA already
399  // exists or neither exists (returns False in that case).
401 
402  // Validate Measure references - check that all Measure columns have their
403  // reference value set, report the ones that don't.
405 
406  // Flush all the tables and subtables associated with this
407  // MeasurementSet. This function calls the Table::flush() function on the
408  // main table and all the standard subtables including optional
409  // subtables. See the Table class for a description of the sync argument.
410  void flush(Bool sync=False);
411 
412  // Return a record of the indices that the msselection selection selected
413  Record msseltoindex(const String& spw="", const String& field="",
414  const String& baseline="", const String& time="",
415  const String& scan="", const String& uvrange="",
416  const String& observation="", const String& poln="",
417  const String& taql="");
418 
419 protected:
420 
421 
422  // Clears all of the subtable components of this object (i.e., set to
423  // value of subtable's default constructor).
424  void clearSubtables ();
425 
426  // Assigns one subtable to another if the original subtable (otherSubtable)
427  // is not null and is also memory resident
428  void copySubtable (const Table & otherSubtable, Table & subTable);
429 
430  // Copies (assigns) all of the non-null subtables from the other MS into this one.
431  void copySubtables (const MeasurementSet & other);
432 
433  // Returns true if the named subtable is eligible for memory residency.
434  Bool isEligibleForMemoryResidency (const String & subtableName) const;
435 
436  // Opens all of the eligible subtables in memory resident form
437  void openMrSubtables ();
438 
439  // The top level name for MRS related CASARC settings
441  {
442  return "MemoryResidentSubtables";
443  }
444 
445 private:
446 
447  // temporary function to add the CATEGORY keyword to the FLAG_CATEGORY
448  // column if it isn't there yet. 2000/08/22
449  // remove this and the calls next MS update
450  void addCat();
451 
452  // check that the MS is the latest version (2.0)
453  void checkVersion();
454 
455  // Creates subtables using an explicit MPI communicator (if MPI support
456  // is enabled)
457  template<typename T>
458  void createDefaultSubtables_impl(Table::TableOption option, T comm);
459 
460  // Opens a single subtable as memory resident (if permitted).
461  template <typename Subtable>
462  void
463  openMrSubtable (Subtable & subtable, const String & subtableName);
464 
465  // Opens a single subtable if not present in MS object but defined in on-disk MS
466  template <typename Subtable>
467  void
468  openSubtable (Subtable & subtable, const String & subtableName, Bool useLock);
469 
470  // keep references to the subtables
473  MSDoppler doppler_p; //optional
483  MSSource source_p; //optional
486  MSSysCal sysCal_p; //optional
487  MSWeather weather_p; //optional
488 
489  bool doNotLockSubtables_p; // used to prevent subtable locking to allow parallel interprocess sharing
490  int mrsDebugLevel_p; // logging level currently enabled
491  Bool hasBeenDestroyed_p; // required by the need to throw an exception in the destructor
493  Bool memoryResidentSubtables_p; // true if memory resident subtables are enabled
494  MrsEligibility mrsEligibility_p; // subtables which can be made memory resident
495 
496 };
497 
498 
499 } //# NAMESPACE CASACORE - END
500 
501 #endif
casacore::MeasurementSet::isEligibleForMemoryResidency
Bool isEligibleForMemoryResidency(const String &subtableName) const
Returns true if the named subtable is eligible for memory residency.
casacore::MSState
A Table intended to hold a MeasurementSet STATE table.
Definition: MSState.h:79
casacore::MFrequency
A Measure: wave characteristics.
Definition: MFrequency.h:161
casacore::MeasurementSet::pointing_p
MSPointing pointing_p
Definition: MeasurementSet.h:480
casacore::MrsEligibility::allButTheseSubtables
static MrsEligibility allButTheseSubtables(SubtableId ineligibleSubtableId,...)
casacore::MeasurementSet::state
MSState & state()
Definition: MeasurementSet.h:353
casacore::operator+
LatticeExprNode operator+(const LatticeExprNode &expr)
Global functions operating on a LatticeExprNode.
casacore::MeasurementSet::weatherTableName
String weatherTableName() const
casacore::MeasurementSet::polarization
const MSPolarization & polarization() const
Definition: MeasurementSet.h:366
casacore::MeasurementSet::dataDesc_p
MSDataDescription dataDesc_p
Definition: MeasurementSet.h:472
casacore::MeasurementSet::dataDescriptionTableName
String dataDescriptionTableName() const
casacore::MeasurementSet::feed_p
MSFeed feed_p
Definition: MeasurementSet.h:474
casacore::MeasurementSet::copySubtables
void copySubtables(const MeasurementSet &other)
Copies (assigns) all of the non-null subtables from the other MS into this one.
casacore::MEpoch
A Measure: instant in time.
Definition: MEpoch.h:104
casacore::MPosition
A Measure: position on Earth.
Definition: MPosition.h:79
casacore::MSDoppler
A Table intended to hold a MeasurementSet DOPPLER table.
Definition: MSDoppler.h:79
casacore::MeasurementSet::freqOffset
MSFreqOffset & freqOffset()
Definition: MeasurementSet.h:345
casacore::MeasurementSet::freqOffsetTableName
String freqOffsetTableName() const
casacore::MeasurementSet::processor_p
MSProcessor processor_p
Definition: MeasurementSet.h:482
casacore::MrsEligibility::SubtableId
MSMainEnums::PredefinedKeywords SubtableId
Definition: MeasurementSet.h:61
casacore::Table::Scratch
@ Scratch
new table, which gets marked for delete
Definition: Table.h:176
casacore::MSProcessor
A Table intended to hold a MeasurementSet PROCESSOR table.
Definition: MSProcessor.h:77
casacore::MeasurementSet::pointingTableName
String pointingTableName() const
casacore::MeasurementSet::weather_p
MSWeather weather_p
Definition: MeasurementSet.h:487
casacore::MeasurementSet::field
const MSField & field() const
Definition: MeasurementSet.h:360
casacore::MS
MeasurementSet MS
MeasurementSet is too cumbersome for a number of common uses, so we give a typedef here.
Definition: MeasurementSet.h:110
casacore::MrsEligibility
Definition: MeasurementSet.h:57
casacore::MeasurementSet::sysCal
MSSysCal & sysCal()
Definition: MeasurementSet.h:354
casacore::MeasurementSet::observation
const MSObservation & observation() const
Definition: MeasurementSet.h:364
casacore::MeasurementSet::observation_p
MSObservation observation_p
Definition: MeasurementSet.h:479
casacore::MeasurementSet::referenceCopy
MeasurementSet referenceCopy(const String &newTableName, const Block< String > &writableColumns) const
Make a special copy of this MS which references all columns from this MS except those mentioned; thos...
casacore::MeasurementSet::field_p
MSField field_p
Definition: MeasurementSet.h:475
casacore::MeasurementSet::copySubtable
void copySubtable(const Table &otherSubtable, Table &subTable)
Assigns one subtable to another if the original subtable (otherSubtable) is not null and is also memo...
casacore::MeasurementSet::checkVersion
void checkVersion()
check that the MS is the latest version (2.0)
casacore::MSWeather
A Table intended to hold a MeasurementSet WEATHER table.
Definition: MSWeather.h:78
casacore::MeasurementSet::freqOffset
const MSFreqOffset & freqOffset() const
Definition: MeasurementSet.h:362
casacore::MeasurementSet::getMrsEligibility
MrsEligibility getMrsEligibility() const
casacore::MeasurementSet::feedTableName
String feedTableName() const
casacore::MeasurementSet::processorTableName
String processorTableName() const
casacore::MeasurementSet::processor
MSProcessor & processor()
Definition: MeasurementSet.h:350
casacore::MSTable
A Table intended to hold astronomical data
Definition: MSTable.h:146
casacore::MrsEligibility::operator+
friend MrsEligibility operator+(const MrsEligibility &a, SubtableId subtableId)
casacore::MeasurementSet::MeasurementSet
MeasurementSet()
This constructs an empty MeasurementSet, only useful to assign to (it is not a valid MS yet).
casacore::MeasurementSet::doppler
MSDoppler & doppler()
Definition: MeasurementSet.h:341
casacore::MrsEligibility::isEligible
Bool isEligible(SubtableId subtableId) const
Returns true if the specified subtable is in the set of subtables eligible for memory residency.
casacore::MeasurementSet::field
MSField & field()
Definition: MeasurementSet.h:343
casacore::MeasurementSet::spectralWindow
const MSSpectralWindow & spectralWindow() const
Definition: MeasurementSet.h:369
casacore::MeasurementSet::source_p
MSSource source_p
Definition: MeasurementSet.h:483
casacore::MeasurementSet::polarization
MSPolarization & polarization()
Definition: MeasurementSet.h:349
casacore::MeasurementSet::memoryResidentSubtables_p
Bool memoryResidentSubtables_p
Definition: MeasurementSet.h:493
casacore::MSAntenna
A Table intended to hold a MeasurementSet ANTENNA table.
Definition: MSAntenna.h:79
casacore::MSObservation
A Table intended to hold a MeasurementSet OBSERVATION table.
Definition: MSObservation.h:78
casacore::MeasurementSet::freqOffset_p
MSFreqOffset freqOffset_p
Definition: MeasurementSet.h:477
casacore::MeasurementSet::hasBeenDestroyed_p
Bool hasBeenDestroyed_p
Definition: MeasurementSet.h:491
casacore::MSFeed
A Table intended to hold a MeasurementSet FEED table.
Definition: MSFeed.h:78
casacore::MeasurementSet::antenna_p
MSAntenna antenna_p
keep references to the subtables
Definition: MeasurementSet.h:471
casacore::MeasurementSet::validateMeasureRefs
Bool validateMeasureRefs()
Validate Measure references - check that all Measure columns have their reference value set,...
casacore::Table
Main interface class to a read/write table.
Definition: Table.h:153
casacore::MeasurementSet::history
MSHistory & history()
Definition: MeasurementSet.h:346
casacore::MeasurementSet::createDefaultSubtables_impl
void createDefaultSubtables_impl(Table::TableOption option, T comm)
Creates subtables using an explicit MPI communicator (if MPI support is enabled)
casacore::MeasurementSet::setMemoryResidentSubtables
void setMemoryResidentSubtables(const MrsEligibility &mrsEligibility)
Converts the MS to make the specified set of subtables memory resident.
casacore::Table::lockOptions
const TableLock & lockOptions() const
Get the locking options.
Definition: Table.h:1140
casacore::MeasurementSet::spectralWindow
MSSpectralWindow & spectralWindow()
Definition: MeasurementSet.h:352
casacore::MeasurementSet::antenna
const MSAntenna & antenna() const
Definition: MeasurementSet.h:356
casacore::MrsEligibility::operator-
friend MrsEligibility operator-(const MrsEligibility &a, SubtableId subtableId)
Creates a new MrsEligibilitySet by adding or removing the specified subtable or the specified set of ...
casacore::MSSpectralWindow
A Table intended to hold a MeasurementSet SPECTRAL_WINDOW table.
Definition: MSSpectralWindow.h:78
casacore::MeasurementSet::antennaTableName
String antennaTableName() const
Return the name of each of the subtables.
casacore::MeasurementSet::spectralWindow_p
MSSpectralWindow spectralWindow_p
Definition: MeasurementSet.h:484
casacore::False
const Bool False
Definition: aipstype.h:44
casacore::uInt
unsigned int uInt
Definition: aipstype.h:51
casacore::MrsEligibility::defaultEligible
static MrsEligibility defaultEligible()
casacore::MeasurementSet::feed
MSFeed & feed()
Definition: MeasurementSet.h:342
casacore::MeasurementSet::sysCal
const MSSysCal & sysCal() const
Definition: MeasurementSet.h:371
casacore::MeasurementSet::fieldTableName
String fieldTableName() const
casacore::MeasurementSet::~MeasurementSet
virtual ~MeasurementSet()
As with tables, the destructor writes the table if necessary.
casacore::MSTableMaps
A struct holding the maps used in MSTable.
Definition: MSTable.h:51
casacore::Table::Old
@ Old
existing table
Definition: Table.h:170
casacore::MeasurementSet::mrsEligibility_p
MrsEligibility mrsEligibility_p
Definition: MeasurementSet.h:494
casacore::MeasurementSet::getMrsAipsRcBase
static String getMrsAipsRcBase()
The top level name for MRS related CASARC settings.
Definition: MeasurementSet.h:440
casacore::MeasurementSet::observation
MSObservation & observation()
Definition: MeasurementSet.h:347
casacore::MeasurementSet::operator=
MeasurementSet & operator=(const MeasurementSet &)
Assignment operator, reference semantics.
casacore::MeasurementSet::polarizationTableName
String polarizationTableName() const
casacore::MeasurementSet::antenna
MSAntenna & antenna()
Access functions for the subtables, using the MS-like interface for each.
Definition: MeasurementSet.h:339
casacore::SetupNewTable
Create a new table - define shapes, data managers, etc.
Definition: SetupNewTab.h:346
casacore::MeasurementSet::flagCmd_p
MSFlagCmd flagCmd_p
Definition: MeasurementSet.h:476
casacore::MSPointing
A Table intended to hold a MeasurementSet POINTING table.
Definition: MSPointing.h:78
casacore::MDirection
A Measure: astronomical direction.
Definition: MDirection.h:174
casacore::MeasurementSet::dataDescription
const MSDataDescription & dataDescription() const
Definition: MeasurementSet.h:357
casacore::MeasurementSet::dataDescription
MSDataDescription & dataDescription()
Definition: MeasurementSet.h:340
casacore::TableLock
Class to hold table lock options.
Definition: TableLock.h:68
casacore
this file contains all the compiler specific defines
Definition: mainpage.dox:28
casacore::MeasurementSet::polarization_p
MSPolarization polarization_p
Definition: MeasurementSet.h:481
casacore::MeasurementSet::history_p
MSHistory history_p
Definition: MeasurementSet.h:478
casacore::MeasurementSet::flagCmdTableName
String flagCmdTableName() const
casacore::MeasurementSet::sysCal_p
MSSysCal sysCal_p
Definition: MeasurementSet.h:486
casacore::MeasurementSet::sysCalTableName
String sysCalTableName() const
casacore::MeasurementSet::initMaps
static MSTableMaps initMaps()
Initialize the statics appropriately.
casacore::MeasurementSet::source
MSSource & source()
Definition: MeasurementSet.h:351
casacore::MeasurementSet::doNotLockSubtables_p
bool doNotLockSubtables_p
Definition: MeasurementSet.h:489
casacore::MeasurementSet::dopplerTableName
String dopplerTableName() const
casacore::time
TableExprNode time(const TableExprNode &node)
Definition: ExprNode.h:1537
casacore::MeasurementSet::initRefs
void initRefs(Bool clear=False)
Initialize the references to the subtables.
casacore::MrsEligibility::Eligible
std::set< MSMainEnums::PredefinedKeywords > Eligible
Definition: MeasurementSet.h:83
casacore::MSFreqOffset
A Table intended to hold a MeasurementSet FREQ_OFFSET table.
Definition: MSFreqOffset.h:78
casacore::MeasurementSet::sourceTableName
String sourceTableName() const
casacore::MeasurementSet::flagCmd
const MSFlagCmd & flagCmd() const
Definition: MeasurementSet.h:361
casacore::MrsEligibility::allSubtables_p
static const MrsEligibility allSubtables_p
Definition: MeasurementSet.h:87
casacore::MeasurementSet::weather
const MSWeather & weather() const
Definition: MeasurementSet.h:372
casacore::MeasurementSet::doppler_p
MSDoppler doppler_p
Definition: MeasurementSet.h:473
casacore::MeasurementSet::createDefaultSubtables
void createDefaultSubtables(Table::TableOption option=Table::Scratch)
Create default subtables: fills the required subtable keywords with tables of the correct type,...
casacore::MrsEligibility::allEligible
static MrsEligibility allEligible()
Factory methods to create MrsEligibility sets.
casacore::MeasurementSet::openSubtable
void openSubtable(Subtable &subtable, const String &subtableName, Bool useLock)
Opens a single subtable if not present in MS object but defined in on-disk MS.
casacore::MeasurementSet
A Table intended to hold astronomical data (a set of Measurements).
Definition: MeasurementSet.h:241
casacore::MSField
A Table intended to hold a MeasurementSet FIELD table.
Definition: MSField.h:78
casacore::MeasurementSet::doppler
const MSDoppler & doppler() const
Definition: MeasurementSet.h:358
casacore::MeasurementSet::stateTableName
String stateTableName() const
casacore::MeasurementSet::pointing
const MSPointing & pointing() const
Definition: MeasurementSet.h:365
casacore::MeasurementSet::spectralWindowTableName
String spectralWindowTableName() const
casacore::MeasurementSet::state
const MSState & state() const
Definition: MeasurementSet.h:370
casacore::MeasurementSet::source
const MSSource & source() const
Definition: MeasurementSet.h:368
casacore::MeasurementSet::flagCmd
MSFlagCmd & flagCmd()
Definition: MeasurementSet.h:344
casacore::String
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::MeasurementSet::feed
const MSFeed & feed() const
Definition: MeasurementSet.h:359
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Block
simple 1-D array
Definition: ArrayIO.h:47
casacore::MeasurementSet::processor
const MSProcessor & processor() const
Definition: MeasurementSet.h:367
casacore::MeasurementSet::weather
MSWeather & weather()
Definition: MeasurementSet.h:355
casacore::MeasurementSet::historyTableName
String historyTableName() const
casacore::MeasurementSet::mrsDebugLevel_p
int mrsDebugLevel_p
Definition: MeasurementSet.h:490
casacore::MSDataDescription
A Table intended to hold a MeasurementSet DATADESCRIPTION table.
Definition: MSDataDescription.h:79
casacore::MeasurementSet::openMrSubtable
void openMrSubtable(Subtable &subtable, const String &subtableName)
Opens a single subtable as memory resident (if permitted).
casacore::Record
A hierarchical collection of named fields of various types.
Definition: Record.h:180
casacore::MrsEligibility::isSubtable
static Bool isSubtable(SubtableId subtableId)
casacore::MSHistory
A Table intended to hold a MeasurementSet OBSERVATIONLOG table.
Definition: MSHistory.h:78
casacore::MeasurementSet::state_p
MSState state_p
Definition: MeasurementSet.h:485
casacore::MeasurementSet::makeComplexData
Bool makeComplexData()
Create DATA column from existing FLOAT_DATA column.
casacore::MeasurementSet::clearSubtables
void clearSubtables()
Clears all of the subtable components of this object (i.e., set to value of subtable's default constr...
casacore::MSSysCal
A Table intended to hold a MeasurementSet SYSCAL table.
Definition: MSSysCal.h:78
casacore::MSFlagCmd
A Table intended to hold a MeasurementSet FLAG_CMD table.
Definition: MSFlagCmd.h:78
casacore::MeasurementSet::mainLock_p
TableLock mainLock_p
Definition: MeasurementSet.h:492
casacore::MrsEligibility::noneEligible
static MrsEligibility noneEligible()
casacore::MSPolarization
A Table intended to hold a MeasurementSet POLARIZATION table.
Definition: MSPolarization.h:78
casacore::MeasurementSet::pointing
MSPointing & pointing()
Definition: MeasurementSet.h:348
casacore::Table::TableOption
TableOption
Define the possible options how a table can be opened.
Definition: Table.h:168
casacore::operator-
LatticeExprNode operator-(const LatticeExprNode &expr)
casacore::MeasurementSet::openMrSubtables
void openMrSubtables()
Opens all of the eligible subtables in memory resident form.
casacore::Table::tableName
const String & tableName() const
Get the table name.
Definition: Table.h:1219
casacore::MeasurementSet::observationTableName
String observationTableName() const
casacore::MeasurementSet::history
const MSHistory & history() const
Definition: MeasurementSet.h:363
casacore::MeasurementSet::msseltoindex
Record msseltoindex(const String &spw="", const String &field="", const String &baseline="", const String &time="", const String &scan="", const String &uvrange="", const String &observation="", const String &poln="", const String &taql="")
Return a record of the indices that the msselection selection selected.
casacore::MrsEligibility::eligibleSubtables
static MrsEligibility eligibleSubtables(SubtableId subtableId,...)
casacore::MSMainEnums::PredefinedKeywords
PredefinedKeywords
Keywords with a predefined meaning.
Definition: MSMainEnums.h:252
casacore::MeasurementSet::flush
void flush(Bool sync=False)
Flush all the tables and subtables associated with this MeasurementSet.
casacore::MSMainEnums
Enums for the MeasurementSet main table.
Definition: MSMainEnums.h:62
casacore::MeasurementSet::addCat
void addCat()
temporary function to add the CATEGORY keyword to the FLAG_CATEGORY column if it isn't there yet.
casacore::MSSource
A Table intended to hold a MeasurementSet SOURCE table.
Definition: MSSource.h:77
casacore::MrsEligibility::eligible_p
Eligible eligible_p
Definition: MeasurementSet.h:85