casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
casacore::MSIter Class Reference

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. 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 MeasurementSet &ms, const std::vector< std::pair< String, CountedPtr< 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. More...
 
 MSIter (const Block< MeasurementSet > &mss, const std::vector< std::pair< String, CountedPtr< BaseCompare >>> &sortColumns)
 Same as above with multiple MSs as input. More...
 
 MSIter (const MSIter &other)
 Copy construct. More...
 
MSIterclone () const
 
virtual ~MSIter ()
 Destructor. More...
 
MSIteroperator= (const MSIter &other)
 Assigment. More...
 
void setInterval (Double timeInterval)
 Set or reset the time interval to use for iteration. More...
 
virtual void origin ()
 Reset iterator to start of data. More...
 
virtual Bool more () const
 Return False if there is no more data. More...
 
virtual MSIteroperator++ (int)
 Advance iterator through data. More...
 
virtual MSIteroperator++ ()
 
const StringkeyChange () const
 Report Name of slowest column that changes at end of current iteration. More...
 
Table table () const
 Return the current Table iteration. More...
 
const MSms () const
 Return reference to the current MS. More...
 
const MSColumnsmsColumns () const
 Return reference to the current MSColumns. More...
 
size_t 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...
 
const ScalarColumn< Int > & colArrayIds () const
 Return the current ArrayIds for all rows in this iteration. More...
 
const ScalarColumn< Int > & colFieldIds () const
 Return the current FieldIds for all rows in this iteration. More...
 
const ScalarColumn< Int > & colDataDescriptionIds () const
 Return the current DataDescriptionIds for all rows in this iteration. More...
 
Int arrayId () const
 Return the ArrayId of the first element in this iteration. More...
 
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. More...
 
Int fieldId () const
 Return the FieldId of the first element in this iteration. More...
 
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. More...
 
Int spectralWindowId () const
 Return SpectralWindow of the first element in this iteration. More...
 
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. More...
 
Int dataDescriptionId () const
 Return DataDescriptionId of the first element in this iteration. More...
 
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. More...
 
Int polarizationId () const
 Return PolarizationId of the first element in this iteration. More...
 
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. More...
 
Int polFrame () const
 Return frame for polarization of the first element in this iteration. More...
 
const Vector< Double > & frequency () const
 Return the frequencies corresponding to the DATA matrix. More...
 
const MFrequencyfrequency0 () const
 Return frequency of first channel of the first element in iteration with reference frame as a Measure. More...
 
const MFrequencyrestFrequency (Int line=0) const
 Return the rest frequency of the specified line as a Measure. More...
 
const MPositiontelescopePosition () 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...
 
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...
 
size_t numMS () const
 Get the number of actual ms's associated wth this iterator. More...
 
const MSms (const size_t n) const
 Get a reference to the nth ms in the list of ms associated with this iterator. More...
 
const MDirectionphaseCenter () 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 StringfieldName () const
 return FIELD table associated current fieldname and sourcename respectively More...
 
const StringsourceName () const
 

Protected Member Functions

void construct (const Block< Int > &sortColumns, Bool addDefaultSortColumns)
 handle the construction details More...
 
void construct (const std::vector< std::pair< String, CountedPtr< BaseCompare >>> &sortColumns)
 handle the construction details using explicit comparison functions More...
 
void advance ()
 advance the iteration More...
 
virtual void setState ()
 set the iteration state More...
 
void setMSInfo ()
 
void setArrayInfo ()
 
void setFeedInfo () const
 
void cacheCurrentDDInfo () const
 Store the current DD, SPW, Pol ID. More...
 
void cacheExtraDDInfo () const
 Store extra info related to the DD. More...
 
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. More...
 

Protected Attributes

MSIterThis
 
Block< MeasurementSetbms_p
 
PtrBlock< TableIterator * > tabIter_p
 
Block< BooltabIterAtStart_p
 
Bool timeInSort_p
 This booleans determine if given columns are part of the sorting. More...
 
Bool arrayInSort_p
 
Bool ddInSort_p
 
Bool fieldInSort_p
 
size_t nMS_p
 
size_t curMS_p
 
ssize_t lastMS_p
 
CountedPtr< MSColumnsmsc_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. More...
 
Int curSpectralWindowIdFirst_p
 
Int curPolarizationIdFirst_p
 
Int lastDataDescId_p
 These variables point to the IDs of the previous iteration. More...
 
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. More...
 
Bool storeSorted_p
 Globally control disk storage of SORTED_TABLE. More...
 
Double interval_p
 time selection More...
 
ScalarColumn< IntcolDataDesc_p
 This column is mutable since it is only attached when it is neccesary to read the DD Ids. More...
 
ScalarColumn< IntcolField_p
 
ScalarColumn< IntcolArray_p
 
MDirection phaseCenter_p
 
Double prevFirstTimeStamp_p
 
Matrix< DoublereceptorAnglesFeed0_p
 cache for access functions More...
 
Cube< DoublereceptorAngles_p
 temporary retained for compatibility contain actually a reference to the first plane of receptorAngles_p More...
 
Vector< SquareMatrix< Complex, 2 > > CJonesFeed0_p
 
Matrix< SquareMatrix< Complex, 2 > > CJones_p
 similar to receptorAngle_p More...
 
Vector< StringantennaMounts_p
 
Cube< RigidVector< Double, 2 > > beamOffsets_p
 antenna (e.g. More...
 
Bool allBeamOffsetsZero_p
 each element of the cube in radians) in the antenna coordinate system. More...
 
PolFrame polFrame_p
 are zero (to speed things up in a single beam case) More...
 
Bool freqCacheOK_p
 hence mutable. More...
 
Vector< Doublefrequency_p
 
MFrequency frequency0_p
 
MFrequency restFrequency_p
 
MPosition telescopePosition_p
 
CountedPtr< MSIntervaltimeComp_p
 

Detailed Description

An iterator class for MeasurementSets.

Intended use:

Public interface

Prerequisite

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.

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

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

Definition at line 161 of file MSIter.h.

Member Enumeration Documentation

Enumerator
Circular 

Circular polarization.

Linear 

Linear polarization.

Definition at line 164 of file MSIter.h.

Constructor & Destructor Documentation

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.

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.

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.

casacore::MSIter::MSIter ( const MeasurementSet ms,
const std::vector< std::pair< String, CountedPtr< 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.

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

Same as above with multiple MSs as input.

casacore::MSIter::MSIter ( const MSIter other)

Copy construct.

This calls the assigment operator.

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

Destructor.

Member Function Documentation

void casacore::MSIter::advance ( )
protected

advance the iteration

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

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

Definition at line 557 of file MSIter.h.

References allBeamOffsetsZero_p, feedInfoCached_p, and setFeedInfo().

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

Return a string mount identifier for each antenna.

Definition at line 553 of file MSIter.h.

References antennaMounts_p.

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

Return the ArrayId of the first element in this iteration.

Definition at line 527 of file MSIter.h.

References curArrayIdFirst_p.

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

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

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 545 of file MSIter.h.

References CJonesFeed0_p, feedInfoCached_p, and setFeedInfo().

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 547 of file MSIter.h.

References CJones_p, feedInfoCached_p, and setFeedInfo().

MSIter* casacore::MSIter::clone ( ) const
const ScalarColumn< Int > & casacore::MSIter::colArrayIds ( ) const
inline

Return the current ArrayIds for all rows in this iteration.

Definition at line 520 of file MSIter.h.

References colArray_p.

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

Return the current DataDescriptionIds for all rows in this iteration.

Definition at line 524 of file MSIter.h.

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

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

Return the current FieldIds for all rows in this iteration.

Definition at line 522 of file MSIter.h.

References colField_p.

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

handle the construction details

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

handle the construction details using explicit comparison functions

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

Return DataDescriptionId of the first element in this iteration.

Definition at line 535 of file MSIter.h.

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

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

Return the FieldId of the first element in this iteration.

Definition at line 528 of file MSIter.h.

References curFieldIdFirst_p, and setFieldInfo().

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

return FIELD table associated current fieldname and sourcename respectively

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

Return the frequencies corresponding to the DATA matrix.

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.

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 555 of file MSIter.h.

References beamOffsets_p, feedInfoCached_p, and setFeedInfo().

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.

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.

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

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

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

Return False if there is no more data.

Definition at line 509 of file MSIter.h.

References more_p.

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

Return reference to the current MS.

Definition at line 511 of file MSIter.h.

References bms_p, and curMS_p.

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

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

Return reference to the current MSColumns.

Definition at line 512 of file MSIter.h.

References msc_p.

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 518 of file MSIter.h.

References curMS_p.

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 514 of file MSIter.h.

References newArrayId_p.

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 539 of file MSIter.h.

References newDataDescId_p.

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 515 of file MSIter.h.

References newFieldId_p.

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

Return true if msId has changed since last iteration.

Definition at line 513 of file MSIter.h.

References newMS_p.

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 538 of file MSIter.h.

References newPolarizationId_p.

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 516 of file MSIter.h.

References newSpectralWindowId_p.

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

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

Definition at line 519 of file MSIter.h.

References nMS_p.

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

Advance iterator through data.

virtual MSIter& casacore::MSIter::operator++ ( )
virtual
MSIter& casacore::MSIter::operator= ( const MSIter other)

Assigment.

This will reset the iterator to the origin.

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

Reset iterator to start of data.

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

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.

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

Return PolarizationId of the first element in this iteration.

Definition at line 532 of file MSIter.h.

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

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

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

Returns
PolFrame enum

Definition at line 540 of file MSIter.h.

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

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 549 of file MSIter.h.

References feedInfoCached_p, receptorAnglesFeed0_p, and setFeedInfo().

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 551 of file MSIter.h.

References feedInfoCached_p, receptorAngles_p, and setFeedInfo().

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

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

void casacore::MSIter::setArrayInfo ( )
protected
void casacore::MSIter::setFeedInfo ( ) const
protected
void casacore::MSIter::setFieldInfo ( ) const
protected

Referenced by fieldId().

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.

void casacore::MSIter::setMSInfo ( )
protected
virtual void casacore::MSIter::setState ( )
protectedvirtual

set the iteration state

const String& casacore::MSIter::sourceName ( ) const
Int casacore::MSIter::spectralWindowId ( ) const
inline

Return SpectralWindow of the first element in this iteration.

Definition at line 529 of file MSIter.h.

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

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

Return the current Table iteration.

Definition at line 510 of file MSIter.h.

References curTable_p.

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 543 of file MSIter.h.

References telescopePosition_p.

Member Data Documentation

Bool casacore::MSIter::allBeamOffsetsZero_p
mutableprotected

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

Cube axes are: receptor, antenna, feed.

Definition at line 494 of file MSIter.h.

Referenced by allBeamOffsetsZero().

Vector<String> casacore::MSIter::antennaMounts_p
protected

Definition at line 488 of file MSIter.h.

Referenced by antennaMounts().

Bool casacore::MSIter::arrayInSort_p
protected

Definition at line 436 of file MSIter.h.

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

antenna (e.g.

EQUATORIAL, ALT-AZ,...)

Definition at line 490 of file MSIter.h.

Referenced by getBeamOffsets().

Block<MeasurementSet> casacore::MSIter::bms_p
protected

Definition at line 431 of file MSIter.h.

Referenced by ms().

bool casacore::MSIter::checkFeed_p
mutableprotected

Definition at line 459 of file MSIter.h.

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

similar to receptorAngle_p

Definition at line 487 of file MSIter.h.

Referenced by CJonesAll().

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

Definition at line 485 of file MSIter.h.

Referenced by CJones().

ScalarColumn<Int> casacore::MSIter::colArray_p
protected

Definition at line 475 of file MSIter.h.

Referenced by colArrayIds().

ScalarColumn<Int> casacore::MSIter::colDataDesc_p
mutableprotected

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 474 of file MSIter.h.

Referenced by colDataDescriptionIds().

ScalarColumn<Int> casacore::MSIter::colField_p
mutableprotected

Definition at line 474 of file MSIter.h.

Referenced by colFieldIds().

Int casacore::MSIter::curArrayIdFirst_p
protected

Definition at line 442 of file MSIter.h.

Referenced by arrayId().

Int casacore::MSIter::curDataDescIdFirst_p
mutableprotected

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 453 of file MSIter.h.

Referenced by colDataDescriptionIds(), and dataDescriptionId().

Int casacore::MSIter::curFieldIdFirst_p
mutableprotected

Definition at line 445 of file MSIter.h.

Referenced by fieldId().

String casacore::MSIter::curFieldNameFirst_p
mutableprotected

Definition at line 443 of file MSIter.h.

size_t casacore::MSIter::curMS_p
protected

Definition at line 438 of file MSIter.h.

Referenced by ms(), and msId().

Int casacore::MSIter::curPolarizationIdFirst_p
mutableprotected

Definition at line 453 of file MSIter.h.

Referenced by polarizationId(), and polFrame().

Int casacore::MSIter::curSourceIdFirst_p
protected

Definition at line 442 of file MSIter.h.

String casacore::MSIter::curSourceNameFirst_p
protected

Definition at line 444 of file MSIter.h.

Int casacore::MSIter::curSpectralWindowIdFirst_p
mutableprotected

Definition at line 453 of file MSIter.h.

Referenced by spectralWindowId().

Table casacore::MSIter::curTable_p
protected

Definition at line 441 of file MSIter.h.

Referenced by table().

Bool casacore::MSIter::ddInSort_p
protected

Definition at line 436 of file MSIter.h.

bool casacore::MSIter::feedInfoCached_p
mutableprotected

Variable to know whether the feed info is already computed.

Definition at line 462 of file MSIter.h.

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

Bool casacore::MSIter::fieldInSort_p
protected

Definition at line 436 of file MSIter.h.

Bool casacore::MSIter::freqCacheOK_p
mutableprotected

hence mutable.

See cacheExtraDDInfo()

Definition at line 499 of file MSIter.h.

MFrequency casacore::MSIter::frequency0_p
protected

Definition at line 501 of file MSIter.h.

Vector<Double> casacore::MSIter::frequency_p
mutableprotected

Definition at line 500 of file MSIter.h.

Double casacore::MSIter::interval_p
protected

time selection

Definition at line 469 of file MSIter.h.

Int casacore::MSIter::lastArrayId_p
protected

Definition at line 442 of file MSIter.h.

Int casacore::MSIter::lastDataDescId_p
protected

These variables point to the IDs of the previous iteration.

Definition at line 456 of file MSIter.h.

Int casacore::MSIter::lastFieldId_p
protected

Definition at line 446 of file MSIter.h.

ssize_t casacore::MSIter::lastMS_p
protected

Definition at line 439 of file MSIter.h.

Int casacore::MSIter::lastPolarizationId_p
protected

Definition at line 456 of file MSIter.h.

Int casacore::MSIter::lastSpectralWindowId_p
protected

Definition at line 456 of file MSIter.h.

Bool casacore::MSIter::more_p
protected

Definition at line 457 of file MSIter.h.

Referenced by more().

CountedPtr<MSColumns> casacore::MSIter::msc_p
protected

Definition at line 440 of file MSIter.h.

Referenced by msColumns().

Bool casacore::MSIter::newArrayId_p
protected

Definition at line 457 of file MSIter.h.

Referenced by newArray().

Bool casacore::MSIter::newDataDescId_p
protected

Definition at line 457 of file MSIter.h.

Referenced by newDataDescriptionId().

Bool casacore::MSIter::newFieldId_p
protected

Definition at line 457 of file MSIter.h.

Referenced by newField().

Bool casacore::MSIter::newMS_p
protected

Definition at line 457 of file MSIter.h.

Referenced by newMS().

Bool casacore::MSIter::newPolarizationId_p
protected

Definition at line 457 of file MSIter.h.

Referenced by newPolarizationId().

Bool casacore::MSIter::newSpectralWindowId_p
protected

Definition at line 457 of file MSIter.h.

Referenced by newSpectralWindow().

size_t casacore::MSIter::nMS_p
protected

Definition at line 438 of file MSIter.h.

Referenced by numMS().

MDirection casacore::MSIter::phaseCenter_p
mutableprotected

Definition at line 477 of file MSIter.h.

PolFrame casacore::MSIter::polFrame_p
mutableprotected

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

Definition at line 497 of file MSIter.h.

Referenced by polFrame().

Double casacore::MSIter::prevFirstTimeStamp_p
mutableprotected

Definition at line 478 of file MSIter.h.

Cube<Double> casacore::MSIter::receptorAngles_p
mutableprotected

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

Definition at line 484 of file MSIter.h.

Referenced by receptorAngles().

Matrix<Double> casacore::MSIter::receptorAnglesFeed0_p
mutableprotected

cache for access functions

Definition at line 480 of file MSIter.h.

Referenced by receptorAngle().

MFrequency casacore::MSIter::restFrequency_p
protected

Definition at line 502 of file MSIter.h.

bool casacore::MSIter::spwDepFeed_p
mutableprotected

Definition at line 459 of file MSIter.h.

Bool casacore::MSIter::storeSorted_p
protected

Globally control disk storage of SORTED_TABLE.

Definition at line 466 of file MSIter.h.

PtrBlock<TableIterator* > casacore::MSIter::tabIter_p
protected

Definition at line 432 of file MSIter.h.

Block<Bool> casacore::MSIter::tabIterAtStart_p
protected

Definition at line 433 of file MSIter.h.

MPosition casacore::MSIter::telescopePosition_p
protected

Definition at line 503 of file MSIter.h.

Referenced by telescopePosition().

MSIter* casacore::MSIter::This
protected

Definition at line 430 of file MSIter.h.

CountedPtr<MSInterval> casacore::MSIter::timeComp_p
protected

Definition at line 505 of file MSIter.h.

Bool casacore::MSIter::timeInSort_p
protected

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

Definition at line 436 of file MSIter.h.


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