Changeset 2786
- Timestamp:
- 03/11/13 12:46:39 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STCalSkyOtfAlma.cpp
r2758 r2786 30 30 {} 31 31 32 void STCalSkyOtfAlma::setupSelector( )32 void STCalSkyOtfAlma::setupSelector(const STSelector &sel) 33 33 { 34 sel_ .reset();34 sel_ = sel; 35 35 36 36 // Detect edges using EdgeMarker -
trunk/src/STCalSkyOtfAlma.h
r2757 r2786 41 41 42 42 protected: 43 virtual void setupSelector( );43 virtual void setupSelector(const STSelector &sel); 44 44 //virtual void fillCalTable(); 45 45 -
trunk/src/STCalSkyPSAlma.cpp
r2749 r2786 12 12 13 13 #include <vector> 14 15 #include <casa/Logging/LogIO.h> 16 14 17 #include "STSelector.h" 15 18 #include "STCalSkyPSAlma.h" … … 29 32 } 30 33 31 void STCalSkyPSAlma::setupSelector( )34 void STCalSkyPSAlma::setupSelector(const STSelector &sel) 32 35 { 33 sel_.reset(); 34 vector<int> types(1,SrcType::PSOFF); 35 sel_.setTypes(types); 36 sel_ = sel; 37 vector<int> types = sel_.getTypes(); 38 if (types.size() == 0) { 39 types.resize(1); 40 types[0] = SrcType::PSOFF; 41 sel_.setTypes(types); 42 } 43 else if (find(types.begin(), types.end(), SrcType::PSOFF) == types.end()) { 44 LogIO os(LogOrigin("STCalSkyPSAlma", "setupSelector", WHERE)); 45 os << LogIO::SEVERE << "Selection contains no data." << LogIO::EXCEPTION; 46 } 47 else { 48 types.resize(1); 49 types[0] = SrcType::PSOFF; 50 sel_.setTypes(types); 51 } 36 52 } 37 53 -
trunk/src/STCalSkyPSAlma.h
r2757 r2786 42 42 43 43 protected: 44 virtual void setupSelector( );44 virtual void setupSelector(const STSelector &sel); 45 45 virtual void fillCalTable(); 46 46 }; -
trunk/src/STCalTsys.cpp
r2749 r2786 12 12 13 13 #include <vector> 14 15 #include <casa/Arrays/ArrayMath.h> 16 #include <casa/Logging/LogIO.h> 17 14 18 #include "STSelector.h" 15 19 #include "STCalTsys.h" … … 18 22 #include "STDefs.h" 19 23 #include <atnf/PKSIO/SrcType.h> 20 21 #include <casa/Arrays/ArrayMath.h>22 24 23 25 using namespace std; … … 32 34 } 33 35 34 void STCalTsys::setupSelector( )36 void STCalTsys::setupSelector(const STSelector &sel) 35 37 { 36 sel_.reset(); 37 sel_.setIFs(iflist_); 38 sel_ = sel; 39 vector<int> ifnos = sel_.getIFs(); 40 if (ifnos.size() > 0) { 41 int nif = 0; 42 int nifOrg = iflist_.size(); 43 vector<int> iflistNew(iflist_); 44 for (int i = 0; i < nifOrg; i++) { 45 if (find(ifnos.begin(), ifnos.end(), iflist_[i]) != ifnos.end()) { 46 iflistNew[nif] = iflist_[i]; 47 ++nif; 48 } 49 } 50 if (nif == 0) { 51 LogIO os(LogOrigin("STCalTsys", "setupSelector", WHERE)); 52 os << LogIO::SEVERE << "Selection contains no data." << LogIO::EXCEPTION; 53 } 54 sel_.setIFs(iflistNew); 55 } 56 else { 57 sel_.setIFs(iflist_); 58 } 38 59 } 39 60 -
trunk/src/STCalTsys.h
r2747 r2786 43 43 44 44 private: 45 void setupSelector( );45 void setupSelector(const STSelector &sel); 46 46 void fillCalTable(); 47 47 -
trunk/src/STCalibration.cpp
r2742 r2786 25 25 { 26 26 STSelector selOrg = scantable_->getSelection(); 27 setupSelector( );27 setupSelector(selOrg); 28 28 scantable_->setSelection(sel_); 29 29 -
trunk/src/STCalibration.h
r2757 r2786 25 25 #include "STDefs.h" 26 26 #include "STApplyTable.h" 27 #include "STSelector.h" 27 28 28 29 namespace asap { … … 47 48 48 49 protected: 49 virtual void setupSelector( ) = 0;50 virtual void setupSelector(const STSelector &sel) = 0; 50 51 virtual void fillCalTable() = 0; 51 52
Note:
See TracChangeset
for help on using the changeset viewer.