mailr7239 - /1.3/specific_fns/base_class.py


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

Header


Content

Posted by edward on September 24, 2008 - 16:18:
Author: bugman
Date: Wed Sep 24 16:18:13 2008
New Revision: 7239

URL: http://svn.gna.org/viewcvs/relax?rev=7239&view=rev
Log:
Created the sim_return_chi2() base class method.


Modified:
    1.3/specific_fns/base_class.py

Modified: 1.3/specific_fns/base_class.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/base_class.py?rev=7239&r1=7238&r2=7239&view=diff
==============================================================================
--- 1.3/specific_fns/base_class.py (original)
+++ 1.3/specific_fns/base_class.py Wed Sep 24 16:18:13 2008
@@ -380,6 +380,27 @@
                 for j in xrange(cdp.sim_number):
                     # Copy and append the data.
                     sim_object.append(deepcopy(getattr(spin, object_name)))
+
+
+    def sim_return_chi2(self, spin, index=None):
+        """Return the simulation chi-squared values.
+
+        @param spin:    The spin container.
+        @type spin:     SpinContainer instance
+        @keyword index: The optional simulation index.
+        @type index:    int
+        @return:        The list of simulation chi-squared values.  If the 
index is supplied, only
+                        a single value will be returned.
+        @rtype:         list of float or float
+        """
+
+        # Index.
+        if index != None:
+            return spin.chi2_sim[index]
+
+        # List of vals.
+        else:
+            return spin.chi2_sim
 
 
     def sim_return_param(self, instance, index):




Related Messages


Powered by MHonArc, Updated Wed Sep 24 16:20:03 2008