Changeset 2811 for trunk/src


Ignore:
Timestamp:
04/12/13 10:32:54 (12 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: parameter of tool functions

Test Programs:

Put in Release Notes: No

Module(s): sd.scantable

Description: add a new parameter 'retfitres' to sd.scantable.apply_bltable() and sd.scantable.sub_baseline().


Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r2791 r2811  
    24902490}
    24912491
    2492 std::vector<std::string> Scantable::applyBaselineTable(const std::string& bltable, const std::string& outbltable, const bool outbltableexists, const bool overwrite)
     2492std::vector<std::string> Scantable::applyBaselineTable(const std::string& bltable, const bool returnfitresult, const std::string& outbltable, const bool outbltableexists, const bool overwrite)
    24932493{
    24942494  STBaselineTable btin = STBaselineTable(bltable);
     
    25202520      float rms;
    25212521      std::vector<float> resfit = doApplyBaselineTable(spec, mask, ftype, fpar, params, rms);
    2522 
    25232522      setSpectrum(resfit, whichrow);
    25242523
    2525       res.push_back(packFittingResults(whichrow, params, rms));
     2524      if (returnfitresult) {
     2525        res.push_back(packFittingResults(whichrow, params, rms));
     2526      }
    25262527
    25272528      if (outBaselineTable) {
     
    25562557}
    25572558
    2558 std::vector<std::string> Scantable::subBaseline(const std::vector<std::string>& blInfoList, const std::string& outbltable, const bool outbltableexists, const bool overwrite)
     2559std::vector<std::string> Scantable::subBaseline(const std::vector<std::string>& blInfoList, const bool returnfitresult, const std::string& outbltable, const bool outbltableexists, const bool overwrite)
    25592560{
    25602561  int nRowBl = blInfoList.size();
     
    26022603      std::vector<float> resfit = doSubtractBaseline(spec, mask, ftype, fpar, params, rms, finalmask, clipth, clipn, uself, irow, lfth, lfedge, lfavg);
    26032604      setSpectrum(resfit, irow);
    2604       res.push_back(packFittingResults(irow, params, rms));
     2605
     2606      if (returnfitresult) {
     2607        res.push_back(packFittingResults(irow, params, rms));
     2608      }
    26052609
    26062610      if (outBaselineTable) {
  • trunk/src/Scantable.h

    r2791 r2811  
    511511  bool getFlagtraFast(casa::uInt whichrow);
    512512
    513   std::vector<std::string> applyBaselineTable(const std::string& bltable, const std::string& outbltable, const bool outbltableexists, const bool overwrite);
    514   std::vector<std::string> subBaseline(const std::vector<std::string>& blInfoList, const std::string& outbltable, const bool outbltableexists, const bool overwrite);
     513  std::vector<std::string> applyBaselineTable(const std::string& bltable,
     514                                              const bool returnfitresult,
     515                                              const std::string& outbltable,
     516                                              const bool outbltableexists,
     517                                              const bool overwrite);
     518  std::vector<std::string> subBaseline(const std::vector<std::string>& blInfoList,
     519                                       const bool returnfitresult,
     520                                       const std::string& outbltable,
     521                                       const bool outbltableexists,
     522                                       const bool overwrite);
    515523  void polyBaseline(const std::vector<bool>& mask,
    516524                    int order,
  • trunk/src/ScantableWrapper.h

    r2791 r2811  
    281281  { table_->regridSpecChannel( dnu, nchan ); }
    282282
    283   std::vector<std::string> applyBaselineTable(const std::string& bltable, const std::string& outbltable, const bool outbltableexists, const bool overwrite)
    284   { return table_->applyBaselineTable(bltable, outbltable, outbltableexists, overwrite); }
    285   std::vector<std::string> subBaseline(const std::vector<std::string>& blinfo, const std::string& outbltable, const bool outbltableexists, const bool overwrite)
    286   { return table_->subBaseline(blinfo, outbltable, outbltableexists, overwrite); }
     283  std::vector<std::string> applyBaselineTable(const std::string& bltable, const bool returnfitresult, const std::string& outbltable, const bool outbltableexists, const bool overwrite)
     284  { return table_->applyBaselineTable(bltable, returnfitresult, outbltable, outbltableexists, overwrite); }
     285  std::vector<std::string> subBaseline(const std::vector<std::string>& blinfo, const bool returnfitresult, const std::string& outbltable, const bool outbltableexists, const bool overwrite)
     286  { return table_->subBaseline(blinfo, returnfitresult, outbltable, outbltableexists, overwrite); }
    287287  void polyBaseline(const std::vector<bool>& mask, int order, float clipthresh, int clipniter, bool getresidual=true, const std::string& showprogress="true,1000", const bool outlog=false, const std::string& blfile="", const std::string& bltable="")
    288288  { table_->polyBaseline(mask, order, clipthresh, clipniter, getresidual, showprogress, outlog, blfile, bltable); }
Note: See TracChangeset for help on using the changeset viewer.