casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
casacore::MSConcat Class Reference

A class with functions for concatenating MeasurementSets. More...

#include <MSConcat.h>

Inheritance diagram for casacore::MSConcat:
casacore::MSColumns casacore::MSMainColumns casacore::ROMSMainColumns

Public Member Functions

 MSConcat (MeasurementSet &ms)
 
void virtualconcat (MeasurementSet &otherMS, const Bool checkShapeAndCateg=True, const String &obsidAndScanTableName="")
 
void concatenate (const MeasurementSet &otherMS, const uInt handling=0, const String &destMSName="")
 
void setTolerance (Quantum< Double > &freqTol, Quantum< Double > &dirTol)
 
void setWeightScale (const Float weightScale)
 
void setRespectForFieldName (const Bool respectFieldName)
 
- Public Member Functions inherited from casacore::MSColumns
 MSColumns (MeasurementSet &ms)
 Create a columns object that accesses the data in the specified MS. More...
 
 ~MSColumns ()
 The destructor does nothing special. More...
 
MSAntennaColumnsantenna ()
 Read-write access to required subtables. More...
 
MSDataDescColumnsdataDescription ()
 
MSFeedColumnsfeed ()
 
MSFieldColumnsfield ()
 
MSFlagCmdColumnsflagCmd ()
 
MSHistoryColumnshistory ()
 
MSObservationColumnsobservation ()
 
MSPointingColumnspointing ()
 
MSPolarizationColumnspolarization ()
 
MSProcessorColumnsprocessor ()
 
MSSpWindowColumnsspectralWindow ()
 
MSStateColumnsstate ()
 
MSDopplerColumnsdoppler ()
 Read-write access to optional subtables. More...
 
MSFreqOffsetColumnsfreqOffset ()
 
MSSourceColumnssource ()
 
MSSysCalColumnssysCal ()
 
MSWeatherColumnsweather ()
 
const ROMSAntennaColumnsantenna () const
 Read-only access to required subtables. More...
 
const ROMSDataDescColumnsdataDescription () const
 
const ROMSFeedColumnsfeed () const
 
const ROMSFieldColumnsfield () const
 
const ROMSFlagCmdColumnsflagCmd () const
 
const ROMSHistoryColumnshistory () const
 
const ROMSObservationColumnsobservation () const
 
const ROMSPointingColumnspointing () const
 
const ROMSPolarizationColumnspolarization () const
 
const ROMSProcessorColumnsprocessor () const
 
const ROMSSourceColumnssource () const
 
const ROMSSpWindowColumnsspectralWindow () const
 
const ROMSStateColumnsstate () const
 
const ROMSDopplerColumnsdoppler () const
 Read-only access to optional subtables. More...
 
const ROMSFreqOffsetColumnsfreqOffset () const
 
const ROMSSysCalColumnssysCal () const
 
const ROMSWeatherColumnsweather () const
 
void setEpochRef (MEpoch::Types ref, Bool tableMustBeEmpty=True)
 set the EPOCH reference type in all EPOCH columns in the MS. More...
 
void setDirectionRef (MDirection::Types ref)
 set the DIRECTION reference type for FIELD, POINTING and SOURCE tables (except for antenna frame directions). More...
 
- Public Member Functions inherited from casacore::MSMainColumns
 MSMainColumns (MeasurementSet &ms)
 Create a columns object that accesses the data in the specified Table. More...
 
 ~MSMainColumns ()
 The desctructor does nothing special. More...
 
ScalarColumn< Int > & antenna1 ()
 Read-write access to required columns. More...
 
ScalarColumn< Int > & antenna2 ()
 
ScalarColumn< Int > & arrayId ()
 
ScalarColumn< Int > & dataDescId ()
 
ScalarColumn< Double > & exposure ()
 
ScalarQuantColumn< Double > & exposureQuant ()
 
ScalarColumn< Int > & feed1 ()
 
ScalarColumn< Int > & feed2 ()
 
ScalarColumn< Int > & fieldId ()
 
ArrayColumn< Bool > & flag ()
 
ArrayColumn< Bool > & flagCategory ()
 
ScalarColumn< Bool > & flagRow ()
 
ScalarColumn< Double > & interval ()
 
ScalarQuantColumn< Double > & intervalQuant ()
 
ScalarColumn< Int > & observationId ()
 
ScalarColumn< Int > & processorId ()
 
ScalarColumn< Int > & scanNumber ()
 
ArrayColumn< Float > & sigma ()
 
ScalarColumn< Int > & stateId ()
 
ScalarColumn< Double > & time ()
 
ScalarQuantColumn< Double > & timeQuant ()
 
ScalarMeasColumn< MEpoch > & timeMeas ()
 
ScalarColumn< Double > & timeCentroid ()
 
ScalarQuantColumn< Double > & timeCentroidQuant ()
 
ScalarMeasColumn< MEpoch > & timeCentroidMeas ()
 
ArrayColumn< Double > & uvw ()
 
ArrayQuantColumn< Double > & uvwQuant ()
 
ScalarMeasColumn< Muvw > & uvwMeas ()
 
ArrayColumn< Float > & weight ()
 
ScalarColumn< Int > & antenna3 ()
 Read-write access to optional columns. More...
 
ScalarColumn< Bool > & baselineRef ()
 
ArrayColumn< Complex > & correctedData ()
 
ArrayColumn< Complex > & data ()
 
ScalarColumn< Int > & feed3 ()
 
ArrayColumn< Float > & floatData ()
 
ArrayColumn< Float > & imagingWeight ()
 
ArrayColumn< Complex > & lagData ()
 
ArrayColumn< Complex > & modelData ()
 
ScalarColumn< Int > & phaseId ()
 
ScalarColumn< Int > & pulsarBin ()
 
ScalarColumn< Int > & pulsarGateId ()
 
ArrayColumn< Float > & sigmaSpectrum ()
 
ScalarColumn< Double > & timeExtraPrec ()
 
ScalarQuantColumn< Double > & timeExtraPrecQuant ()
 
ArrayColumn< Double > & uvw2 ()
 
ScalarMeasColumn< Muvw > & uvw2Meas ()
 
ArrayQuantColumn< Double > & uvw2Quant ()
 
ArrayColumn< Complex > & videoPoint ()
 
ArrayColumn< Float > & weightSpectrum ()
 
ArrayColumn< Float > & weightSpectrumCorrected ()
 
const ROScalarColumn< Int > & antenna1 () const
 Read-only access to required columns. More...
 
const ROScalarColumn< Int > & antenna2 () const
 
const ROScalarColumn< Int > & arrayId () const
 
const ROScalarColumn< Int > & dataDescId () const
 
const ROScalarColumn< Double > & exposure () const
 
const ROScalarQuantColumn
< Double > & 
exposureQuant () const
 
const ROScalarColumn< Int > & feed1 () const
 
const ROScalarColumn< Int > & feed2 () const
 
const ROScalarColumn< Int > & fieldId () const
 
const ROArrayColumn< Bool > & flag () const
 
const ROArrayColumn< Bool > & flagCategory () const
 
const ROScalarColumn< Bool > & flagRow () const
 
const ROScalarColumn< Double > & interval () const
 
const ROScalarQuantColumn
< Double > & 
intervalQuant () const
 
const ROScalarColumn< Int > & observationId () const
 
const ROScalarColumn< Int > & processorId () const
 
const ROScalarColumn< Int > & scanNumber () const
 
const ROArrayColumn< Float > & sigma () const
 
const ROScalarColumn< Int > & stateId () const
 
const ROScalarColumn< Double > & time () const
 
const ROScalarQuantColumn
< Double > & 
timeQuant () const
 
const ROScalarMeasColumn
< MEpoch > & 
timeMeas () const
 
const ROScalarColumn< Double > & timeCentroid () const
 
const ROScalarQuantColumn
< Double > & 
timeCentroidQuant () const
 
const ROScalarMeasColumn
< MEpoch > & 
timeCentroidMeas () const
 
const ROArrayColumn< Double > & uvw () const
 
const ROArrayQuantColumn
< Double > & 
uvwQuant () const
 
const ROScalarMeasColumn< Muvw > & uvwMeas () const
 
const ROArrayColumn< Float > & weight () const
 
const ROScalarColumn< Int > & antenna3 () const
 Read-only access to optional columns. More...
 
const ROScalarColumn< Bool > & baselineRef () const
 
const ROArrayColumn< Complex > & correctedData () const
 
const ROArrayColumn< Complex > & data () const
 
const ROScalarColumn< Int > & feed3 () const
 
const ROArrayColumn< Float > & floatData () const
 
const ROArrayColumn< Float > & imagingWeight () const
 
const ROArrayColumn< Complex > & lagData () const
 
const ROArrayColumn< Complex > & modelData () const
 
const ROScalarColumn< Int > & phaseId () const
 
const ROScalarColumn< Int > & pulsarBin () const
 
const ROScalarColumn< Int > & pulsarGateId () const
 
const ROArrayColumn< Float > & sigmaSpectrum () const
 
const ROScalarColumn< Double > & timeExtraPrec () const
 
const ROScalarQuantColumn
< Double > & 
timeExtraPrecQuant () const
 
const ROArrayColumn< Double > & uvw2 () const
 
const ROScalarMeasColumn< Muvw > & uvw2Meas () const
 
const ROArrayQuantColumn
< Double > & 
uvw2Quant () const
 
const ROArrayColumn< Complex > & videoPoint () const
 
const ROArrayColumn< Float > & weightSpectrum () const
 
const ROArrayColumn< Float > & weightSpectrumCorrected () const
 
void setEpochRef (MEpoch::Types ref, Bool tableMustBeEmpty=True)
 set the epoch type for the TIME and TIME_CENTROID columns. More...
 
void setUVWRef (Muvw::Types ref)
 set the UVW reference type for the UVW and UVW2 (if defined) columns. More...
 
void setFlagCategories (const Vector< String > &categories)
 Set the flag category labels to the supplied values (in the CATEGORY keyword of the FLAG_CATEGORY column). More...
 
- Public Member Functions inherited from casacore::ROMSMainColumns
 ROMSMainColumns (const MeasurementSet &ms)
 Create a columns object that accesses the data in the specified Table. More...
 
 ~ROMSMainColumns ()
 The desctructor does nothing special. More...
 
const ROScalarColumn< Int > & antenna1 () const
 Access to required columns. More...
 
const ROScalarColumn< Int > & antenna2 () const
 
const ROScalarColumn< Int > & arrayId () const
 
const ROScalarColumn< Int > & dataDescId () const
 
const ROScalarColumn< Double > & exposure () const
 
const ROScalarQuantColumn
< Double > & 
exposureQuant () const
 
const ROScalarColumn< Int > & feed1 () const
 
const ROScalarColumn< Int > & feed2 () const
 
const ROScalarColumn< Int > & fieldId () const
 
const ROArrayColumn< Bool > & flag () const
 
const ROArrayColumn< Bool > & flagCategory () const
 
const ROScalarColumn< Bool > & flagRow () const
 
const ROScalarColumn< Double > & interval () const
 
const ROScalarQuantColumn
< Double > & 
intervalQuant () const
 
const ROScalarColumn< Int > & observationId () const
 
const ROScalarColumn< Int > & processorId () const
 
const ROScalarColumn< Int > & scanNumber () const
 
const ROArrayColumn< Float > & sigma () const
 
const ROScalarColumn< Int > & stateId () const
 
const ROScalarColumn< Double > & time () const
 
const ROScalarQuantColumn
< Double > & 
timeQuant () const
 
const ROScalarMeasColumn
< MEpoch > & 
timeMeas () const
 
const ROScalarColumn< Double > & timeCentroid () const
 
const ROScalarQuantColumn
< Double > & 
timeCentroidQuant () const
 
const ROScalarMeasColumn
< MEpoch > & 
timeCentroidMeas () const
 
const ROArrayColumn< Double > & uvw () const
 
const ROArrayQuantColumn
< Double > & 
uvwQuant () const
 
const ROScalarMeasColumn< Muvw > & uvwMeas () const
 
const ROArrayColumn< Float > & weight () const
 
const ROScalarColumn< Int > & antenna3 () const
 Access to optional columns. More...
 
const ROScalarColumn< Bool > & baselineRef () const
 
const ROArrayColumn< Complex > & correctedData () const
 
const ROArrayColumn< Complex > & data () const
 
const ROScalarColumn< Int > & feed3 () const
 
const ROArrayColumn< Float > & floatData () const
 
const ROArrayColumn< Float > & imagingWeight () const
 
const ROArrayColumn< Complex > & lagData () const
 
const ROArrayColumn< Complex > & modelData () const
 
const ROScalarColumn< Int > & phaseId () const
 
const ROScalarColumn< Int > & pulsarBin () const
 
const ROScalarColumn< Int > & pulsarGateId () const
 
const ROArrayColumn< Float > & sigmaSpectrum () const
 
const ROScalarColumn< Double > & timeExtraPrec () const
 
const ROScalarQuantColumn
< Double > & 
timeExtraPrecQuant () const
 
const ROArrayColumn< Double > & uvw2 () const
 
const ROScalarMeasColumn< Muvw > & uvw2Meas () const
 
const ROArrayQuantColumn
< Double > & 
uvw2Quant () const
 
const ROArrayColumn< Complex > & videoPoint () const
 
const ROArrayColumn< Float > & weightSpectrum () const
 
const ROArrayColumn< Float > & weightSpectrumCorrected () const
 
uInt nrow () const
 Convenience function that returns the number of rows in any of the columns. More...
 
Vector< StringflagCategories () const
 Returns the category labels for the FLAG_CATEGORY column. More...
 

Private Member Functions

 MSConcat ()
 
void checkShape (const IPosition &otherShape) const
 
void checkCategories (const ROMSMainColumns &otherCols) const
 
Bool checkEphIdInField (const ROMSFieldColumns &otherFldCol) const
 
Bool copyPointing (const MSPointing &otherPoint, const Block< uInt > &newAntIndices)
 
Bool copyPointingB (MSPointing &otherPoint, const Block< uInt > &newAntIndices)
 
Bool copySysCal (const MSSysCal &otherSysCal, const Block< uInt > &newAndIndices)
 
Bool copyWeather (const MSWeather &otherWeather, const Block< uInt > &newAndIndices)
 
Int copyObservation (const MSObservation &otherObs, const Bool remRedunObsId=True)
 
Block< uIntcopyAntennaAndFeed (const MSAntenna &otherAnt, const MSFeed &otherFeed)
 
Block< uIntcopyState (const MSState &otherState)
 
Block< uIntcopyField (const MeasurementSet &otherms)
 
Block< uIntcopySpwAndPol (const MSSpectralWindow &otherSpw, const MSPolarization &otherPol, const MSDataDescription &otherDD)
 
Bool copySource (const MeasurementSet &otherms)
 
Bool updateSource ()
 
Bool updateSource2 ()
 
Bool sourceRowsEquivalent (const MSSourceColumns &sourceCol, const uInt &rowi, const uInt &rowj, const Bool dontTestDirection=False, const Bool dontTestTransAndRest=False)
 
Bool obsRowsEquivalent (const MSObservationColumns &obsCol, const uInt &rowi, const uInt &rowj)
 
void updateModelDataKeywords (MeasurementSet &ms)
 

Static Private Member Functions

static IPosition isFixedShape (const TableDesc &td)
 
static IPosition getShape (const ROMSDataDescColumns &ddCols, const ROMSSpWindowColumns &spwCols, const ROMSPolarizationColumns &polCols, uInt whichShape)
 

Private Attributes

MeasurementSet itsMS
 
IPosition itsFixedShape
 
Quantum< DoubleitsFreqTol
 
Quantum< DoubleitsDirTol
 
Float itsWeightScale
 
Bool itsRespectForFieldName
 
Vector< BoolitsChanReversed
 
std::map< Int, IntnewSourceIndex_p
 
std::map< Int, IntnewSourceIndex2_p
 
std::map< Int, IntnewSPWIndex_p
 
std::map< Int, IntnewObsIndexA_p
 
std::map< Int, IntnewObsIndexB_p
 
std::map< Int, IntotherObsIdsWithCounterpart_p
 
std::map< Int, IntsolSystObjects_p
 
Bool doSource_p
 
Bool doSource2_p
 
Bool doSPW_p
 
Bool doObsA_p
 
Bool doObsB_p
 

Additional Inherited Members

- Protected Member Functions inherited from casacore::MSMainColumns
 MSMainColumns ()
 
void attach (MeasurementSet &ms)
 
- Protected Member Functions inherited from casacore::ROMSMainColumns
 ROMSMainColumns ()
 
void attach (const MeasurementSet &ms)
 

Detailed Description

A class with functions for concatenating MeasurementSets.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

Synopsis

Example

Motivation

Definition at line 77 of file MSConcat.h.

Constructor & Destructor Documentation

casacore::MSConcat::MSConcat ( MeasurementSet ms)
casacore::MSConcat::MSConcat ( )
private

Member Function Documentation

void casacore::MSConcat::checkCategories ( const ROMSMainColumns otherCols) const
private
Bool casacore::MSConcat::checkEphIdInField ( const ROMSFieldColumns otherFldCol) const
private
void casacore::MSConcat::checkShape ( const IPosition otherShape) const
private
void casacore::MSConcat::concatenate ( const MeasurementSet otherMS,
const uInt  handling = 0,
const String destMSName = "" 
)
Block<uInt> casacore::MSConcat::copyAntennaAndFeed ( const MSAntenna otherAnt,
const MSFeed otherFeed 
)
private
Block<uInt> casacore::MSConcat::copyField ( const MeasurementSet otherms)
private
Int casacore::MSConcat::copyObservation ( const MSObservation otherObs,
const Bool  remRedunObsId = True 
)
private
Bool casacore::MSConcat::copyPointing ( const MSPointing otherPoint,
const Block< uInt > &  newAntIndices 
)
private
Bool casacore::MSConcat::copyPointingB ( MSPointing otherPoint,
const Block< uInt > &  newAntIndices 
)
private
Bool casacore::MSConcat::copySource ( const MeasurementSet otherms)
private
Block<uInt> casacore::MSConcat::copySpwAndPol ( const MSSpectralWindow otherSpw,
const MSPolarization otherPol,
const MSDataDescription otherDD 
)
private
Block<uInt> casacore::MSConcat::copyState ( const MSState otherState)
private
Bool casacore::MSConcat::copySysCal ( const MSSysCal otherSysCal,
const Block< uInt > &  newAndIndices 
)
private
Bool casacore::MSConcat::copyWeather ( const MSWeather otherWeather,
const Block< uInt > &  newAndIndices 
)
private
static IPosition casacore::MSConcat::getShape ( const ROMSDataDescColumns ddCols,
const ROMSSpWindowColumns spwCols,
const ROMSPolarizationColumns polCols,
uInt  whichShape 
)
staticprivate
static IPosition casacore::MSConcat::isFixedShape ( const TableDesc td)
staticprivate
Bool casacore::MSConcat::obsRowsEquivalent ( const MSObservationColumns obsCol,
const uInt rowi,
const uInt rowj 
)
private
void casacore::MSConcat::setRespectForFieldName ( const Bool  respectFieldName)
void casacore::MSConcat::setTolerance ( Quantum< Double > &  freqTol,
Quantum< Double > &  dirTol 
)
void casacore::MSConcat::setWeightScale ( const Float  weightScale)
Bool casacore::MSConcat::sourceRowsEquivalent ( const MSSourceColumns sourceCol,
const uInt rowi,
const uInt rowj,
const Bool  dontTestDirection = False,
const Bool  dontTestTransAndRest = False 
)
private
void casacore::MSConcat::updateModelDataKeywords ( MeasurementSet ms)
private
Bool casacore::MSConcat::updateSource ( )
private
Bool casacore::MSConcat::updateSource2 ( )
private
void casacore::MSConcat::virtualconcat ( MeasurementSet otherMS,
const Bool  checkShapeAndCateg = True,
const String obsidAndScanTableName = "" 
)

Member Data Documentation

Bool casacore::MSConcat::doObsA_p
private

Definition at line 153 of file MSConcat.h.

Bool casacore::MSConcat::doObsB_p
private

Definition at line 154 of file MSConcat.h.

Bool casacore::MSConcat::doSource2_p
private

Definition at line 151 of file MSConcat.h.

Bool casacore::MSConcat::doSource_p
private

Definition at line 150 of file MSConcat.h.

Bool casacore::MSConcat::doSPW_p
private

Definition at line 152 of file MSConcat.h.

Vector<Bool> casacore::MSConcat::itsChanReversed
private

Definition at line 141 of file MSConcat.h.

Quantum<Double> casacore::MSConcat::itsDirTol
private

Definition at line 138 of file MSConcat.h.

IPosition casacore::MSConcat::itsFixedShape
private

Definition at line 136 of file MSConcat.h.

Quantum<Double> casacore::MSConcat::itsFreqTol
private

Definition at line 137 of file MSConcat.h.

MeasurementSet casacore::MSConcat::itsMS
private

Definition at line 135 of file MSConcat.h.

Bool casacore::MSConcat::itsRespectForFieldName
private

Definition at line 140 of file MSConcat.h.

Float casacore::MSConcat::itsWeightScale
private

Definition at line 139 of file MSConcat.h.

std::map<Int, Int> casacore::MSConcat::newObsIndexA_p
private

Definition at line 145 of file MSConcat.h.

std::map<Int, Int> casacore::MSConcat::newObsIndexB_p
private

Definition at line 146 of file MSConcat.h.

std::map<Int, Int> casacore::MSConcat::newSourceIndex2_p
private

Definition at line 143 of file MSConcat.h.

std::map<Int, Int> casacore::MSConcat::newSourceIndex_p
private

Definition at line 142 of file MSConcat.h.

std::map<Int, Int> casacore::MSConcat::newSPWIndex_p
private

Definition at line 144 of file MSConcat.h.

std::map<Int, Int> casacore::MSConcat::otherObsIdsWithCounterpart_p
private

Definition at line 147 of file MSConcat.h.

std::map<Int, Int> casacore::MSConcat::solSystObjects_p
private

Definition at line 148 of file MSConcat.h.


The documentation for this class was generated from the following file: