- Timestamp:
- 12/26/04 20:50:11 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMathWrapper.h
r145 r151 44 44 namespace SDMathWrapper { 45 45 46 // Quotient 47 46 48 SDMemTableWrapper quotient(const SDMemTableWrapper& on, 47 49 const SDMemTableWrapper& off) { … … 50 52 } 51 53 54 // Multiply 55 56 void scaleInSitu(SDMemTableWrapper& in, casa::Float factor, casa::Bool all) 57 { 58 SDMemTable* sdmt = in.getPtr(); 59 SDMath::multiplyInSitu(in.getPtr(),factor, all); 60 } 52 61 SDMemTableWrapper scale(const SDMemTableWrapper& in, 53 casa::Float factor) { 54 return SDMemTableWrapper(SDMath::multiply(in.getCP(),factor)); 62 casa::Float factor, casa::Bool all) 63 { 64 return SDMemTableWrapper(SDMath::multiply(in.getCP(), factor, all)); 55 65 } 56 66 57 void scaleInSitu(SDMemTableWrapper& in, casa::Float factor) { 67 // Add 68 69 void addInSitu(SDMemTableWrapper& in, casa::Float offset, casa::Bool all) 70 { 58 71 SDMemTable* sdmt = in.getPtr(); 59 SDMath::multiplyInSitu(in.getPtr(),factor); 72 SDMath::addInSitu(in.getPtr(), offset, all); 73 } 74 SDMemTableWrapper add(const SDMemTableWrapper& in, casa::Float offset, casa::Bool all) 75 { 76 return SDMemTableWrapper(SDMath::add(in.getCP(), offset, all)); 60 77 } 61 78 62 SDMemTableWrapper add(const SDMemTableWrapper& in, 63 casa::Float offset) { 64 return SDMemTableWrapper(SDMath::add(in.getCP(), offset)); 65 } 79 // Hanning 66 80 67 81 SDMemTableWrapper hanning(const SDMemTableWrapper& in) { … … 69 83 } 70 84 85 // Bin up 86 87 SDMemTableWrapper bin(const SDMemTableWrapper& in, 88 int width) { 89 return SDMath::bin(in.getCP(), width); 90 } 91 92 // Average in time 93 71 94 SDMemTableWrapper average (boost::python::tuple tpl, 72 95 const std::vector<bool>& mask, 73 96 bool scanAv, const std::string& wt); 97 98 // Average polarizations 74 99 75 100 SDMemTableWrapper averagePol(const SDMemTableWrapper& in, … … 78 103 } 79 104 80 SDMemTableWrapper bin(const SDMemTableWrapper& in, 81 int width) { 82 return SDMath::bin(in.getCP(), width); 83 } 105 // Statistics 84 106 85 107 std::vector<float> statistic(const SDMemTableWrapper& in, … … 88 110 } 89 111 90 91 112 }; 92 113
Note:
See TracChangeset
for help on using the changeset viewer.