- Timestamp:
- 01/31/13 20:04:58 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/CMakeLists.txt
r2742 r2757 76 76 ${SRCDIR}/STCalibration.cpp 77 77 ${SRCDIR}/STCalSkyPSAlma.cpp 78 ${SRCDIR}/STCalSkyOtfAlma.cpp 78 79 ${SRCDIR}/STCalTsys.cpp 79 80 ${SRCDIR}/STApplyCal.cpp -
trunk/src/CalibrationManager.cpp
r2756 r2757 26 26 #include "STCalTsys.h" 27 27 #include "STCalSkyPSAlma.h" 28 #include "STCalSkyOtfAlma.h" 28 29 29 30 using namespace casa; … … 161 162 } 162 163 else if (calmode_ == "PS") { 163 // will match DV01-25, DA41-65, PM01-04, CM01-12 164 Regex reant("^(DV(0[1-9]|1[0-9]|2[0-5])|DA(4[1-9]|5[0-9]|6[0-5])|PM0[1-4]|CM(0[1-9]|1[1,2]))$"); 165 const String antname = target_->getAntennaName(); 166 if (reant.match(antname.c_str(), antname.size()) != String::npos) { 164 // // will match DV01-25, DA41-65, PM01-04, CM01-12 165 // Regex reant("^(DV(0[1-9]|1[0-9]|2[0-5])|DA(4[1-9]|5[0-9]|6[0-5])|PM0[1-4]|CM(0[1-9]|1[1,2]))$"); 166 // const String antname = target_->getAntennaName(); 167 // if (reant.match(antname.c_str(), antname.size()) != String::npos) { 168 if (isAlmaAntenna()) { 167 169 os_ << LogIO::DEBUGGING << "ALMA specific position-switch calibration." << LogIO::POST; 168 170 STCalSkyPSAlma cal(target_); … … 171 173 } 172 174 else { 173 String msg = "Calibration type " + calmode_ + " for antenna " + antname + " is not supported."; 175 String msg = "Calibration type " + calmode_ + " for non-ALMA antenna " + target_->getAntennaName() + " is not supported."; 176 os_.origin(LogOrigin("CalibrationManager","calibrate",WHERE)); 177 os_ << LogIO::SEVERE << msg << LogIO::POST; 178 throw AipsError(msg); 179 } 180 } 181 else if (calmode_ == "OTF" || calmode_ == "OTFRASTER") { 182 if (isAlmaAntenna()) { 183 os_ << LogIO::DEBUGGING << "ALMA specific position-switch calibration." << LogIO::POST; 184 STCalSkyOtfAlma cal(target_, (calmode_ == "OTFRASTER")); 185 if (!options_.empty()) 186 cal.setOption(options_); 187 cal.calibrate(); 188 skytables_.push_back(cal.applytable()); 189 } 190 else { 191 String msg = "Calibration type " + calmode_ + " for non-ALMA antenna " + target_->getAntennaName() + " is not supported."; 174 192 os_.origin(LogOrigin("CalibrationManager","calibrate",WHERE)); 175 193 os_ << LogIO::SEVERE << msg << LogIO::POST; … … 249 267 } 250 268 251 } 269 Bool CalibrationManager::isAlmaAntenna() 270 { 271 assert_<AipsError>(!target_.null(), "You have to set target scantable first."); 272 // will match DV01-25, DA41-65, PM01-04, CM01-12 273 Regex reant("^(DV(0[1-9]|1[0-9]|2[0-5])|DA(4[1-9]|5[0-9]|6[0-5])|PM0[1-4]|CM(0[1-9]|1[1,2]))$"); 274 const String antname = target_->getAntennaName(); 275 return (reant.match(antname.c_str(), antname.size()) != String::npos); 276 } 277 278 } -
trunk/src/CalibrationManager.h
r2750 r2757 51 51 void setTsysTransfer(unsigned int from, 52 52 const std::vector<unsigned int> &to); 53 void setCalibrationOptions(const casa::Record &options) {options_ = options;} 53 54 void resetCalSetup(); 54 55 void reset(); … … 60 61 private: 61 62 STCalEnum::InterpolationType stringToInterpolationEnum(const std::string &s); 63 64 casa::Bool isAlmaAntenna(); 62 65 63 66 casa::CountedPtr<STApplyCal> applicator_; … … 72 75 73 76 casa::LogIO os_; 77 78 casa::Record options_; 74 79 }; 75 80 -
trunk/src/EdgeMarker.cpp
r2617 r2757 160 160 } 161 161 162 Block<uInt> EdgeMarker::getDetectedRows() 163 { 164 uInt *p = off_.storage(); 165 return Block<uInt>(noff_, p, False); 166 } 167 162 168 CountedPtr<Scantable> EdgeMarker::get() 163 169 { -
trunk/src/EdgeMarker.h
r2613 r2757 40 40 void detect() ; 41 41 void mark() ; 42 casa::Block<casa::uInt> getDetectedRows() ; 42 43 casa::CountedPtr<Scantable> get() ; 43 44 // void reset() ; -
trunk/src/STCalSkyPSAlma.h
r2747 r2757 39 39 STCalSkyPSAlma(casa::CountedPtr<Scantable> &s); 40 40 41 ~STCalSkyPSAlma() {;}41 virtual ~STCalSkyPSAlma() {;} 42 42 43 pr ivate:44 v oid setupSelector();45 v oid fillCalTable();43 protected: 44 virtual void setupSelector(); 45 virtual void fillCalTable(); 46 46 }; 47 47 -
trunk/src/STCalibration.h
r2749 r2757 13 13 #define ASAPSTCALIBRATION_H 14 14 15 #include <memory>16 17 15 #include <casa/aips.h> 18 16 #include <casa/Arrays/Vector.h> … … 20 18 #include <casa/Utilities/CountedPtr.h> 21 19 #include <casa/Logging/LogIO.h> 20 #include <casa/Containers/Record.h> 22 21 23 22 #include <scimath/Mathematics/InterpolateArray1D.h> … … 44 43 //const STApplyTable &applytable() {return *applytable_;} 45 44 const casa::CountedPtr<STApplyTable> applytable() {return applytable_;} 45 46 void setOption(casa::Record &rec) {options_ = rec;} 47 46 48 protected: 47 49 virtual void setupSelector() = 0; … … 52 54 casa::CountedPtr<STApplyTable> applytable_; 53 55 casa::LogIO os_; 56 casa::Record options_; 54 57 }; 55 58 -
trunk/src/python_CalibrationManager.cpp
r2750 r2757 30 30 (boost::python::arg("interp"), 31 31 boost::python::arg("order")=-1)) 32 .def("set_calibration_options", &CalibrationManager::setCalibrationOptions) 32 33 .def("reset", &CalibrationManager::reset) 33 34 .def("set_tsys_spw", &CalibrationManager::setTsysSpw)
Note:
See TracChangeset
for help on using the changeset viewer.