- Circular = 0
- Circular polarization
- Linear = 1
- Linear polarization
// 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.
// 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. }
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.
Same as above with multiple MSs as input.
Copy construct. This calls the assigment operator.
Destructor
Assigment. This will reset the iterator to the origin.
Set or reset the time interval to use for iteration. You should call origin() to reset the iteration after calling this.
Reset iterator to start of data
Return False if there is no more data
Advance iterator through data
Return the current Table iteration
Return reference to the current MS
Return reference to the current ROMSColumns
Return the current MS Id (according to the order in which they appeared in the constructor)
Return true if msId has changed since last iteration
Return the current ArrayId
Return True if ArrayId has changed since last iteration
Return the current FieldId
Return the current Field Name
Return the current Source Name
Return True if FieldId/Source has changed since last iteration
Return current SpectralWindow
Return True if SpectralWindow has changed since last iteration
Return current DataDescriptionId
Return True if DataDescriptionId has changed since last iteration
Return current PolarizationId
Return True if polarization has changed since last iteration
Return the current phase center as MDirection
Return frame for polarization (returns PolFrame enum)
Return the frequencies corresponding to the DATA matrix.
Return frequency of first channel 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.
Return the rest frequency of the specified line as a Measure
Return the telescope position (if a known telescope) or the position of the first antenna (if unknown)
Return the feed configuration/leakage matrix for feed 0 on each antenna
Return the receptor angle for feed 0 on each antenna. First axis is receptor number, 2nd axis is antennaId.
Return the channel number of the first channel in the DATA. (non-zero for reference MS created by VisSet with channel selection)
Determine if the numbers in r1 are a sorted subset of those in r2