casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SDDoubleCircleGainCal.h
Go to the documentation of this file.
1 /*
2  * SDDoubleCircleGainCal.h
3  *
4  * Created on: Jun 3, 2016
5  * Author: nakazato
6  */
7 
8 #ifndef SYNTHESIS_MEASUREMENTCOMPONENTS_SDDOUBLECIRCLEGAINCAL_H_
9 #define SYNTHESIS_MEASUREMENTCOMPONENTS_SDDOUBLECIRCLEGAINCAL_H_
10 
13 
15 
16 // set false if you want to use new Calibrater
17 #define USEOLDVI false
18 
19 namespace casa {
20 
21 class VisSet;
22 class VisEquation;
23 
24 class SDDoubleCircleGainCal final : public GJones {
25 public:
28  virtual ~SDDoubleCircleGainCal();
29 
30  // Return type name as string (ditto)
32  return "SDGAIN_OTFD";
33  }
34  virtual casacore::String longTypeName() override {
35  return "SDGAIN_OTFD (Single Dish gain calibration for double circle fast scan";
36  }
37 
38 // Return the parameter type
39 // so far single dish calibration is real
40 // virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; }
41 
42  // useGenericGatherForSolve must return true to migrate VI/VB2 based implementation
44  // it should finally return true, but to pass the unit test, it should return false
45  // so, at the moment, return value is configurable depending on whether it is called
46  // from old Calibrater or not
47  bool ret = !(USEOLDVI);
48  return ret;
49  }
50  // Do not use generic data gathering mechanism for solve
51  virtual casacore::Bool useGenericSolveOne() override {
52  return false;
53  }
54 
55  // Set the solving parameters
56  virtual void setSolve() override;
57  virtual void setSolve(const casacore::Record& solve) override;
58 
59  // This is the freq-dep version of G
60  // (this is the ONLY fundamental difference from G)
61  virtual casacore::Bool freqDepPar() { return true; };
62 
63  // Freq-dep Weight scaling
64  virtual casacore::Bool freqDepCalWt() { return true; };
65 
66  // Report solve info/params, e.g., for logging
67  virtual casacore::String solveinfo() override;
68 
69  // Post solve tinkering
70  virtual void globalPostSolveTinker() override;
71 
72  // Self- gather and/or solve prototypes
73  // (triggered by useGenericGatherForSolve=F or useGenericSolveOne=F)
74  virtual void selfGatherAndSolve(VisSet& vs, VisEquation& ve) override;
75  virtual void selfSolveOne(SDBList &sdbs) override;
76 
77  // specific keepNCT
78  virtual void keepNCT() override;
79 
80 protected:
81  virtual void syncWtScale();
82 
83 private:
84  template<class Accessor>
86 
91 };
92 
93 } // namespace casa END
94 
95 #endif /* SYNTHESIS_MEASUREMENTCOMPONENTS_SDDOUBLECIRCLEGAINCAL_H_ */
virtual casacore::String typeName()
Return type name as string (ditto)
#define USEOLDVI
set false if you want to use new Calibrater
void executeDoubleCircleGainCal(casacore::MeasurementSet const &ms)
virtual casacore::Bool freqDepPar()
This is the freq-dep version of G (this is the ONLY fundamental difference from G) ...
virtual void globalPostSolveTinker() override
Post solve tinkering.
virtual void keepNCT() override
specific keepNCT
virtual casacore::String longTypeName() override
double Double
Definition: aipstype.h:55
casacore::Vector< casacore::Int > currAnt_
virtual void syncWtScale()
Synchronize weight scale factors.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual void selfSolveOne(SDBList &sdbs) override
virtual void selfGatherAndSolve(VisSet &vs, VisEquation &ve) override
Self- gather and/or solve prototypes (triggered by useGenericGatherForSolve=F or useGenericSolveOne=F...
virtual void setSolve() override
Set the solving parameters.
A Table intended to hold astronomical data (a set of Measurements).
virtual casacore::Bool useGenericGatherForSolve() override
Return the parameter type so far single dish calibration is real virtual VisCalEnum::VCParType parTyp...
virtual casacore::Bool useGenericSolveOne() override
Do not use generic data gathering mechanism for solve.
const MSMetaInfoForCal & msmc() const
Access to the MSMetaInfoForCal (throws if none)
Definition: VisCal.h:338
virtual casacore::Bool freqDepCalWt()
Freq-dep Weight scaling.
SDDoubleCircleGainCalImpl worker_
casacore::Vector< T > solve(const casacore::Matrix< T > &A, const casacore::Vector< T > &y, double &ferr, double &berr)
Given a matrix &quot;A&quot;, and given some vector &quot;y&quot; which is the right hand side of the equation &quot;Ax=y&quot;...
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual casacore::String solveinfo() override
Report solve info/params, e.g., for logging.