Changeset 1908 for trunk/src


Ignore:
Timestamp:
08/26/10 20:22:18 (14 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: Yes CAS-1937, CAS-2373

Ready to Release: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): sdbaseline

Description: Changing some function names


Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r1907 r1908  
    17391739  std::vector<float> spec = getSpectrum(rowno);
    17401740  std::vector<bool> fmask = getMask(rowno);
     1741  if (fmask.size() != mask.size()) {
     1742    throw(AipsError("different mask sizes"));
     1743  }
    17411744  for (int i = 0; i < fmask.size(); i++) {
    17421745    fmask[i] = fmask[i] && mask[i];
     
    17471750}
    17481751
    1749 void Scantable::polyBaseline(const std::vector<bool>& mask, int order, int rowno)
     1752void Scantable::polyBaselineBatch(const std::vector<bool>& mask, int order, int rowno)
    17501753{
    17511754  Fitter fitter = Fitter();
     
    17781781  }
    17791782
     1783  std::vector<bool> fmask = getMask(rowno);
    17801784  if (fmask_size != fmask.size()) {
    17811785    throw(AipsError("wrong fmask size"));
     
    17831787  int *pfmask = reinterpret_cast<int*>(fmask_ptr);
    17841788  for (int i = 0; i < fmask_size; i++) {
    1785     pfmask[i] = (fmask[i] ? 1 : 0);
     1789    pfmask[i] = ((fmask[i] && mask[i]) ? 1 : 0);
    17861790  }
    17871791}
  • trunk/src/Scantable.h

    r1907 r1908  
    489489  bool getFlagtraFast(int whichrow);
    490490
    491   void polyBaseline(const std::vector<bool>& mask, int order, int rowno);
     491  void polyBaselineBatch(const std::vector<bool>& mask, int order, int rowno);
    492492  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);
    493493
  • trunk/src/ScantableWrapper.h

    r1907 r1908  
    253253  { table_->polyBaseline(mask, order, rowno, pars_ptr, pars_size, errs_ptr, errs_size, fmask_ptr, fmask_size); }
    254254
    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); }
    257257
    258258  bool getFlagtraFast(int whichrow=0) const
  • trunk/src/python_Scantable.cpp

    r1907 r1908  
    140140          boost::python::arg("nmax")=-1) )
    141141    .def("_poly_baseline", &ScantableWrapper::polyBaseline)
     142    .def("_poly_baseline_batch", &ScantableWrapper::polyBaselineBatch)
    142143    .def("_getflagtrafast", &ScantableWrapper::getFlagtraFast,
    143144         (boost::python::arg("whichrow")=0) )
Note: See TracChangeset for help on using the changeset viewer.