[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);
|
---|
| 45 | void addSkyTable(const std::string &c);
|
---|
| 46 | void addTsysTable(const std::string &c);
|
---|
| 47 | void setMode(const std::string &mode);
|
---|
| 48 | void setTimeInterpolation(const std::string &interp, int order=-1);
|
---|
| 49 | void setFrequencyInterpolation(const std::string &interp, int order=-1);
|
---|
| 50 | void setTsysSpw(const std::vector<int> &spwlist);
|
---|
| 51 | void setTsysTransfer(unsigned int from,
|
---|
| 52 | const std::vector<unsigned int> &to);
|
---|
| 53 | void resetCalSetup();
|
---|
| 54 | void reset();
|
---|
| 55 |
|
---|
| 56 | void calibrate();
|
---|
| 57 | void apply();
|
---|
| 58 | void saveCaltable(const std::string &name);
|
---|
| 59 | void split(const std::string &name);
|
---|
| 60 | private:
|
---|
| 61 | STCalEnum::InterpolationType stringToInterpolationEnum(const std::string &s);
|
---|
| 62 |
|
---|
| 63 | casa::CountedPtr<STApplyCal> applicator_;
|
---|
| 64 |
|
---|
| 65 | std::vector<casa::CountedPtr<STApplyTable> > skytables_;
|
---|
| 66 | std::vector<casa::CountedPtr<STApplyTable> > tsystables_;
|
---|
| 67 |
|
---|
| 68 | casa::CountedPtr<Scantable> target_;
|
---|
| 69 |
|
---|
| 70 | casa::String calmode_;
|
---|
| 71 | std::vector<int> spwlist_;
|
---|
| 72 |
|
---|
| 73 | casa::LogIO os_;
|
---|
| 74 | };
|
---|
| 75 |
|
---|
| 76 | }
|
---|
| 77 | #endif
|
---|