- Timestamp:
- 03/26/15 14:38:12 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r3026 r3032 3870 3870 } 3871 3871 3872 double stdDev = 0.0; 3872 double mean = 0.0; 3873 double mean2 = 0.0; 3873 3874 for (int i = 0; i < nChan; ++i) { 3874 3875 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; 3879 3883 3880 3884 if ((nClip == nIterClip) || (thresClip <= 0.0)) { … … 3882 3886 } else { 3883 3887 3884 double thres = stdDev* thresClip;3888 double thres = rmsd * thresClip; 3885 3889 int newNData = 0; 3886 3890 for (int i = 0; i < nChan; ++i) { … … 4444 4448 } 4445 4449 4446 double stdDev = 0.0; 4450 double mean = 0.0; 4451 double mean2 = 0.0; 4447 4452 for (int i = 0; i < nChan; ++i) { 4448 4453 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; 4453 4461 4454 4462 if ((nClip == nIterClip) || (thresClip <= 0.0)) { … … 4456 4464 } else { 4457 4465 4458 double thres = stdDev* thresClip;4466 double thres = rmsd * thresClip; 4459 4467 int newNData = 0; 4460 4468 for (int i = 0; i < nChan; ++i) {
Note:
See TracChangeset
for help on using the changeset viewer.