// // C++ Interface: CalibrationManager // // Description: // // // Author: Takeshi Nakazato , (C) 2012 // // Copyright: See COPYING file that comes with this distribution // // #ifndef ASAP_CALIBRATION_MANAGER_H #define ASAP_CALIBRATION_MANAGER_H // ASAP // ScantableWrapper.h must be included first to avoid compiler warnings // related with _XOPEN_SOURCE #include "ScantableWrapper.h" #include "STApplyCal.h" #include "STCalTsys.h" #include "STCalibration.h" #include "STCalEnum.h" #include #include //#include #include #include #include namespace asap { /** * Class for calibration management. * It also intends to be an interface for Python layer. * @author TakeshiNakazato */ class CalibrationManager { public: CalibrationManager(); virtual ~CalibrationManager(); void setScantable(ScantableWrapper &s); void setScantableByName(const std::string &s); void addApplyTable(const std::string &c); void addSkyTable(const std::string &c); void addTsysTable(const std::string &c); void setMode(const std::string &mode); void setTimeInterpolation(const std::string &interp, int order=-1); void setFrequencyInterpolation(const std::string &interp, int order=-1); void setTsysSpw(const std::vector &spwlist); void setTsysSpwWithRange(const casacore::Record &spwlist, bool average=false); void setTsysTransfer(unsigned int from, const std::vector &to); void setCalibrationOptions(const casacore::Record &options) {options_ = options;} void resetCalSetup(); void reset(); void calibrate(); void apply(bool insitu=false, bool filltsys=true); void saveCaltable(const std::string &name); void split(const std::string &name); private: STCalEnum::InterpolationType stringToInterpolationEnum(const std::string &s); casacore::Bool isAlmaAntenna(); casacore::CountedPtr applicator_; std::vector > skytables_; std::vector > tsystables_; casacore::CountedPtr target_; casacore::String calmode_; std::vector spwlist_; casacore::Record spwlist_withrange_; bool do_average_; casacore::LogIO os_; casacore::Record options_; }; } #endif