- Timestamp:
- 12/28/09 22:19:00 (16 years ago)
- File:
- 
      - 1 edited
 
 - 
          
  trunk/src/STLineFinder.cpp (modified) (2 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
      trunk/src/STLineFinder.cppr1644 r1670 304 304 void LFNoiseEstimator::add(float in) 305 305 { 306 if (isnan(in)) { 307 // normally it shouldn't happen 308 return; 309 } 306 310 itsVariances[itsSampleNumber] = in; 307 311 … … 584 588 (meanch2-square(meanch)); 585 589 linmean=coeff*(Float(cur_channel)-meanch)+mean; 586 linvariance=sqrt(sumf2/Float(box_chan_cntr)-square(mean)- 587 square(coeff)*(meanch2-square(meanch))); 590 linvariance=sumf2/Float(box_chan_cntr)-square(mean)- 591 square(coeff)*(meanch2-square(meanch)); 592 if (linvariance<0.) { 593 // this shouldn't happen normally, but could be due to round-off error 594 linvariance = 0; 595 } else { 596 linvariance = sqrt(linvariance); 597 } 588 598 } 589 599 need2recalculate=False; 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  
