Source
102
102
103
103
private:
104
104
105
105
// <nothing>
106
106
107
107
};
108
108
109
109
110
110
111
111
// **********************************************************
112
-
// X: position angle calibration (for circulars!)
112
+
// X: Cross-hand phase (generic)
113
113
//
114
114
class XJones : public SolvableVisJones {
115
115
public:
116
116
117
117
// Constructor
118
118
XJones(VisSet& vs);
119
119
XJones(casacore::String msname,casacore::Int MSnAnt,casacore::Int MSnSpw);
120
120
XJones(const MSMetaInfoForCal& msmc);
121
121
XJones(const casacore::Int& nAnt);
122
122
303
303
virtual casacore::String longTypeName() { return "Xfparang Jones (X-Y phase)"; };
304
304
305
305
// This is the freq-dep version of XparangJones
306
306
// (this is the ONLY fundamental difference from XparangJones)
307
307
virtual casacore::Bool freqDepPar() { return true; };
308
308
309
309
310
310
};
311
311
312
312
313
+
// **********************************************************
314
+
// PosAng: Basis-agnostic position angle
315
+
//
316
+
class PosAngJones : public XJones {
317
+
public:
318
+
319
+
// Constructor
320
+
PosAngJones(VisSet& vs);
321
+
PosAngJones(casacore::String msname,casacore::Int MSnAnt,casacore::Int MSnSpw);
322
+
PosAngJones(const MSMetaInfoForCal& msmc);
323
+
PosAngJones(const casacore::Int& nAnt);
324
+
325
+
virtual ~PosAngJones();
326
+
327
+
// PosAng had casacore::Float parameter
328
+
virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; };
329
+
330
+
// Return the type enum (this is its position in the ME)
331
+
virtual Type type() { return VisCal::C; };
332
+
333
+
// Return type name as string
334
+
virtual casacore::String typeName() { return "PosAng Jones"; };
335
+
virtual casacore::String longTypeName() { return "PosAng Jones (antenna-based)"; };
336
+
337
+
// Type of Jones matrix (basis-sensitive)
338
+
virtual Jones::JonesType jonesType() { return jonestype_; };
339
+
340
+
// FreqDep
341
+
virtual casacore::Bool freqDepPar() { return true; };
342
+
343
+
// Local setApply
344
+
using XJones::setApply;
345
+
virtual void setApply(const casacore::Record& apply);
346
+
347
+
// Local setSolve
348
+
using XJones::setSolve;
349
+
void setSolve(const casacore::Record& solvepar);
350
+
351
+
// PosAng is NOT normalizable by the model (per correlation)
352
+
virtual casacore::Bool normalizable() { return false; };
353
+
// ...but we can divide by the I model!
354
+
virtual casacore::Bool divideByStokesIModelForSolve() { return true; };
355
+
356
+
// X generically gathers, but solves for itself per solution
357
+
virtual casacore::Bool useGenericGatherForSolve() { return true; };
358
+
virtual casacore::Bool useGenericSolveOne() { return false; }
359
+
360
+
// Actually do the solve on ths SDBs
361
+
virtual void selfSolveOne(SDBList& sdbs) { this->solveOne(sdbs); };
362
+
363
+
364
+
protected:
365
+
366
+
// PosAng has just 1 float parameter, storing an angle
367
+
virtual casacore::Int nPar() { return 1; };
368
+
369
+
// Jones matrix elements are NOT trivial
370
+
virtual casacore::Bool trivialJonesElem() { return false; };
371
+
372
+
// Detect basis for this vb
373
+
virtual void syncMeta(const VisBuffer& vb);
374
+
virtual void syncMeta2(const vi::VisBuffer2& vb);
375
+
376
+
// Calculate the PosAng matrix for all ants
377
+
// Don't use XJones::calcAllJones!!
378
+
virtual void calcAllJones(); // { VisJones::calcAllJones(); };
379
+
380
+
// Calculate a single PosAngJones matrix
381
+
virtual void calcOneJonesRPar(casacore::Vector<casacore::Complex>& mat, casacore::Vector<casacore::Bool>& mOk,
382
+
const casacore::Vector<casacore::Float>& par, const casacore::Vector<casacore::Bool>& pOk );
383
+
384
+
virtual void solveOne(SDBList& sdbs);
385
+
386
+
private:
387
+
388
+
// X gathers/solves for itself
389
+
virtual void selfGatherAndSolve(VisSet& vs, VisEquation& ve) { newselfSolve(vs,ve); };
390
+
virtual void newselfSolve(VisSet& , VisEquation& ) { throw(casacore::AipsError("PosAngJones::newselfsolve(vs,ve) NYI")); }; // new supports combine
391
+
392
+
// When genericall gathering, solve using first VB only in VBGA
393
+
virtual void selfSolveOne(VisBuffGroupAcc& vbga) { this->solveOneVB(vbga(0)); };
394
+
395
+
// Solve in one VB for the position angle
396
+
virtual void solveOneVB(const VisBuffer& ) { throw(casacore::AipsError("PosAngJones::solveOneVB(vb) NYI")); };
397
+
virtual void solveOneSDB(SolveDataBuffer& ) { throw(casacore::AipsError("PosAngJones::solveOneSDB(sdb) NYI")); };
398
+
399
+
// We sense basis in setMeta, and this sets the matrix type
400
+
Jones::JonesType jonestype_;
401
+
402
+
};
403
+
404
+
405
+
406
+
407
+
408
+
313
409
314
410
315
411
316
412
// X-Y phase for ALMA -- ORIGINAL ad hoc version as GJones specialization, but in Xf position
317
413
class GlinXphJones : public GJones {
318
414
public:
319
415
320
416
// Constructor
321
417
GlinXphJones(VisSet& vs);
322
418
GlinXphJones(casacore::String msname,casacore::Int MSnAnt,casacore::Int MSnSpw);