mailr22684 - /trunk/specific_analyses/frame_order/api.py


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

Header


Content

Posted by edward on April 10, 2014 - 17:00:
Author: bugman
Date: Thu Apr 10 17:00:15 2014
New Revision: 22684

URL: http://svn.gna.org/viewcvs/relax?rev=22684&view=rev
Log:
Clean up and fixes for the frame order model_statistics() API method.

The number of data point 'n' was incorrectly calculated using the original 
alignment tensor base
data.


Modified:
    trunk/specific_analyses/frame_order/api.py

Modified: trunk/specific_analyses/frame_order/api.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/frame_order/api.py?rev=22684&r1=22683&r2=22684&view=diff
==============================================================================
--- trunk/specific_analyses/frame_order/api.py  (original)
+++ trunk/specific_analyses/frame_order/api.py  Thu Apr 10 17:00:15 2014
@@ -633,30 +633,28 @@
 
         @keyword model_info:    Unused.
         @type model_info:       None
-        @keyword spin_id:       The spin identification string (unused).
+        @keyword spin_id:       Unused.
         @type spin_id:          None
         @keyword global_stats:  Unused.
         @type global_stats:     None
-        @return:                The optimisation statistics, in tuple 
format, of the number of
-                                parameters (k), the number of data points 
(n), and the chi-squared
-                                value (chi2).
+        @return:                The optimisation statistics, in tuple 
format, of the number of parameters (k), the number of data points (n), and 
the chi-squared value (chi2).
         @rtype:                 tuple of (int, int, float)
         """
 
         # Count the number of parameters.
-        param_vector = assemble_param_vector()
-        k = len(param_vector)
-
-        # The number of data points.
-        n = len(cdp.align_tensors.reduction)
-
-        # The chi2 value.
+        k = len(cdp.params)
+
+        # The number of data points (RDCs + PCSs).
+        n = 0
+        for data in self.base_data_loop():
+            n += 1
+
+        # Check for the chi2 value.
         if not hasattr(cdp, 'chi2'):
             raise RelaxError("Statistics are not available, most likely 
because the model has not been optimised.")
-        chi2 = cdp.chi2
 
         # Return the data.
-        return k, n, chi2
+        return k, n, cdp.chi2
 
 
     def model_type(self):




Related Messages


Powered by MHonArc, Updated Thu Apr 10 17:40:01 2014