Source
83
83
// Constructor/Destructor
84
84
ROCTIter(NewCalTable tab,const casacore::Block<casacore::String>& sortcol);
85
85
virtual ~ROCTIter();
86
86
87
87
// Iteration operators
88
88
void reset();
89
89
inline casacore::Bool pastEnd() { return ti_->pastEnd(); };
90
90
void next();
91
91
void next0();
92
92
93
+
// When not included in ctor tab
94
+
void setCTColumns(const NewCalTable& tab);
95
+
93
96
// Return the current table iteration
94
97
NewCalTable table() const { return NewCalTable(ti_->table()); };
95
98
96
99
casacore::Int nrow() const { return ti_->table().nrow(); };
97
100
98
101
// Column accessors
99
102
// Those methods that return scalars for data coordinates
100
103
// (e.g., thisTime(), thisField(), etc.) return the first element
101
104
// of the corresponding vector of values in the current
102
105
// iteration. This makes the most sense when the corresponding
175
178
176
179
private:
177
180
178
181
// Prohibit public use of copy, assignment
179
182
ROCTIter (const ROCTIter& other);
180
183
ROCTIter& operator= (const ROCTIter& other);
181
184
182
185
// Update phase center in MSDerivedValues
183
186
void updatePhaseCenter();
184
187
185
-
// Initialize and calculate uvw for each antenna
188
+
// Initialize and calculate uvw for each antenna.
189
+
// Based on msvis MSUVWGenerator
186
190
void initUVW();
187
-
void calculateAntennaUVW();
191
+
void updateAntennaUVW();
188
192
189
193
// Remember the sort columns...
190
194
casacore::Vector<casacore::String> sortCols_;
191
195
192
196
// If true, spw is unique per iteration, and it is
193
197
// safe to access channel axis info
194
198
casacore::Bool singleSpw_;
195
199
196
-
// The parent NewCalTable (casacore::Table) object
197
-
// (stays in scope for the life of the CTIter)
198
-
NewCalTable parentNCT_;
199
-
200
200
// Access to subtables (e.g., for frequencies)
201
-
ROCTColumns calCol_;
201
+
ROCTColumns* calCol_;
202
202
203
203
// The underlying TableIterator
204
204
casacore::TableIterator *ti_;
205
205
206
206
// Per-iteration table
207
207
NewCalTable *inct_;
208
208
209
209
// Per-iteration columns
210
210
ROCTMainColumns *iROCTMainCols_;
211
211
212
-
// For calculating axes: az, el, ha, pa, uvw
212
+
// For calculated axes
213
213
bool init_uvw_;
214
-
casacore::Int nAnt_, lastfield_;
215
-
casacore::Double lasttime_;
214
+
casacore::Int nAnt_, thisfield_, lastfield_;
215
+
casacore::Double thistime_, lasttime_;
216
216
casacore::MDirection phaseCenter_;
217
217
casacore::MEpoch epoch_;
218
218
casacore::MPosition refAntPos_;
219
-
casacore::MSDerivedValues* msd_;
220
-
casacore::MBaseline::Types baseline_type_, phasedir_type_;
219
+
casacore::MBaseline::Types baseline_type_;
221
220
casacore::Vector<casacore::MVBaseline> mvbaselines_; // ant pos rel to ant0
222
221
casacore::Vector<casacore::Vector<casacore::Double>> antennaUVW_; // [u,v,w] for each ant
223
222
};
224
223
225
224
// Writable version (limited to certain 'columns')
226
225
class CTIter : public ROCTIter
227
226
{
228
227
public:
229
228
// Constructor/Destructor
230
229
CTIter(NewCalTable tab,const casacore::Block<casacore::String>& sortcol);