- Timestamp:
- 12/25/04 00:28:13 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMathWrapper.h
r139 r145 43 43 44 44 namespace SDMathWrapper { 45 SDMemTableWrapper average(const SDMemTableWrapper& sdt) {46 return SDMemTableWrapper(SDMath::average(sdt.getCP()));47 }48 45 49 46 SDMemTableWrapper quotient(const SDMemTableWrapper& on, … … 57 54 return SDMemTableWrapper(SDMath::multiply(in.getCP(),factor)); 58 55 } 56 59 57 void scaleInSitu(SDMemTableWrapper& in, casa::Float factor) { 60 58 SDMemTable* sdmt = in.getPtr(); … … 71 69 } 72 70 73 SDMemTableWrapper averages(boost::python::tuple tpl, 74 const std::vector<bool>& mask); 71 SDMemTableWrapper average (boost::python::tuple tpl, 72 const std::vector<bool>& mask, 73 bool scanAv, const std::string& wt); 75 74 76 75 SDMemTableWrapper averagePol(const SDMemTableWrapper& in, -
trunk/src/python_SDMath.cc
r140 r145 42 42 namespace asap { 43 43 namespace SDMathWrapper { 44 SDMemTableWrapper SDMathWrapper::averages(boost::python::tuple tp, 45 const std::vector<bool>& mask) { 44 SDMemTableWrapper SDMathWrapper::average(boost::python::tuple tp, 45 const std::vector<bool>& mask, 46 bool scanAv, 47 const std::string& weightStr) { 46 48 int n; 47 49 n = extract<int>(tp.attr("__len__")()); … … 53 55 } 54 56 Vector<Bool> msk(mask); 55 return SDMemTableWrapper(SDMath::average s(b,msk));57 return SDMemTableWrapper(SDMath::average(b,msk,scanAv,weightStr)); 56 58 }; 57 58 59 } // namespace SDMathWrapper 59 60 60 61 namespace python { 61 62 void python_SDMath() { 62 def("average", &SDMathWrapper::average);63 63 def("quotient", &SDMathWrapper::quotient); 64 64 def("scale", &SDMathWrapper::scale); … … 66 66 def("add", &SDMathWrapper::add); 67 67 def("hanning", &SDMathWrapper::hanning); 68 def("average s", &SDMathWrapper::averages);68 def("average", &SDMathWrapper::average); 69 69 def("averagepol", &SDMathWrapper::averagePol); 70 70 def("bin", &SDMathWrapper::bin);
Note:
See TracChangeset
for help on using the changeset viewer.