Line data Source code
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 : 11 : #include <synthesis/MeasurementComponents/StandardVisCal.h> 12 : #include <casacore/casa/BasicSL/String.h> 13 : 14 : #include <synthesis/MeasurementComponents/SDDoubleCircleGainCalImpl.h> 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: 26 : SDDoubleCircleGainCal(VisSet& vs); 27 : SDDoubleCircleGainCal(const MSMetaInfoForCal& msmc); 28 : virtual ~SDDoubleCircleGainCal(); 29 : 30 : // Return type name as string (ditto) 31 0 : virtual casacore::String typeName() override { 32 0 : return "SDGAIN_OTFD"; 33 : } 34 0 : virtual casacore::String longTypeName() override { 35 0 : 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 43 0 : virtual casacore::Bool useGenericGatherForSolve() override { 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 0 : bool ret = !(USEOLDVI); 48 0 : return ret; 49 : } 50 : // Do not use generic data gathering mechanism for solve 51 0 : virtual casacore::Bool useGenericSolveOne() override { 52 0 : 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 0 : virtual casacore::Bool freqDepPar() override { return true; }; 62 : 63 : // Freq-dep Weight scaling 64 0 : virtual casacore::Bool freqDepCalWt() override { 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() override; 82 : 83 : private: 84 : template<class Accessor> 85 : void executeDoubleCircleGainCal(casacore::MeasurementSet const &ms); 86 : 87 : casacore::Double central_disk_size_; 88 : casacore::Bool smooth_; 89 : casacore::Vector<casacore::Int> currAnt_; 90 : SDDoubleCircleGainCalImpl worker_; 91 : }; 92 : 93 : } // namespace casa END 94 : 95 : #endif /* SYNTHESIS_MEASUREMENTCOMPONENTS_SDDOUBLECIRCLEGAINCAL_H_ */