Changeset 1779 for branches/mergetest/src/STMathWrapper.h
- Timestamp:
- 07/29/10 19:13:46 (14 years ago)
- Location:
- branches/mergetest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mergetest
- Property svn:mergeinfo changed
-
branches/mergetest/src/STMathWrapper.h
r1689 r1779 73 73 { return ScantableWrapper(STMath::unaryOperate(in.getCP(), val, mode, tsys)); } 74 74 75 ScantableWrapper arrayOperate( const ScantableWrapper& in, 76 const std::vector<float> val, 77 const std::string& mode, 78 bool tsys=false ) 79 { return ScantableWrapper(STMath::arrayOperateChannel(in.getCP(), val, mode, tsys)); } 80 81 ScantableWrapper array2dOperate( const ScantableWrapper& in, 82 const std::vector< std::vector<float> > val, 83 const std::string& mode, bool tsys=false ) 84 { return ScantableWrapper(STMath::array2dOperate(in.getCP(), val, mode, tsys)); } 85 75 86 ScantableWrapper binaryOperate( const ScantableWrapper& left, 76 87 const ScantableWrapper& right, … … 121 132 { return STMath::statistic(in.getCP(), mask, which); } 122 133 134 std::vector<int> minMaxChan(const ScantableWrapper& in, 135 const std::vector<bool>& mask, 136 const std::string& which) 137 { return STMath::minMaxChan(in.getCP(), mask, which); } 138 123 139 ScantableWrapper bin( const ScantableWrapper& in, int width=5) 124 140 { return ScantableWrapper(STMath::bin(in.getCP(), width)); } … … 175 191 const std::string& refTime, 176 192 const std::string& method ) 177 { return ScantableWrapper(STMath::frequencyAlign(in.getCP() , refTime, method)); }193 { return ScantableWrapper(STMath::frequencyAlign(in.getCP())); } 178 194 179 195 ScantableWrapper convertPolarisation( const ScantableWrapper& in, … … 191 207 mode)); } 192 208 209 // test for average spectra with different channel/resolution 210 ScantableWrapper 211 new_average( const std::vector<ScantableWrapper>& in, 212 const bool& compel, 213 const std::vector<bool>& mask, 214 const std::string& weight, 215 const std::string& avmode ) 216 { 217 std::vector<casa::CountedPtr<Scantable> > sts; 218 for (unsigned int i=0; i<in.size(); ++i) sts.push_back(in[i].getCP()); 219 return ScantableWrapper(STMath::new_average(sts, compel, mask, weight, avmode)); 220 } 221 222 // cwcal 223 ScantableWrapper cwcal( const ScantableWrapper &in, 224 const std::string calmode, 225 const std::string antname ) 226 { 227 casa::CountedPtr<Scantable> tab = in.getCP() ; 228 casa::String mode( calmode ) ; 229 casa::String name( antname ) ; 230 return ScantableWrapper( STMath::cwcal( tab, mode, name ) ) ; 231 } 232 // almacal 233 ScantableWrapper almacal( const ScantableWrapper &in, 234 const std::string calmode ) 235 { 236 casa::CountedPtr<Scantable> tab = in.getCP() ; 237 casa::String mode( calmode ) ; 238 return ScantableWrapper( STMath::almacal( tab, mode ) ) ; 239 } 193 240 }; 194 241
Note: See TracChangeset
for help on using the changeset viewer.