casa
5.7.0-16
|
An iterator class for MeasurementSets. More...
#include <MSIter2.h>
Public Member Functions | |
MSIter2 () | |
Default constructor - useful only to assign another iterator later. More... | |
MSIter2 (const casacore::MeasurementSet &ms, const casacore::Block< int > &sortColumns, double timeInterval=0, bool addDefaultSortColumns=true, bool storeSorted=true) | |
MSIter2 (const casacore::Block< casacore::MeasurementSet > &mss, const casacore::Block< int > &sortColumns, double timeInterval=0, bool addDefaultSortColumns=true, bool storeSorted=true) | |
Same as above with multiple MSs as input. More... | |
MSIter2 (const MSIter2 &other) | |
Copy construct. More... | |
virtual | ~MSIter2 () |
Destructor. More... | |
MSIter2 & | operator= (const MSIter2 &other) |
Assigment. More... | |
virtual void | origin () |
Reset iterator to start of data This specialization resets the time-compare object before calling parent. More... | |
Public Member Functions inherited from casacore::MSIter | |
MSIter () | |
Default constructor - useful only to assign another iterator later. More... | |
MSIter (const MeasurementSet &ms, const Block< Int > &sortColumns, Double timeInterval=0, Bool addDefaultSortColumns=True, Bool storeSorted=True) | |
Construct from MS and a Block of MS column enums specifying the iteration order, if none are specified, ARRAY_ID, FIELD_ID, DATA_DESC_ID, and TIME iteration is implicit (unless addDefaultSortColumns=False) These columns will be added first if they are not specified. More... | |
MSIter (const Block< MeasurementSet > &mss, const Block< Int > &sortColumns, Double timeInterval=0, Bool addDefaultSortColumns=True, Bool storeSorted=True) | |
Same as above with multiple MSs as input. More... | |
MSIter (const MSIter &other) | |
Copy construct. More... | |
MSIter * | clone () const |
virtual | ~MSIter () |
Destructor. More... | |
MSIter & | operator= (const MSIter &other) |
Assigment. More... | |
void | setInterval (Double timeInterval) |
Set or reset the time interval to use for iteration. More... | |
virtual Bool | more () const |
Return False if there is no more data. More... | |
virtual MSIter & | operator++ (int) |
Advance iterator through data. More... | |
virtual MSIter & | operator++ () |
const String & | keyChange () const |
Report Name of slowest column that changes at end of current iteration. More... | |
Table | table () const |
Return the current Table iteration. More... | |
const MS & | ms () const |
Return reference to the current MS. More... | |
const ROMSColumns & | msColumns () const |
Return reference to the current ROMSColumns. More... | |
Int | msId () const |
Return the current MS Id (according to the order in which they appeared in the constructor) More... | |
Bool | newMS () const |
Return true if msId has changed since last iteration. More... | |
Int | arrayId () const |
Return the current ArrayId. More... | |
Bool | newArray () const |
Return True if ArrayId has changed since last iteration. More... | |
Int | fieldId () const |
Return the current FieldId. More... | |
Bool | newField () const |
Return True if FieldId/Source has changed since last iteration. More... | |
Int | spectralWindowId () const |
Return current SpectralWindow. More... | |
Bool | newSpectralWindow () const |
Return True if SpectralWindow has changed since last iteration. More... | |
Int | dataDescriptionId () const |
Return current DataDescriptionId. More... | |
Bool | newDataDescriptionId () const |
Return True if DataDescriptionId has changed since last iteration. More... | |
Int | polarizationId () const |
Return current PolarizationId. More... | |
Bool | newPolarizationId () const |
Return True if polarization has changed since last iteration. More... | |
Int | polFrame () const |
Return frame for polarization (returns PolFrame enum) More... | |
const Vector< Double > & | frequency () const |
Return the frequencies corresponding to the DATA matrix. More... | |
const MFrequency & | frequency0 () const |
Return frequency of first channel with reference frame as a Measure. More... | |
const MFrequency & | restFrequency (Int line=0) const |
Return the rest frequency of the specified line as a Measure. More... | |
const MPosition & | telescopePosition () const |
Return the telescope position (if a known telescope) or the position of the first antenna (if unknown) More... | |
const Vector< SquareMatrix < Complex, 2 > > & | CJones () const |
Return the feed configuration/leakage matrix for feed 0 on each antenna TODO: CJonesAll can be used instead of this method in all instances. More... | |
const Matrix< SquareMatrix < Complex, 2 > > & | CJonesAll () const |
Return the feed configuration/leakage matrix for all feeds and antennae First axis is antennaId, 2nd axis is feedId. More... | |
const Matrix< Double > & | receptorAngle () const |
Return the receptor angle for feed 0 on each antenna. More... | |
const Cube< Double > & | receptorAngles () const |
Return the receptor angles for all feeds and antennae First axis is a receptor number, 2nd axis is antennaId, 3rd axis is feedId. More... | |
Int | startChan () const |
Return the channel number of the first channel in the DATA. More... | |
const Vector< String > & | antennaMounts () const |
Return a string mount identifier for each antenna. More... | |
const Cube< RigidVector < Double, 2 > > & | getBeamOffsets () const |
Return a cube containing pairs of coordinate offset for each receptor of each feed (values are in radians, coordinate system is fixed with antenna and is the same as used to define the BEAM_OFFSET parameter in the feed table). More... | |
Bool | allBeamOffsetsZero () const |
True if all elements of the cube returned by getBeamOffsets are zero. More... | |
void | getSpwInFreqRange (Block< Vector< Int > > &spw, Block< Vector< Int > > &start, Block< Vector< Int > > &nchan, Double freqStart, Double freqEnd, Double freqStep) |
Get the spw, start and nchan for all the ms's is this msiter that match the frequecy "freqstart-freqStep" and "freqEnd+freqStep" range. More... | |
Int | numMS () const |
Get the number of actual ms's associated wth this iterator. More... | |
const MS & | ms (const uInt n) const |
Get a reference to the nth ms in the list of ms associated with this iterator. More... | |
const MDirection & | phaseCenter () const |
Returns the phasecenter for the first time stamp of the iteration The time is important for field tables that have polynomial or ephemerides phasecenters, i.e time varying for a given field_id. More... | |
const MDirection | phaseCenter (const Int fldID, const Double timeStamp) const |
If the iterator is set so as one iteration has more that 1 value of time stamp or fieldid then the caller should use the phasecenter with field id and time explicitly. More... | |
const String & | fieldName () const |
return FIELD table associated current fieldname and sourcename respectively More... | |
const String & | sourceName () const |
Protected Member Functions | |
void | construct2 (const casacore::Block< int > &sortColumns, casacore::Bool addDefaultSortColumns) |
handle the construction details More... | |
virtual void | setState () |
set the iteration state More... | |
virtual void | discernEnforcedTimeBounds (casacore::Vector< casacore::Double > &solbounds, casacore::Bool scanBounded) |
virtual void | discernEnforcedTimeBounds (casacore::Vector< casacore::Double > &solbounds, casacore::Bool scanBounded, casacore::Bool fieldBounded) |
virtual void | discernEnforcedTimeBounds (casacore::Vector< casacore::Double > &solbounds, casacore::Bool scanBounded, casacore::Bool fieldBounded, casacore::Double dt) |
Protected Member Functions inherited from casacore::MSIter | |
void | construct (const Block< Int > &sortColumns, Bool addDefaultSortColumns) |
handle the construction details More... | |
void | advance () |
advance the iteration More... | |
void | setMSInfo () |
void | setArrayInfo () |
void | setFeedInfo () |
void | setDataDescInfo () |
void | setFieldInfo () |
Bool | isSubSet (const Vector< uInt > &r1, const Vector< uInt > &r2) |
Determine if the numbers in r1 are a sorted subset of those in r2. More... | |
An iterator class for MeasurementSets.
Public interface
MSIter stands for the MeasurementSet Iterator class.
An MSIter is a class to traverse a MeasurementSet in various orders. It automatically adds four predefined sort columns to your selection of sort columns (see constructor) so that it can keep track of changes in frequency or polarization setup, field position and sub-array. Note that this can cause iterations to occur in a different way from what you would expect, see examples below. MSIter implements iteration by time interval for the use of e.g., calibration tasks that want to calculate solutions over some interval of time. You can iterate over multiple MeasurementSets with this class.
This class was originally part of the VisibilityIterator class, but that class was getting too large and complicated. By splitting out the toplevel iteration into this class the code is much easier to understand. It is now also available through the ms tool.
casa::vi::MSIter2::MSIter2 | ( | ) |
Default constructor - useful only to assign another iterator later.
Use of other member functions on this object is likely to dump core.
casa::vi::MSIter2::MSIter2 | ( | const casacore::MeasurementSet & | ms, |
const casacore::Block< int > & | sortColumns, | ||
double | timeInterval = 0 , |
||
bool | addDefaultSortColumns = true , |
||
bool | storeSorted = true |
||
) |
casa::vi::MSIter2::MSIter2 | ( | const casacore::Block< casacore::MeasurementSet > & | mss, |
const casacore::Block< int > & | sortColumns, | ||
double | timeInterval = 0 , |
||
bool | addDefaultSortColumns = true , |
||
bool | storeSorted = true |
||
) |
Same as above with multiple MSs as input.
casa::vi::MSIter2::MSIter2 | ( | const MSIter2 & | other | ) |
Copy construct.
This calls the assigment operator.
|
virtual |
Destructor.
|
protected |
handle the construction details
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Assigment.
This will reset the iterator to the origin.
|
virtual |
Reset iterator to start of data This specialization resets the time-compare object before calling parent.
Reimplemented from casacore::MSIter.
|
protectedvirtual |
set the iteration state
Reimplemented from casacore::MSIter.