[2742] | 1 | //
|
---|
| 2 | // C++ Interface: CalibrationManager
|
---|
| 3 | //
|
---|
| 4 | // Description:
|
---|
| 5 | //
|
---|
| 6 | //
|
---|
| 7 | // Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp>, (C) 2012
|
---|
| 8 | //
|
---|
| 9 | // Copyright: See COPYING file that comes with this distribution
|
---|
| 10 | //
|
---|
| 11 | //
|
---|
| 12 | #ifndef ASAP_CALIBRATION_MANAGER_H
|
---|
| 13 | #define ASAP_CALIBRATION_MANAGER_H
|
---|
| 14 |
|
---|
| 15 | #include <string>
|
---|
| 16 | #include <vector>
|
---|
| 17 |
|
---|
| 18 | //#include <boost/scoped_ptr>
|
---|
| 19 |
|
---|
| 20 | #include <casa/BasicSL/String.h>
|
---|
| 21 | #include <casa/Utilities/CountedPtr.h>
|
---|
| 22 | #include <casa/Logging/LogIO.h>
|
---|
| 23 |
|
---|
| 24 | #include "ScantableWrapper.h"
|
---|
| 25 | #include "STApplyCal.h"
|
---|
| 26 | #include "STCalTsys.h"
|
---|
| 27 | #include "STCalibration.h"
|
---|
| 28 | #include "STCalEnum.h"
|
---|
| 29 |
|
---|
| 30 | namespace asap {
|
---|
| 31 |
|
---|
| 32 | /**
|
---|
| 33 | * Class for calibration management.
|
---|
| 34 | * It also intends to be an interface for Python layer.
|
---|
| 35 | * @author TakeshiNakazato
|
---|
| 36 | */
|
---|
| 37 | class CalibrationManager {
|
---|
| 38 | public:
|
---|
| 39 | CalibrationManager();
|
---|
| 40 |
|
---|
| 41 | virtual ~CalibrationManager();
|
---|
| 42 |
|
---|
| 43 | void setScantable(ScantableWrapper &s);
|
---|
| 44 | void setScantableByName(const std::string &s);
|
---|
[2762] | 45 | void addApplyTable(const std::string &c);
|
---|
[2742] | 46 | void addSkyTable(const std::string &c);
|
---|
| 47 | void addTsysTable(const std::string &c);
|
---|
| 48 | void setMode(const std::string &mode);
|
---|
| 49 | void setTimeInterpolation(const std::string &interp, int order=-1);
|
---|
| 50 | void setFrequencyInterpolation(const std::string &interp, int order=-1);
|
---|
| 51 | void setTsysSpw(const std::vector<int> &spwlist);
|
---|
[2922] | 52 | void setTsysSpwWithRange(const casa::Record &spwlist, bool average=false);
|
---|
[2742] | 53 | void setTsysTransfer(unsigned int from,
|
---|
| 54 | const std::vector<unsigned int> &to);
|
---|
[2757] | 55 | void setCalibrationOptions(const casa::Record &options) {options_ = options;}
|
---|
[2742] | 56 | void resetCalSetup();
|
---|
| 57 | void reset();
|
---|
| 58 |
|
---|
| 59 | void calibrate();
|
---|
[2750] | 60 | void apply(bool insitu=false, bool filltsys=true);
|
---|
[2742] | 61 | void saveCaltable(const std::string &name);
|
---|
| 62 | void split(const std::string &name);
|
---|
| 63 | private:
|
---|
| 64 | STCalEnum::InterpolationType stringToInterpolationEnum(const std::string &s);
|
---|
| 65 |
|
---|
[2757] | 66 | casa::Bool isAlmaAntenna();
|
---|
| 67 |
|
---|
[2742] | 68 | casa::CountedPtr<STApplyCal> applicator_;
|
---|
| 69 |
|
---|
| 70 | std::vector<casa::CountedPtr<STApplyTable> > skytables_;
|
---|
| 71 | std::vector<casa::CountedPtr<STApplyTable> > tsystables_;
|
---|
| 72 |
|
---|
| 73 | casa::CountedPtr<Scantable> target_;
|
---|
| 74 |
|
---|
| 75 | casa::String calmode_;
|
---|
| 76 | std::vector<int> spwlist_;
|
---|
[2922] | 77 | casa::Record spwlist_withrange_;
|
---|
[2923] | 78 | bool do_average_;
|
---|
[2742] | 79 |
|
---|
| 80 | casa::LogIO os_;
|
---|
[2757] | 81 |
|
---|
| 82 | casa::Record options_;
|
---|
[2742] | 83 | };
|
---|
| 84 |
|
---|
| 85 | }
|
---|
| 86 | #endif
|
---|