Changeset 3032


Ignore:
Timestamp:
03/26/15 14:38:12 (10 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): asap

Description: in do[CubicSpline]LeastSquareFitting(), modified the unit value for clipping threshold from rms (though 'stdDev' was used as variable name) to real standard deviation.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r3026 r3032  
    38703870    }
    38713871
    3872     double stdDev = 0.0;
     3872    double mean  = 0.0;
     3873    double mean2 = 0.0;
    38733874    for (int i = 0; i < nChan; ++i) {
    38743875      if (maskArray[i] == 0) continue;
    3875       stdDev += residual[i]*residual[i];
    3876     }
    3877     stdDev = sqrt(stdDev/(double)nData);
    3878     rms = (float)stdDev;
     3876      mean  += residual[i];
     3877      mean2 += residual[i]*residual[i];
     3878    }
     3879    mean  /= (double)nData;
     3880    mean2 /= (double)nData;
     3881    double rmsd = sqrt(mean2 - mean*mean);
     3882    rms = (float)rmsd;
    38793883
    38803884    if ((nClip == nIterClip) || (thresClip <= 0.0)) {
     
    38823886    } else {
    38833887
    3884       double thres = stdDev * thresClip;
     3888      double thres = rmsd * thresClip;
    38853889      int newNData = 0;
    38863890      for (int i = 0; i < nChan; ++i) {
     
    44444448    }
    44454449
    4446     double stdDev = 0.0;
     4450    double mean  = 0.0;
     4451    double mean2 = 0.0;
    44474452    for (int i = 0; i < nChan; ++i) {
    44484453      if (maskArray[i] == 0) continue;
    4449       stdDev += residual[i]*residual[i];
    4450     }
    4451     stdDev = sqrt(stdDev/(double)nData);
    4452     rms = (float)stdDev;
     4454      mean  += residual[i];
     4455      mean2 += residual[i]*residual[i];
     4456    }
     4457    mean  /= (double)nData;
     4458    mean2 /= (double)nData;
     4459    double rmsd = sqrt(mean2 - mean*mean);
     4460    rms = (float)rmsd;
    44534461
    44544462    if ((nClip == nIterClip) || (thresClip <= 0.0)) {
     
    44564464    } else {
    44574465     
    4458       double thres = stdDev * thresClip;
     4466      double thres = rmsd * thresClip;
    44594467      int newNData = 0;
    44604468      for (int i = 0; i < nChan; ++i) {
Note: See TracChangeset for help on using the changeset viewer.