Loading...
Searching...
No Matches
casacore::MSIter Class Reference
ms package (libcasa_ms) » MeasurementSets_module

An iterator class for MeasurementSets. More...

`#include <MSIter.h>`

## Public Types

enum | PolFrame { Circular , Linear }

## Public Member Functions

| MSIter ()
| Default constructor - useful only to assign another iterator later.
| 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.
| 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.
| MSIter (const MeasurementSet &ms, const std::vector< std::pair< String, std::shared_ptr< BaseCompare > > > &sortColumns)
| This constructor is similar to the previous ones but the comparison functions used to group the iterations are given explicitly, making the constructor more generic.
| MSIter (const Block< MeasurementSet > &mss, const std::vector< std::pair< String, std::shared_ptr< BaseCompare > > > &sortColumns)
| Same as above with multiple MSs as input.
| MSIter (const MSIter &other)
| Copy construct.
MSIter * | clone () const
virtual | ~MSIter ()
| Destructor.
MSIter & | operator= (const MSIter &other)
| Assigment.
void | setInterval (Double timeInterval)
| Set or reset the time interval to use for iteration.
virtual void | origin ()
| Reset iterator to start of data.
virtual Bool | more () const
| Return False if there is no more data.
virtual MSIter & | operator++ (int)
| Advance iterator through data.
virtual MSIter & | operator++ ()
const String & | keyChange () const
| Report Name of slowest column that changes at end of current iteration.
Table | table () const
| Return the current Table iteration.
const MS & | ms () const
| Return reference to the current MS.
const MSColumns & | msColumns () const
| Return reference to the current MSColumns.
size_t | msId () const
| Return the current MS Id (according to the order in which they appeared in the constructor).
Bool | newMS () const
| Return true if msId has changed since last iteration.
const ScalarColumn< Int > & | colArrayIds () const
| Return the current ArrayIds for all rows in this iteration.
const ScalarColumn< Int > & | colFieldIds () const
| Return the current FieldIds for all rows in this iteration.
const ScalarColumn< Int > & | colDataDescriptionIds () const
| Return the current DataDescriptionIds for all rows in this iteration.
Int | arrayId () const
| Return the ArrayId of the first element in this iteration.
Bool | newArray () const
| Return True if ArrayId has changed since last iteration Note that if MS_ARRAY is not part of the sorting columns this will always be true.
Int | fieldId () const
| Return the FieldId of the first element in this iteration.
Bool | newField () const
| Return True if FieldId/Source has changed since last iteration Note that if MS_FIELD_ID is not part of the sorting columns this will always be true.
Int | spectralWindowId () const
| Return SpectralWindow of the first element in this iteration.
Bool | newSpectralWindow () const
| Return True if SpectralWindow has changed since last iteration Note that if MS_DATA_DESC_ID is not part of the sorting columns this will always be true.
Int | dataDescriptionId () const
| Return DataDescriptionId of the first element in this iteration.
Bool | newDataDescriptionId () const
| Return True if DataDescriptionId has changed since last iteration Note that if MS_DATA_DESC_ID is not part of the sorting columns this will always be true.
Int | polarizationId () const
| Return PolarizationId of the first element in this iteration.
Bool | newPolarizationId () const
| Return True if polarization has changed since last iteration Note that if MS_DATA_DESC_ID is not part of the sorting columns this will always be true.
Int | polFrame () const
| Return frame for polarization of the first element in this iteration.
const Vector< Double > & | frequency () const
| Return the frequencies corresponding to the DATA matrix.
const MFrequency & | frequency0 () const
| Return frequency of first channel of the first element in iteration with reference frame as a Measure.
const MFrequency & | restFrequency (Int line=0) const
| Return the rest frequency of the specified line as a Measure.
const MPosition & | telescopePosition () const
| Return the telescope position (if a known telescope) or the position of the first antenna (if unknown).
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.
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.
const Matrix< Double > & | receptorAngle () const
| Return the receptor angle for feed 0 on each antenna.
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.
const Vector< String > & | antennaMounts () const
| Return a string mount identifier for each antenna.
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).
Bool | allBeamOffsetsZero () const
| True if all elements of the cube returned by getBeamOffsets are zero.
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.
size_t | numMS () const
| Get the number of actual ms's associated wth this iterator.
const MS & | ms (const size_t n) const
| Get a reference to the nth ms in the list of ms associated with this iterator.
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.
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.
const String & | fieldName () const
| return FIELD table associated current fieldname and sourcename respectively
const String & | sourceName () const

## Protected Member Functions

void | construct (const Block< Int > &sortColumns, Bool addDefaultSortColumns)
| handle the construction details
void | construct (const std::vector< std::pair< String, std::shared_ptr< BaseCompare > > > &sortColumns)
| handle the construction details using explicit comparison functions
void | advance ()
| advance the iteration
virtual void | setState ()
| set the iteration state
void | setMSInfo ()
void | setArrayInfo ()
void | setFeedInfo () const
void | cacheCurrentDDInfo () const
| Store the current DD, SPW, Pol ID.
void | cacheExtraDDInfo () const
| Store extra info related to the DD.
void | setFieldInfo () const
Bool | isSubSet (const Vector< rownr_t > &r1, const Vector< rownr_t > &r2)
| Determine if the numbers in r1 are a sorted subset of those in r2.

## Protected Attributes

MSIter * | This
Block< MeasurementSet > | bms_p
Block< TableIterator * > | tabIter_p
Block< Bool > | tabIterAtStart_p
Bool | timeInSort_p
| This booleans determine if given columns are part of the sorting.
Bool | arrayInSort_p
Bool | ddInSort_p
Bool | fieldInSort_p
size_t | nMS_p
size_t | curMS_p
ssize_t | lastMS_p
std::shared_ptr< MSColumns > | msc_p
Table | curTable_p
Int | curArrayIdFirst_p
Int | lastArrayId_p
Int | curSourceIdFirst_p
String | curFieldNameFirst_p
String | curSourceNameFirst_p
Int | curFieldIdFirst_p
Int | lastFieldId_p
Int | curDataDescIdFirst_p
| These variables point to the current (as in this iteration) DD, SPW and polarization IDs.
Int | curSpectralWindowIdFirst_p
Int | curPolarizationIdFirst_p
Int | lastDataDescId_p
| These variables point to the IDs of the previous iteration.
Int | lastSpectralWindowId_p
Int | lastPolarizationId_p
Bool | more_p
Bool | newMS_p
Bool | newArrayId_p
Bool | newFieldId_p
Bool | newSpectralWindowId_p
Bool | newPolarizationId_p
Bool | newDataDescId_p
bool | spwDepFeed_p
bool | checkFeed_p
bool | feedInfoCached_p
| Variable to know whether the feed info is already computed.
Bool | storeSorted_p
| Globally control disk storage of SORTED_TABLE.
Double | interval_p
| time selection
ScalarColumn< Int > | colDataDesc_p
| This column is mutable since it is only attached when it is neccesary to read the DD Ids.
ScalarColumn< Int > | colField_p
ScalarColumn< Int > | colArray_p
MDirection | phaseCenter_p
Double | prevFirstTimeStamp_p
Matrix< Double > | receptorAnglesFeed0_p
| cache for access functions
Cube< Double > | receptorAngles_p
| temporary retained for compatibility contain actually a reference to the first plane of receptorAngles_p
Vector< SquareMatrix< Complex, 2 > > | CJonesFeed0_p
Matrix< SquareMatrix< Complex, 2 > > | CJones_p
| similar to receptorAngle_p
Vector< String > | antennaMounts_p
Cube< RigidVector< Double, 2 > > | beamOffsets_p
| antenna (e.g.
Bool | allBeamOffsetsZero_p
| each element of the cube in radians) in the antenna coordinate system.
PolFrame | polFrame_p
| are zero (to speed things up in a single beam case)
Bool | freqCacheOK_p
| hence mutable.
Vector< Double > | frequency_p
MFrequency | frequency0_p
MFrequency | restFrequency_p
MPosition | telescopePosition_p
std::shared_ptr< MSInterval > | timeComp_p

## Detailed Description

An iterator class for MeasurementSets.

### Intended use:

Public interface

### Prerequisite

- MeasurementSet

### Etymology

MSIter stands for the MeasurementSet Iterator class.

### Synopsis

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.

### Example

// The following code iterates by by ARRAY_ID, FIELD_ID, DATA_DESC_ID and
// TIME (all implicitly added columns) and then by baseline (antenna pair),
// in 3000s intervals.
MeasurementSet ms("3C273XC1.ms");
Block<int> sort(2);
sort[0] = MS::ANTENNA1;
sort[1] = MS::ANTENNA2;
Double timeInterval = 3000;
MSIter msIter(ms,sort,timeInteval);
for (msIter.origin(); msIter.more(); msIter++) {
// print out some of the iteration state
cout << msIter.fieldId() << endl;
cout << msIter.fieldName() << endl;
cout << msIter.dataDescriptionId() << endl;
cout << msIter.frequency0() << endl;
cout << msIter.table().nrow() << endl;
process(msIter.table()); // process the data in the current iteration
}
// Output shows only 1 row at a time because the table is sorted on TIME
// first and ANTENNA1, ANTENNA2 next and each baseline occurs only once per
// TIME stamp. The interval has no effect in this case.
casacore::Block
Definition Block.h:140
casacore::MSIter::ms
const MS & ms() const
Return reference to the current MS.
Definition MSIter.h:509
casacore::MSIter::MSIter
MSIter()
Default constructor - useful only to assign another iterator later.
casacore::MSMainEnums::ANTENNA2
@ ANTENNA2
ID of second antenna in antenna-pair.
Definition MSMainEnums.h:74
casacore::MSMainEnums::ANTENNA1
@ ANTENNA1
ID of first antenna in antenna-pair.
Definition MSMainEnums.h:70
casacore::MeasurementSet
Definition MeasurementSet.h:278
casacore::Double
double Double
Definition aipstype.h:53

### Example

// The following code iterates by baseline (antenna pair), TIME, and,
// implicitly, by ARRAY_ID, FIELD_ID and DATA_DESC_ID in 3000s
// intervals.
MeasurementSet ms("3C273XC1.ms");
Block<int> sort(3);
sort[0] = MS::ANTENNA1;
sort[1] = MS::ANTENNA2;
sort[2] = MS::TIME;
Double timeInterval = 3000;
MSIter msIter(ms,sort,timeInteval);
for (msIter.origin(); msIter.more(); msIter++) {
// print out some of the iteration state
cout << msIter.fieldId() << endl;
cout << msIter.fieldName() << endl;
cout << msIter.dataDescriptionId() << endl;
cout << msIter.frequency0() << endl;
cout << msIter.table().nrow() << endl;
process(msIter.table()); // process the data in the current iteration
// Now the output shows 7 rows at a time, all with identical ANTENNA1
// and ANTENNA2 values and TIME values within a 3000s interval.
}
casacore::MSMainEnums::TIME
@ TIME
Modified Julian Day number (JD-2400000.5) for midpoint of integration.
Definition MSMainEnums.h:145

### Motivation

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.

### To Do

- multiple observatories in a single MS are not handled correctly (need to sort on observation id and check observatory name to set position frame)

Definition at line 159 of file MSIter.h.

## Member Enumeration Documentation

## PolFrame

enum casacore::MSIter::PolFrame

Enumerator
Circular | Circular polarization.
Linear | Linear polarization.

Definition at line 162 of file MSIter.h.

## Constructor & Destructor Documentation

## MSIter() [1/6]

casacore::MSIter::MSIter | ( |  | ) |

Default constructor - useful only to assign another iterator later.

Use of other member functions on this object is likely to dump core.

Referenced by clone(), MSIter(), operator++(), operator++(), and operator=().

## MSIter() [2/6]

casacore::MSIter::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.

An optional timeInterval can be given to iterate through chunks of time. The default interval of 0 groups all times together. Every 'chunk' of data contains all data within a certain time interval and with identical values of the other iteration columns (e.g. DATA_DESCRIPTION_ID and FIELD_ID). See the examples above for the effect of different sort orders.

The storeSorted parameter determines how the resulting SORT_TABLE is managed. If storeSorted is true then the table will be stored on disk; this potentially allows its reuse in the future but has also been shown to be a problem when the MS is being read in parallel. If storeSorted is false then the SORTED_TABLE is constructed and used in memory which keeps concurrent readers from interfering with each other.

References ms(), and casacore::True.

## MSIter() [3/6]

casacore::MSIter::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.

References casacore::True.

## MSIter() [4/6]

casacore::MSIter::MSIter | ( | const MeasurementSet & | ms,
|  | const std::vector< std::pair< String, std::shared_ptr< BaseCompare > > > & | sortColumns )

This constructor is similar to the previous ones but the comparison functions used to group the iterations are given explicitly, making the constructor more generic.

Also, the column is specified as a string, to support sorting by columns not part of the standard MS definition. Note that with this constructor TIME is not treated in any special way and there are no default sorting columns, i.e., the sorting needs have to be set explicitly. The last element in vector sortColumns will be the column that will change faster in the iteration loop, whereas the first element will be the slower. For instance, if sortColumns[0].first = "DATA_DESC_ID" nad sortColumns[1].first = "ANTENNA1" then the first iterations will go through all possible values of ANTENNA1 for the first DDId, then it will start the iterations for the second DDId and so on.

References ms().

## MSIter() [5/6]

casacore::MSIter::MSIter | ( | const Block< MeasurementSet > & | mss,
|  | const std::vector< std::pair< String, std::shared_ptr< BaseCompare > > > & | sortColumns )

Same as above with multiple MSs as input.

## MSIter() [6/6]

casacore::MSIter::MSIter | ( | const MSIter & | other | ) |

Copy construct.

This calls the assigment operator.

References MSIter().

## ~MSIter()

virtual casacore::MSIter::~MSIter | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## advance()

void casacore::MSIter::advance | ( |  | ) |

protected

advance the iteration

## allBeamOffsetsZero()

Bool casacore::MSIter::allBeamOffsetsZero | ( |  | ) | const

inline

True if all elements of the cube returned by getBeamOffsets are zero.

Definition at line 555 of file MSIter.h.

References allBeamOffsetsZero_p, feedInfoCached_p, and setFeedInfo().

## antennaMounts()

const Vector< String > & casacore::MSIter::antennaMounts | ( |  | ) | const

inline

Return a string mount identifier for each antenna.

Definition at line 551 of file MSIter.h.

References antennaMounts_p.

## arrayId()

Int casacore::MSIter::arrayId | ( |  | ) | const

inline

Return the ArrayId of the first element in this iteration.

Definition at line 525 of file MSIter.h.

References curArrayIdFirst_p.

## cacheCurrentDDInfo()

void casacore::MSIter::cacheCurrentDDInfo | ( |  | ) | const

protected

Store the current DD, SPW, Pol ID.

It can be called in logically const objects although it modifies caching (mutable) variables for performance reasons.

Referenced by colDataDescriptionIds(), dataDescriptionId(), polarizationId(), polFrame(), and spectralWindowId().

## cacheExtraDDInfo()

void casacore::MSIter::cacheExtraDDInfo | ( |  | ) | const

protected

Store extra info related to the DD.

It can be called in logically const objects although it modifies caching (mutable) variables for performance reasons.

Referenced by colDataDescriptionIds(), dataDescriptionId(), polarizationId(), polFrame(), and spectralWindowId().

## CJones()

const Vector< SquareMatrix< Complex, 2 > > & casacore::MSIter::CJones | ( |  | ) | const

inline

Return the feed configuration/leakage matrix for feed 0 on each antenna TODO: CJonesAll can be used instead of this method in all instances.

Definition at line 543 of file MSIter.h.

References CJonesFeed0_p, feedInfoCached_p, and setFeedInfo().

## CJonesAll()

const Matrix< SquareMatrix< Complex, 2 > > & casacore::MSIter::CJonesAll | ( |  | ) | const

inline

Return the feed configuration/leakage matrix for all feeds and antennae First axis is antennaId, 2nd axis is feedId.

Result of CJones() is a reference to the first column of the matrix returned by this method

Definition at line 545 of file MSIter.h.

References CJones_p, feedInfoCached_p, and setFeedInfo().

## clone()

MSIter * casacore::MSIter::clone | ( |  | ) | const

References MSIter().

## colArrayIds()

const ScalarColumn< Int > & casacore::MSIter::colArrayIds | ( |  | ) | const

inline

Return the current ArrayIds for all rows in this iteration.

Definition at line 518 of file MSIter.h.

References colArray_p.

## colDataDescriptionIds()

const ScalarColumn< Int > & casacore::MSIter::colDataDescriptionIds | ( |  | ) | const

inline

Return the current DataDescriptionIds for all rows in this iteration.

Definition at line 522 of file MSIter.h.

References cacheCurrentDDInfo(), cacheExtraDDInfo(), colDataDesc_p, and curDataDescIdFirst_p.

## colFieldIds()

const ScalarColumn< Int > & casacore::MSIter::colFieldIds | ( |  | ) | const

inline

Return the current FieldIds for all rows in this iteration.

Definition at line 520 of file MSIter.h.

References colField_p.

## construct() [1/2]

void casacore::MSIter::construct | ( | const Block< Int > & | sortColumns,
|  | Bool | addDefaultSortColumns )

protected

handle the construction details

## construct() [2/2]

void casacore::MSIter::construct | ( | const std::vector< std::pair< String, std::shared_ptr< BaseCompare > > > & | sortColumns | ) |

protected

handle the construction details using explicit comparison functions

## dataDescriptionId()

Int casacore::MSIter::dataDescriptionId | ( |  | ) | const

inline

Return DataDescriptionId of the first element in this iteration.

Definition at line 533 of file MSIter.h.

References cacheCurrentDDInfo(), cacheExtraDDInfo(), and curDataDescIdFirst_p.

## fieldId()

Int casacore::MSIter::fieldId | ( |  | ) | const

inline

Return the FieldId of the first element in this iteration.

Definition at line 526 of file MSIter.h.

References curFieldIdFirst_p, and setFieldInfo().

## fieldName()

const String & casacore::MSIter::fieldName | ( |  | ) | const

return FIELD table associated current fieldname and sourcename respectively

## frequency()

const Vector< Double > & casacore::MSIter::frequency | ( |  | ) | const

Return the frequencies corresponding to the DATA matrix.

## frequency0()

const MFrequency & casacore::MSIter::frequency0 | ( |  | ) | const

Return frequency of first channel of the first element in iteration with reference frame as a Measure.

The reference frame Epoch is that of the first row, reset it as needed for each row. The reference frame Position is the average of the antenna positions.

## getBeamOffsets()

const Cube< RigidVector< Double, 2 > > & casacore::MSIter::getBeamOffsets | ( |  | ) | const

inline

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).

The cube axes are receptor, antenna, feed.

Definition at line 553 of file MSIter.h.

References beamOffsets_p, feedInfoCached_p, and setFeedInfo().

## getSpwInFreqRange()

void casacore::MSIter::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.

## isSubSet()

Bool casacore::MSIter::isSubSet | ( | const Vector< rownr_t > & | r1,
|  | const Vector< rownr_t > & | r2 )

protected

Determine if the numbers in r1 are a sorted subset of those in r2.

## keyChange()

const String & casacore::MSIter::keyChange | ( |  | ) | const

Report Name of slowest column that changes at end of current iteration.

## more()

Bool casacore::MSIter::more | ( |  | ) | const

inline virtual

Return False if there is no more data.

Definition at line 507 of file MSIter.h.

References more_p.

## ms() [1/2]

const MS & casacore::MSIter::ms | ( |  | ) | const

inline

Return reference to the current MS.

Definition at line 509 of file MSIter.h.

References bms_p, and curMS_p.

Referenced by MSIter(), and MSIter().

## ms() [2/2]

const MS & casacore::MSIter::ms | ( | const size_t | n | ) | const

Get a reference to the nth ms in the list of ms associated with this iterator.

If larger than the list of ms's current ms is returned So better check wth numMS() before making the call

## msColumns()

const MSColumns & casacore::MSIter::msColumns | ( |  | ) | const

inline

Return reference to the current MSColumns.

Definition at line 510 of file MSIter.h.

References msc_p.

## msId()

size_t casacore::MSIter::msId | ( |  | ) | const

inline

Return the current MS Id (according to the order in which they appeared in the constructor).

Definition at line 516 of file MSIter.h.

References curMS_p.

## newArray()

Bool casacore::MSIter::newArray | ( |  | ) | const

inline

Return True if ArrayId has changed since last iteration Note that if MS_ARRAY is not part of the sorting columns this will always be true.

Definition at line 512 of file MSIter.h.

References newArrayId_p.

## newDataDescriptionId()

Bool casacore::MSIter::newDataDescriptionId | ( |  | ) | const

inline

Return True if DataDescriptionId has changed since last iteration Note that if MS_DATA_DESC_ID is not part of the sorting columns this will always be true.

Definition at line 537 of file MSIter.h.

References newDataDescId_p.

## newField()

Bool casacore::MSIter::newField | ( |  | ) | const

inline

Return True if FieldId/Source has changed since last iteration Note that if MS_FIELD_ID is not part of the sorting columns this will always be true.

Definition at line 513 of file MSIter.h.

References newFieldId_p.

## newMS()

Bool casacore::MSIter::newMS | ( |  | ) | const

inline

Return true if msId has changed since last iteration.

Definition at line 511 of file MSIter.h.

References newMS_p.

## newPolarizationId()

Bool casacore::MSIter::newPolarizationId | ( |  | ) | const

inline

Return True if polarization has changed since last iteration Note that if MS_DATA_DESC_ID is not part of the sorting columns this will always be true.

Definition at line 536 of file MSIter.h.

References newPolarizationId_p.

## newSpectralWindow()

Bool casacore::MSIter::newSpectralWindow | ( |  | ) | const

inline

Return True if SpectralWindow has changed since last iteration Note that if MS_DATA_DESC_ID is not part of the sorting columns this will always be true.

Definition at line 514 of file MSIter.h.

References newSpectralWindowId_p.

## numMS()

size_t casacore::MSIter::numMS | ( |  | ) | const

inline

Get the number of actual ms's associated wth this iterator.

Definition at line 517 of file MSIter.h.

References nMS_p.

## operator++() [1/2]

virtual MSIter & casacore::MSIter::operator++ | ( |  | ) |

virtual

References MSIter().

## operator++() [2/2]

virtual MSIter & casacore::MSIter::operator++ | ( | int |  | ) |

virtual

Advance iterator through data.

References MSIter().

## operator=()

MSIter & casacore::MSIter::operator= | ( | const MSIter & | other | ) |

Assigment.

This will reset the iterator to the origin.

References MSIter().

## origin()

virtual void casacore::MSIter::origin | ( |  | ) |

virtual

Reset iterator to start of data.

## phaseCenter() [1/2]

const MDirection & casacore::MSIter::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.

. If the iterator is set so as one iteration has more that 1 time stamp then this version is correct only for fixed phasecenters

## phaseCenter() [2/2]

const MDirection casacore::MSIter::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.

## polarizationId()

Int casacore::MSIter::polarizationId | ( |  | ) | const

inline

Return PolarizationId of the first element in this iteration.

Definition at line 530 of file MSIter.h.

References cacheCurrentDDInfo(), cacheExtraDDInfo(), and curPolarizationIdFirst_p.

## polFrame()

Int casacore::MSIter::polFrame | ( |  | ) | const

inline

Return frame for polarization of the first element in this iteration.

Returns
  PolFrame enum

Definition at line 538 of file MSIter.h.

References cacheCurrentDDInfo(), cacheExtraDDInfo(), curPolarizationIdFirst_p, and polFrame_p.

## receptorAngle()

const Matrix< Double > & casacore::MSIter::receptorAngle | ( |  | ) | const

inline

Return the receptor angle for feed 0 on each antenna.

First axis is receptor number, 2nd axis is antennaId. TODO: receptorAngles() can be used instead of this method

Definition at line 547 of file MSIter.h.

References feedInfoCached_p, receptorAnglesFeed0_p, and setFeedInfo().

## receptorAngles()

const Cube< Double > & casacore::MSIter::receptorAngles | ( |  | ) | const

inline

Return the receptor angles for all feeds and antennae First axis is a receptor number, 2nd axis is antennaId, 3rd axis is feedId.

Result of receptorAngle() is just a reference to the first plane of the cube returned by this method

Definition at line 549 of file MSIter.h.

References feedInfoCached_p, receptorAngles_p, and setFeedInfo().

## restFrequency()

const MFrequency & casacore::MSIter::restFrequency | ( | Int | line = 0 | ) | const

Return the rest frequency of the specified line as a Measure.

## setArrayInfo()

void casacore::MSIter::setArrayInfo | ( |  | ) |

protected

## setFeedInfo()

void casacore::MSIter::setFeedInfo | ( |  | ) | const

protected

Referenced by allBeamOffsetsZero(), CJones(), CJonesAll(), getBeamOffsets(), receptorAngle(), and receptorAngles().

## setFieldInfo()

void casacore::MSIter::setFieldInfo | ( |  | ) | const

protected

Referenced by fieldId().

## setInterval()

void casacore::MSIter::setInterval | ( | Double | timeInterval | ) |

Set or reset the time interval to use for iteration.

You should call origin() to reset the iteration after calling this.

## setMSInfo()

void casacore::MSIter::setMSInfo | ( |  | ) |

protected

## setState()

virtual void casacore::MSIter::setState | ( |  | ) |

protected virtual

set the iteration state

## sourceName()

const String & casacore::MSIter::sourceName | ( |  | ) | const

## spectralWindowId()

Int casacore::MSIter::spectralWindowId | ( |  | ) | const

inline

Return SpectralWindow of the first element in this iteration.

Definition at line 527 of file MSIter.h.

References cacheCurrentDDInfo(), cacheExtraDDInfo(), and curSpectralWindowIdFirst_p.

## table()

Table casacore::MSIter::table | ( |  | ) | const

inline

Return the current Table iteration.

Definition at line 508 of file MSIter.h.

References curTable_p.

## telescopePosition()

const MPosition & casacore::MSIter::telescopePosition | ( |  | ) | const

inline

Return the telescope position (if a known telescope) or the position of the first antenna (if unknown).

Definition at line 541 of file MSIter.h.

References telescopePosition_p.

## Member Data Documentation

## allBeamOffsetsZero_p

Bool casacore::MSIter::allBeamOffsetsZero_p

mutable protected

each element of the cube in radians) in the antenna coordinate system.

Cube axes are: receptor, antenna, feed.

Definition at line 492 of file MSIter.h.

Referenced by allBeamOffsetsZero().

## antennaMounts_p

Vector<String> casacore::MSIter::antennaMounts_p

protected

Definition at line 486 of file MSIter.h.

Referenced by antennaMounts().

## arrayInSort_p

Bool casacore::MSIter::arrayInSort_p

protected

Definition at line 434 of file MSIter.h.

## beamOffsets_p

Cube<RigidVector<Double, 2> > casacore::MSIter::beamOffsets_p

mutable protected

antenna (e.g.

EQUATORIAL, ALT-AZ,...)

Definition at line 488 of file MSIter.h.

Referenced by getBeamOffsets().

## bms_p

Block<MeasurementSet> casacore::MSIter::bms_p

protected

Definition at line 429 of file MSIter.h.

Referenced by ms().

## checkFeed_p

bool casacore::MSIter::checkFeed_p

protected

Definition at line 457 of file MSIter.h.

## CJones_p

Matrix<SquareMatrix<Complex,2> > casacore::MSIter::CJones_p

mutable protected

similar to receptorAngle_p

Definition at line 485 of file MSIter.h.

Referenced by CJonesAll().

## CJonesFeed0_p

Vector<SquareMatrix<Complex,2> > casacore::MSIter::CJonesFeed0_p

mutable protected

Definition at line 483 of file MSIter.h.

Referenced by CJones().

## colArray_p

ScalarColumn<Int> casacore::MSIter::colArray_p

protected

Definition at line 473 of file MSIter.h.

Referenced by colArrayIds().

## colDataDesc_p

ScalarColumn<Int> casacore::MSIter::colDataDesc_p

mutable protected

This column is mutable since it is only attached when it is neccesary to read the DD Ids.

That might happen when calling a const accesor like dataDescriptionId().

Definition at line 472 of file MSIter.h.

Referenced by colDataDescriptionIds().

## colField_p

ScalarColumn<Int> casacore::MSIter::colField_p

protected

Definition at line 472 of file MSIter.h.

Referenced by colFieldIds().

## curArrayIdFirst_p

Int casacore::MSIter::curArrayIdFirst_p

protected

Definition at line 440 of file MSIter.h.

Referenced by arrayId().

## curDataDescIdFirst_p

Int casacore::MSIter::curDataDescIdFirst_p

mutable protected

These variables point to the current (as in this iteration) DD, SPW and polarization IDs.

They are mutable since they are evaluated in a lazy way, i.e., only when needed. If the DDId is part of the sorting columns then it is always computed when calling next(), otherwise it is only computed when some accesor of metadata that depends on them is called by the application.

Definition at line 451 of file MSIter.h.

Referenced by colDataDescriptionIds(), and dataDescriptionId().

## curFieldIdFirst_p

Int casacore::MSIter::curFieldIdFirst_p

mutable protected

Definition at line 443 of file MSIter.h.

Referenced by fieldId().

## curFieldNameFirst_p

String casacore::MSIter::curFieldNameFirst_p

mutable protected

Definition at line 441 of file MSIter.h.

## curMS_p

size_t casacore::MSIter::curMS_p

protected

Definition at line 436 of file MSIter.h.

Referenced by ms(), and msId().

## curPolarizationIdFirst_p

Int casacore::MSIter::curPolarizationIdFirst_p

protected

Definition at line 452 of file MSIter.h.

Referenced by polarizationId(), and polFrame().

## curSourceIdFirst_p

Int casacore::MSIter::curSourceIdFirst_p

protected

Definition at line 440 of file MSIter.h.

## curSourceNameFirst_p

String casacore::MSIter::curSourceNameFirst_p

protected

Definition at line 442 of file MSIter.h.

## curSpectralWindowIdFirst_p

Int casacore::MSIter::curSpectralWindowIdFirst_p

protected

Definition at line 451 of file MSIter.h.

Referenced by spectralWindowId().

## curTable_p

Table casacore::MSIter::curTable_p

protected

Definition at line 439 of file MSIter.h.

Referenced by table().

## ddInSort_p

Bool casacore::MSIter::ddInSort_p

protected

Definition at line 434 of file MSIter.h.

## feedInfoCached_p

bool casacore::MSIter::feedInfoCached_p

mutable protected

Variable to know whether the feed info is already computed.

Definition at line 460 of file MSIter.h.

Referenced by allBeamOffsetsZero(), CJones(), CJonesAll(), getBeamOffsets(), receptorAngle(), and receptorAngles().

## fieldInSort_p

Bool casacore::MSIter::fieldInSort_p

protected

Definition at line 434 of file MSIter.h.

## freqCacheOK_p

Bool casacore::MSIter::freqCacheOK_p

mutable protected

hence mutable.

See cacheExtraDDInfo()

Definition at line 497 of file MSIter.h.

## frequency0_p

MFrequency casacore::MSIter::frequency0_p

protected

Definition at line 499 of file MSIter.h.

## frequency_p

Vector<Double> casacore::MSIter::frequency_p

mutable protected

Definition at line 498 of file MSIter.h.

## interval_p

Double casacore::MSIter::interval_p

protected

time selection

Definition at line 467 of file MSIter.h.

## lastArrayId_p

Int casacore::MSIter::lastArrayId_p

protected

Definition at line 440 of file MSIter.h.

## lastDataDescId_p

Int casacore::MSIter::lastDataDescId_p

protected

These variables point to the IDs of the previous iteration.

Definition at line 454 of file MSIter.h.

## lastFieldId_p

Int casacore::MSIter::lastFieldId_p

protected

Definition at line 444 of file MSIter.h.

## lastMS_p

ssize_t casacore::MSIter::lastMS_p

protected

Definition at line 437 of file MSIter.h.

## lastPolarizationId_p

Int casacore::MSIter::lastPolarizationId_p

protected

Definition at line 454 of file MSIter.h.

## lastSpectralWindowId_p

Int casacore::MSIter::lastSpectralWindowId_p

protected

Definition at line 454 of file MSIter.h.

## more_p

Bool casacore::MSIter::more_p

protected

Definition at line 455 of file MSIter.h.

Referenced by more().

## msc_p

std::shared_ptr<MSColumns> casacore::MSIter::msc_p

protected

Definition at line 438 of file MSIter.h.

Referenced by msColumns().

## newArrayId_p

Bool casacore::MSIter::newArrayId_p

protected

Definition at line 455 of file MSIter.h.

Referenced by newArray().

## newDataDescId_p

Bool casacore::MSIter::newDataDescId_p

protected

Definition at line 456 of file MSIter.h.

Referenced by newDataDescriptionId().

## newFieldId_p

Bool casacore::MSIter::newFieldId_p

protected

Definition at line 455 of file MSIter.h.

Referenced by newField().

## newMS_p

Bool casacore::MSIter::newMS_p

protected

Definition at line 455 of file MSIter.h.

Referenced by newMS().

## newPolarizationId_p

Bool casacore::MSIter::newPolarizationId_p

protected

Definition at line 456 of file MSIter.h.

Referenced by newPolarizationId().

## newSpectralWindowId_p

Bool casacore::MSIter::newSpectralWindowId_p

protected

Definition at line 455 of file MSIter.h.

Referenced by newSpectralWindow().

## nMS_p

size_t casacore::MSIter::nMS_p

protected

Definition at line 436 of file MSIter.h.

Referenced by numMS().

## phaseCenter_p

MDirection casacore::MSIter::phaseCenter_p

mutable protected

Definition at line 475 of file MSIter.h.

## polFrame_p

PolFrame casacore::MSIter::polFrame_p

mutable protected

are zero (to speed things up in a single beam case)

Definition at line 495 of file MSIter.h.

Referenced by polFrame().

## prevFirstTimeStamp_p

Double casacore::MSIter::prevFirstTimeStamp_p

mutable protected

Definition at line 476 of file MSIter.h.

## receptorAngles_p

Cube<Double> casacore::MSIter::receptorAngles_p

mutable protected

temporary retained for compatibility contain actually a reference to the first plane of receptorAngles_p

Definition at line 482 of file MSIter.h.

Referenced by receptorAngles().

## receptorAnglesFeed0_p

Matrix<Double> casacore::MSIter::receptorAnglesFeed0_p

mutable protected

cache for access functions

Definition at line 478 of file MSIter.h.

Referenced by receptorAngle().

## restFrequency_p

MFrequency casacore::MSIter::restFrequency_p

protected

Definition at line 500 of file MSIter.h.

## spwDepFeed_p

bool casacore::MSIter::spwDepFeed_p

mutable protected

Definition at line 457 of file MSIter.h.

## storeSorted_p

Bool casacore::MSIter::storeSorted_p

protected

Globally control disk storage of SORTED_TABLE.

Definition at line 464 of file MSIter.h.

## tabIter_p

Block<TableIterator* > casacore::MSIter::tabIter_p

protected

Definition at line 430 of file MSIter.h.

## tabIterAtStart_p

Block<Bool> casacore::MSIter::tabIterAtStart_p

protected

Definition at line 431 of file MSIter.h.

## telescopePosition_p

MPosition casacore::MSIter::telescopePosition_p

protected

Definition at line 501 of file MSIter.h.

Referenced by telescopePosition().

## This

MSIter* casacore::MSIter::This

protected

Definition at line 428 of file MSIter.h.

## timeComp_p

std::shared_ptr<MSInterval> casacore::MSIter::timeComp_p

protected

Definition at line 503 of file MSIter.h.

## timeInSort_p

Bool casacore::MSIter::timeInSort_p

protected

This booleans determine if given columns are part of the sorting.

Definition at line 434 of file MSIter.h.

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

- ms/MeasurementSets/MSIter.h