Changeset 3048 for trunk


Ignore:
Timestamp:
08/25/15 19:56:55 (9 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS-6572)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: Added a parameter to define rowid to Scantable::doApplyBaselineTable.

Test Programs:

Put in Release Notes: No

Module(s): sdbaseline2

Description: A bug fix in mask definition.


Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r3047 r3048  
    1212#include <map>
    1313#include <sys/time.h>
     14#include <iostream>
    1415
    1516#include <atnf/PKSIO/SrcType.h>
     
    26082609      std::vector<float> params;
    26092610      float rms;
    2610       std::vector<float> resfit = doApplyBaselineTable(spec, mask, ftype, fpar, params, rms);
     2611      std::vector<float> resfit = doApplyBaselineTable(spec, mask, ftype, fpar, params, rms, whichrow);
    26112612      setSpectrum(resfit, whichrow);
    26122613
     
    27432744}
    27442745
    2745 std::vector<float> Scantable::doApplyBaselineTable(std::vector<float>& spec, 
    2746                                                    std::vector<bool>& mask, 
    2747                                                    const STBaselineFunc::FuncName ftype, 
     2746std::vector<float> Scantable::doApplyBaselineTable(std::vector<float>& spec,
     2747                                                   std::vector<bool>& mask,
     2748                                                   const STBaselineFunc::FuncName ftype,
    27482749                                                   std::vector<int>& fpar,
    27492750                                                   std::vector<float>& params,
    2750                                                    float&rms)
     2751                                                   float&rms,
     2752                                                   int irow)
    27512753{
    27522754  std::vector<bool> finalmask;
    27532755  std::vector<int> lfedge;
    2754   return doSubtractBaseline(spec, mask, ftype, fpar, params, rms, finalmask, 0.0, 0, false, 0, 0.0, lfedge, 0);
     2756  return doSubtractBaseline(spec, mask, ftype, fpar, params, rms, finalmask, 0.0, 0, false, irow, 0.0, lfedge, 0);
    27552757}
    27562758
  • trunk/src/Scantable.h

    r3043 r3048  
    991991  std::string packFittingResults(const int irow, const std::vector<float>& params, const float rms);
    992992  void parseBlInfo(const std::string& blInfo, int& whichrow, STBaselineFunc::FuncName& ftype, std::vector<int>& fpar, std::vector<bool>& mask, float& thresClip, int& nIterClip, bool& useLineFinder, float& thresLF, std::vector<int>& edgeLF, int& avgLF);
    993  std::vector<float> doApplyBaselineTable(std::vector<float>& spec, std::vector<bool>& mask, const STBaselineFunc::FuncName ftype, std::vector<int>& fpar, std::vector<float>& params, float&rms);
     993  std::vector<float> doApplyBaselineTable(std::vector<float>& spec, std::vector<bool>& mask, const STBaselineFunc::FuncName ftype, std::vector<int>& fpar, std::vector<float>& params, float&rms, int irow);
    994994 std::vector<float> doSubtractBaseline(std::vector<float>& spec, std::vector<bool>& mask, const STBaselineFunc::FuncName ftype, std::vector<int>& fpar, std::vector<float>& params, float&rms, std::vector<bool>& finalmask, float clipth, int clipn, bool uself, int irow, float lfth, std::vector<int>& lfedge, int lfavg);
    995995
Note: See TracChangeset for help on using the changeset viewer.