]> git.treefish.org Git - phys/latlib.git/blobdiff - obs.hpp
writing some log messages to log file instead of cerr.
[phys/latlib.git] / obs.hpp
diff --git a/obs.hpp b/obs.hpp
index 99d97fa10aaedea8f8f3689fd33c3ba832326a36..4d20bd6d901bff88f113d7a654a8fd87dca2ca4e 100644 (file)
--- a/obs.hpp
+++ b/obs.hpp
@@ -74,8 +74,7 @@ void obs<obstype>::mean(const string& compid, vector< vector<double> > *meas, co
   
   for(vector< vector<double> >::iterator measIt = meas->begin(); measIt != meas->end(); ++measIt)
     computations[compid].err += pow( (*measIt)[ival] - computations[compid].val, 2 );
-  computations[compid].err /= nmeas*(nmeas-1);
-  computations[compid].err = sqrt( computations[compid].err );  
+  computations[compid].err = sqrt( computations[compid].err ) / nmeas;  
 }
 
 template <typename obstype>
@@ -92,8 +91,7 @@ void obs<obstype>::mean(const string& compid, vector< vector<int> > *meas, const
   
   for(vector< vector<int> >::iterator measIt = meas->begin(); measIt != meas->end(); ++measIt)
     computations[compid].err += pow( (*measIt)[ival] - computations[compid].val, 2 );
-  computations[compid].err /= nmeas*(nmeas-1);
-  computations[compid].err = sqrt( computations[compid].err );  
+  computations[compid].err = sqrt( computations[compid].err ) / nmeas;
 }                               
     
 template <typename obstype>