Go to the documentation of this file.
29 #ifndef MS_MEASUREMENTSET_H
30 #define MS_MEASUREMENTSET_H
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>
83 typedef std::set<MSMainEnums::PredefinedKeywords>
Eligible;
102 template <
class T>
class Block;
442 return "MemoryResidentSubtables";
461 template <
typename Subtable>
466 template <
typename Subtable>
Bool isEligibleForMemoryResidency(const String &subtableName) const
Returns true if the named subtable is eligible for memory residency.
MeasurementSet(const MeasurementSet &other)
static MrsEligibility allButTheseSubtables(SubtableId ineligibleSubtableId,...)
LatticeExprNode operator+(const LatticeExprNode &expr)
Global functions operating on a LatticeExprNode.
String weatherTableName() const
const MSPolarization & polarization() const
MSDataDescription dataDesc_p
String dataDescriptionTableName() const
void copySubtables(const MeasurementSet &other)
Copies (assigns) all of the non-null subtables from the other MS into this one.
MSFreqOffset & freqOffset()
String freqOffsetTableName() const
MeasurementSet(const String &tableName, const String &tableDescName, TableOption=Table::Old)
Allows keeping subtables unlocked/read-locked independent of lock mode of main table.
MSMainEnums::PredefinedKeywords SubtableId
@ Scratch
new table, which gets marked for delete
String pointingTableName() const
MeasurementSet(const String &tableName, const TableLock &lockOptions, TableOption=Table::Old)
void createDefaultSubtables(MPI_Comm comm, Table::TableOption option=Table::Scratch)
const MSField & field() const
MeasurementSet MS
MeasurementSet is too cumbersome for a number of common uses, so we give a typedef here.
const MSObservation & observation() const
MeasurementSet(SetupNewTable &newTab, uInt nrrow=0, Bool initialize=False)
MSObservation observation_p
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...
void copySubtable(const Table &otherSubtable, Table &subTable)
Assigns one subtable to another if the original subtable (otherSubtable) is not null and is also memo...
void checkVersion()
check that the MS is the latest version (2.0)
const MSFreqOffset & freqOffset() const
MrsEligibility getMrsEligibility() const
String feedTableName() const
MeasurementSet(MPI_Comm comm, SetupNewTable &newTab, const TableLock &lockOptions, uInt nrrow=0, Bool initialize=False)
String processorTableName() const
MSProcessor & processor()
A Table intended to hold astronomical data
friend MrsEligibility operator+(const MrsEligibility &a, SubtableId subtableId)
MeasurementSet()
This constructs an empty MeasurementSet, only useful to assign to (it is not a valid MS yet).
MeasurementSet(SetupNewTable &newTab, const TableLock &lockOptions, uInt nrrow=0, Bool initialize=False)
Bool isEligible(SubtableId subtableId) const
Returns true if the specified subtable is in the set of subtables eligible for memory residency.
const MSSpectralWindow & spectralWindow() const
MSPolarization & polarization()
Bool memoryResidentSubtables_p
MSFreqOffset freqOffset_p
MSAntenna antenna_p
keep references to the subtables
Bool validateMeasureRefs()
Validate Measure references - check that all Measure columns have their reference value set,...
void createDefaultSubtables_impl(Table::TableOption option, T comm)
Creates subtables using an explicit MPI communicator (if MPI support is enabled)
void setMemoryResidentSubtables(const MrsEligibility &mrsEligibility)
Converts the MS to make the specified set of subtables memory resident.
const TableLock & lockOptions() const
Get the locking options.
MSSpectralWindow & spectralWindow()
const MSAntenna & antenna() const
friend MrsEligibility operator-(const MrsEligibility &a, SubtableId subtableId)
Creates a new MrsEligibilitySet by adding or removing the specified subtable or the specified set of ...
String antennaTableName() const
Return the name of each of the subtables.
MSSpectralWindow spectralWindow_p
static MrsEligibility defaultEligible()
const MSSysCal & sysCal() const
String fieldTableName() const
virtual ~MeasurementSet()
As with tables, the destructor writes the table if necessary.
MrsEligibility mrsEligibility_p
static String getMrsAipsRcBase()
The top level name for MRS related CASARC settings.
MSObservation & observation()
MeasurementSet & operator=(const MeasurementSet &)
Assignment operator, reference semantics.
String polarizationTableName() const
MSAntenna & antenna()
Access functions for the subtables, using the MS-like interface for each.
Create a new table - define shapes, data managers, etc.
MeasurementSet(const String &tableName, const String &tableDescName, const TableLock &lockOptions, TableOption=Table::Old)
const MSDataDescription & dataDescription() const
MSDataDescription & dataDescription()
this file contains all the compiler specific defines
MSPolarization polarization_p
String flagCmdTableName() const
String sysCalTableName() const
static MSTableMaps initMaps()
Initialize the statics appropriately.
bool doNotLockSubtables_p
String dopplerTableName() const
TableExprNode time(const TableExprNode &node)
MeasurementSet(MPI_Comm comm, SetupNewTable &newTab, uInt nrrow=0, Bool initialize=False)
void initRefs(Bool clear=False)
Initialize the references to the subtables.
std::set< MSMainEnums::PredefinedKeywords > Eligible
String sourceTableName() const
const MSFlagCmd & flagCmd() const
static const MrsEligibility allSubtables_p
const MSWeather & weather() const
void createDefaultSubtables(Table::TableOption option=Table::Scratch)
Create default subtables: fills the required subtable keywords with tables of the correct type,...
static MrsEligibility allEligible()
Factory methods to create MrsEligibility sets.
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.
const MSDoppler & doppler() const
String stateTableName() const
MeasurementSet(const Table &table, const MeasurementSet *otherMs=NULL)
const MSPointing & pointing() const
String spectralWindowTableName() const
const MSState & state() const
const MSSource & source() const
String: the storage and methods of handling collections of characters.
const MSFeed & feed() const
bool Bool
Define the standard types used by Casacore.
const MSProcessor & processor() const
String historyTableName() const
void openMrSubtable(Subtable &subtable, const String &subtableName)
Opens a single subtable as memory resident (if permitted).
static Bool isSubtable(SubtableId subtableId)
Bool makeComplexData()
Create DATA column from existing FLOAT_DATA column.
void clearSubtables()
Clears all of the subtable components of this object (i.e., set to value of subtable's default constr...
MeasurementSet(const String &tableName, const TableLock &lockOptions, bool doNotLockSubtables, TableOption=Table::Old)
static MrsEligibility noneEligible()
TableOption
Define the possible options how a table can be opened.
LatticeExprNode operator-(const LatticeExprNode &expr)
void openMrSubtables()
Opens all of the eligible subtables in memory resident form.
const String & tableName() const
Get the table name.
String observationTableName() const
const MSHistory & history() const
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.
static MrsEligibility eligibleSubtables(SubtableId subtableId,...)
PredefinedKeywords
Keywords with a predefined meaning.
void flush(Bool sync=False)
Flush all the tables and subtables associated with this MeasurementSet.
Enums for the MeasurementSet main table.
void addCat()
temporary function to add the CATEGORY keyword to the FLAG_CATEGORY column if it isn't there yet.
MeasurementSet(const String &tableName, TableOption=Table::Old)
These constructors mirror the Table ones with additional checking on validity (verifying that the MS ...