- Timestamp:
- 08/26/10 20:22:18 (14 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r1907 r1908 1739 1739 std::vector<float> spec = getSpectrum(rowno); 1740 1740 std::vector<bool> fmask = getMask(rowno); 1741 if (fmask.size() != mask.size()) { 1742 throw(AipsError("different mask sizes")); 1743 } 1741 1744 for (int i = 0; i < fmask.size(); i++) { 1742 1745 fmask[i] = fmask[i] && mask[i]; … … 1747 1750 } 1748 1751 1749 void Scantable::polyBaseline (const std::vector<bool>& mask, int order, int rowno)1752 void Scantable::polyBaselineBatch(const std::vector<bool>& mask, int order, int rowno) 1750 1753 { 1751 1754 Fitter fitter = Fitter(); … … 1778 1781 } 1779 1782 1783 std::vector<bool> fmask = getMask(rowno); 1780 1784 if (fmask_size != fmask.size()) { 1781 1785 throw(AipsError("wrong fmask size")); … … 1783 1787 int *pfmask = reinterpret_cast<int*>(fmask_ptr); 1784 1788 for (int i = 0; i < fmask_size; i++) { 1785 pfmask[i] = ( fmask[i]? 1 : 0);1789 pfmask[i] = ((fmask[i] && mask[i]) ? 1 : 0); 1786 1790 } 1787 1791 } -
trunk/src/Scantable.h
r1907 r1908 489 489 bool getFlagtraFast(int whichrow); 490 490 491 void polyBaseline (const std::vector<bool>& mask, int order, int rowno);491 void polyBaselineBatch(const std::vector<bool>& mask, int order, int rowno); 492 492 void polyBaseline(const std::vector<bool>& mask, int order, int rowno, int pars_ptr, int pars_size, int errs_ptr, int errs_size, int fmask_ptr, int fmask_size); 493 493 -
trunk/src/ScantableWrapper.h
r1907 r1908 253 253 { table_->polyBaseline(mask, order, rowno, pars_ptr, pars_size, errs_ptr, errs_size, fmask_ptr, fmask_size); } 254 254 255 void polyBaseline (const std::vector<bool>& mask, int order, int rowno)256 { table_->polyBaseline (mask, order, rowno); }255 void polyBaselineBatch(const std::vector<bool>& mask, int order, int rowno) 256 { table_->polyBaselineBatch(mask, order, rowno); } 257 257 258 258 bool getFlagtraFast(int whichrow=0) const -
trunk/src/python_Scantable.cpp
r1907 r1908 140 140 boost::python::arg("nmax")=-1) ) 141 141 .def("_poly_baseline", &ScantableWrapper::polyBaseline) 142 .def("_poly_baseline_batch", &ScantableWrapper::polyBaselineBatch) 142 143 .def("_getflagtrafast", &ScantableWrapper::getFlagtraFast, 143 144 (boost::python::arg("whichrow")=0) )
Note:
See TracChangeset
for help on using the changeset viewer.