- Timestamp:
- 01/22/13 19:01:34 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 3 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/CMakeLists.txt
r2739 r2742 80 80 ${SRCDIR}/Calibrator.cpp 81 81 ${SRCDIR}/PSAlmaCalibrator.cpp 82 ${SRCDIR}/STBaselineTable.cpp ) 82 ${SRCDIR}/STBaselineTable.cpp 83 ${SRCDIR}/CalibrationManager.cpp ) 83 84 84 85 set( ASAP_PYSRCS … … 105 106 ${SRCDIR}/python_PlotHelper.cpp 106 107 ${SRCDIR}/python_STSideBandSep.cpp 108 ${SRCDIR}/python_CalibrationManager.cpp 107 109 ${SRCDIR}/python_asap.cpp ) 108 110 -
trunk/src/STApplyCal.cpp
r2735 r2742 65 65 caltype_ = STCalEnum::NoType; 66 66 doTsys_ = False; 67 iTime_ = STCalEnum::DefaultInterpolation; 68 iFreq_ = STCalEnum::DefaultInterpolation; 67 69 } 68 70 69 71 void STApplyCal::reset() 70 72 { 73 // call init 74 init(); 75 76 // clear apply tables 77 // do not delete object here 78 skytable_.resize(0); 79 tsystable_.resize(0); 80 81 // clear mapping for Tsys transfer 82 spwmap_.clear(); 83 84 // reset selector 85 sel_.reset(); 86 87 // delete interpolators 88 interpolatorT_ = 0; 89 interpolatorS_ = 0; 90 interpolatorF_ = 0; 91 92 // clear working scantable 93 work_ = 0; 94 95 // clear calibrator 96 calibrator_ = 0; 71 97 } 72 98 … … 139 165 } 140 166 141 void STApplyCal::apply(Bool insitu )167 void STApplyCal::apply(Bool insitu, Bool filltsys) 142 168 { 143 169 os_.origin(LogOrigin("STApplyCal","apply",WHERE)); … … 202 228 void STApplyCal::doapply(uInt beamno, uInt ifno, uInt polno, 203 229 Vector<uInt> &rows, 204 Vector<uInt> &skylist) 230 Vector<uInt> &skylist, 231 Bool filltsys) 205 232 { 206 233 os_.origin(LogOrigin("STApplyCal","doapply",WHERE)); … … 379 406 //os_ << "calibrated=" << calibrator_->getCalibrated() << LogIO::POST; 380 407 spCol.put(irow, calibrator_->getCalibrated()); 381 tsysCol.put(irow, iTsys); 408 if (filltsys) 409 tsysCol.put(irow, iTsys); 382 410 } 383 411 … … 421 449 void STApplyCal::save(const String &name) 422 450 { 423 if (work_.null()) 424 return; 451 assert(!work_.null()); 425 452 426 453 work_->setSelection(sel_); -
trunk/src/STApplyCal.h
r2735 r2742 17 17 #include <vector> 18 18 19 #include <casa/ Containers/Block.h>19 #include <casa/Utilities/CountedPtr.h> 20 20 #include <casa/Arrays/Vector.h> 21 21 #include <casa/Logging/LogIO.h> … … 66 66 67 67 // apply tables 68 void apply(casa::Bool insitu=true );68 void apply(casa::Bool insitu=true, casa::Bool filltsys=false); 69 69 70 70 // split target data and store it to disk … … 87 87 void doapply(casa::uInt beamno, casa::uInt ifno, casa::uInt polno, 88 88 casa::Vector<casa::uInt> &rows, 89 casa::Vector<casa::uInt> &skylist); 89 casa::Vector<casa::uInt> &skylist, 90 casa::Bool filltsys=false); 90 91 91 92 // get frequency information from FREQUENCIES subtable -
trunk/src/STCalEnum.h
r2727 r2742 30 30 class STCalEnum { 31 31 public: 32 enum InterpolationType {NearestInterpolation = 0, 32 enum InterpolationType {DefaultInterpolation = 0, 33 NearestInterpolation, 33 34 LinearInterpolation, 34 35 PolynomialInterpolation, -
trunk/src/STCalSkyPSAlma.cpp
r2720 r2742 29 29 } 30 30 31 void STCalSkyPSAlma:: calibrate()31 void STCalSkyPSAlma::setupSelector() 32 32 { 33 sel_.reset(); 33 34 vector<int> types(1,SrcType::PSOFF); 34 STSelector selOrg = scantable_->getSelection(); 35 STSelector sel; 36 sel.setTypes(types); 37 scantable_->setSelection(sel); 38 39 fillCalTable(); 40 41 scantable_->setSelection(selOrg); 35 sel_.setTypes(types); 42 36 } 43 37 -
trunk/src/STCalSkyPSAlma.h
r2703 r2742 29 29 #include "STCalSkyTable.h" 30 30 31 class CalibrationManager; 31 32 32 33 namespace asap { … … 37 38 */ 38 39 class STCalSkyPSAlma : public STCalibration { 40 41 friend class CalibrationManager; 42 39 43 public: 40 44 STCalSkyPSAlma(casa::CountedPtr<Scantable> &s); 41 45 42 virtual void calibrate();43 44 46 ~STCalSkyPSAlma() {;} 47 45 48 private: 49 void setupSelector(); 46 50 void fillCalTable(); 47 51 }; -
trunk/src/STCalSkyTable.h
r2720 r2742 58 58 59 59 //casa::Vector<casa::Double> getBaseFrequency(casa::uInt whichrow); 60 60 61 private: 61 62 static const casa::String name_; -
trunk/src/STCalTsys.cpp
r2720 r2742 32 32 } 33 33 34 void STCalTsys:: calibrate()34 void STCalTsys::setupSelector() 35 35 { 36 STSelector selOrg = scantable_->getSelection(); 37 STSelector sel; 38 sel.setIFs(iflist_); 39 scantable_->setSelection(sel); 40 41 fillCalTable(); 42 43 scantable_->setSelection(selOrg); 36 sel_.reset(); 37 sel_.setIFs(iflist_); 44 38 } 45 39 -
trunk/src/STCalTsys.h
r2703 r2742 30 30 #include "STCalTsysTable.h" 31 31 32 class CalibrationManager; 32 33 33 34 namespace asap { … … 38 39 */ 39 40 class STCalTsys : public STCalibration { 41 42 friend class CalibrationManager; 43 40 44 public: 41 45 STCalTsys(casa::CountedPtr<Scantable> &s, vector<int> &iflist); 42 46 43 virtual void calibrate();44 45 47 ~STCalTsys() {;} 48 46 49 private: 50 void setupSelector(); 47 51 void fillCalTable(); 48 52 -
trunk/src/STCalibration.cpp
r2703 r2742 22 22 } 23 23 24 void STCalibration::calibrate() 25 { 26 STSelector selOrg = scantable_->getSelection(); 27 setupSelector(); 28 scantable_->setSelection(sel_); 29 30 fillCalTable(); 31 32 scantable_->setSelection(selOrg); 24 33 } 34 35 } -
trunk/src/STCalibration.h
r2703 r2742 26 26 #include "STApplyTable.h" 27 27 28 class CalibrationManager; 28 29 29 30 namespace asap { … … 34 35 */ 35 36 class STCalibration { 37 38 friend class CalibrationManager; 39 36 40 public: 37 41 STCalibration(casa::CountedPtr<Scantable> &s); 38 42 39 v irtual void calibrate() = 0;43 void calibrate(); 40 44 41 45 virtual ~STCalibration() {;} 42 46 43 47 void save(casa::String name) {applytable_->save(name);} 48 const STApplyTable &applytable() {return *applytable_;} 44 49 protected: 50 virtual void setupSelector() = 0; 51 virtual void fillCalTable() = 0; 52 53 STSelector sel_; 45 54 casa::CountedPtr<Scantable> scantable_; 46 55 casa::CountedPtr<STApplyTable> applytable_; -
trunk/src/python_asap.cpp
r2707 r2742 90 90 asap::python::python_PlotHelper(); 91 91 asap::python::python_STSideBandSep(); 92 asap::python::python_CalibrationManager(); 92 93 93 94 #ifndef HAVE_LIBPYRAP -
trunk/src/python_asap.h
r2707 r2742 57 57 void python_PlotHelper(); 58 58 void python_STSideBandSep(); 59 void python_CalibrationManager(); 59 60 60 61 } // python
Note:
See TracChangeset
for help on using the changeset viewer.