mailr8069 - /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 - 09:37:
Author: bugman
Date: Mon Dec  1 09:37:13 2008
New Revision: 8069

URL: http://svn.gna.org/viewcvs/relax?rev=8069&view=rev
Log:
Fix for the calculation of the average variance.


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=8069&r1=8068&r2=8069&view=diff
==============================================================================
--- branches/spectral_errors/generic_fns/spectrum.py (original)
+++ branches/spectral_errors/generic_fns/spectrum.py Mon Dec  1 09:37:13 2008
@@ -126,6 +126,7 @@
             print "%-5s%-6s%-20s%-20s" % ("Num", "Name", "Average", "SD")
 
         # Calculate the mean value.
+        count = 0
         for spin in spin_loop():
             # Skip deselected spins.
             if not spin.select:
@@ -161,9 +162,10 @@
 
             # Sum of variances (for average).
             cdp.var_I[indices[0]] = cdp.var_I[indices[0]] + var_I
+            count = count + 1
 
         # Average variance.
-        cdp.var_I[indices[0]] = cdp.var_I[indices[0]] / float(count_spins())
+        cdp.var_I[indices[0]] = cdp.var_I[indices[0]] / float(count)
 
         # Set all spectra variances.
         for j in xrange(num_spectra):




Related Messages


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