mailr8070 - /branches/spectral_errors/generic_fns/spectrum.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on December 01, 2008 - 10:40:
Author: bugman
Date: Mon Dec  1 10:40:11 2008
New Revision: 8070

URL: http://svn.gna.org/viewcvs/relax?rev=8070&view=rev
Log:
A number of fixes for the __errors_repl() function.

The variance and sd structures are now correctly created, and the variances 
properly averaged.


Modified:
    branches/spectral_errors/generic_fns/spectrum.py

Modified: branches/spectral_errors/generic_fns/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/spectral_errors/generic_fns/spectrum.py?rev=8070&r1=8069&r2=8070&view=diff
==============================================================================
--- branches/spectral_errors/generic_fns/spectrum.py (original)
+++ branches/spectral_errors/generic_fns/spectrum.py Mon Dec  1 10:40:11 2008
@@ -182,7 +182,7 @@
         num_dups = 0
 
         # Loop over all time points.
-        for i in xrange(len(cdp.relax_times)):
+        for i in xrange(len(cdp.spectrum_ids)):
             # Single spectrum (or extraordinarily accurate NMR spectra!).
             if cdp.var_I[i] == 0.0:
                 continue
@@ -195,16 +195,15 @@
         var_I = var_I / float(num_dups)
 
         # Assign the average value to all time points.
-        for i in xrange(len(cdp.relax_times)):
+        for i in xrange(len(cdp.spectrum_ids)):
             cdp.var_I[i] = var_I
 
         # Print out.
-        print "\nStandard deviation (averaged over all spectra):  " + `var_I`
+        print "\nStandard deviation (variance averaged over all spectra):  " 
+ `sqrt(var_I)`
 
     # Create the standard deviation data structure.
-    cdp.sigma_I = []
-    for var_I in cdp.var_I:
-        cdp.sigma_I.append(sqrt(var_I))
+    for i in xrange(len(cdp.spectrum_ids)):
+        cdp.sigma_I[i] = sqrt(cdp.var_I[i])
 
 
 def __errors_volume_no_repl():




Related Messages


Powered by MHonArc, Updated Mon Dec 01 11:00:02 2008