mailr6220 - /1.3/specific_fns/relax_fit.py


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

Header


Content

Posted by edward on May 21, 2008 - 23:32:
Author: bugman
Date: Wed May 21 23:32:06 2008
New Revision: 6220

URL: http://svn.gna.org/viewcvs/relax?rev=6220&view=rev
Log:
Updated the create_mc_data() method to the new design.


Modified:
    1.3/specific_fns/relax_fit.py

Modified: 1.3/specific_fns/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/relax_fit.py?rev=6220&r1=6219&r2=6220&view=diff
==============================================================================
--- 1.3/specific_fns/relax_fit.py (original)
+++ 1.3/specific_fns/relax_fit.py Wed May 21 23:32:06 2008
@@ -200,34 +200,37 @@
         return results[relax_time_index]
 
 
-    def create_mc_data(self, run, i):
-        """Function for creating the Monte Carlo peak intensity data."""
-
-        # Arguments
-        self.run = run
+    def create_mc_data(self, spin):
+        """Create the Monte Carlo peak intensity data.
+
+        @param spin:    The spin container.
+        @type spin:     SpinContainer instance
+        @return:        The Monte Carlo simulation data.
+        @rtype:         list of floats
+        """
 
         # Initialise the MC data data structure.
         mc_data = []
 
-        # Alias the residue specific data structure.
-        data = relax_data_store.res[self.run][i]
-
-        # Skip deselected residues.
-        if not data.select:
+        # Skip deselected spins.
+        if not spin.select:
             return
 
-        # Skip residues which have no data.
-        if not hasattr(data, 'intensities'):
+        # Skip spins which have no data.
+        if not hasattr(spin, 'intensities'):
             return
 
         # Test if the model is set.
-        if not hasattr(data, 'model') or not data.model:
-            raise RelaxNoModelError, self.run
+        if not hasattr(spin, 'model') or not spin.model:
+            raise RelaxNoModelError
+
+        # Alias the current data pipe.
+        cdp = relax_data_store[relax_data_store.current_pipe]
 
         # Loop over the spectral time points.
-        for j in xrange(len(relax_data_store.relax_times[run])):
+        for j in xrange(len(cdp.relax_times)):
             # Back calculate the value.
-            value = self.back_calc(run=run, index=i, relax_time_index=j)
+            value = self.back_calc(spin=spin, relax_time_index=j)
 
             # Append the value.
             mc_data.append(value)




Related Messages


Powered by MHonArc, Updated Wed May 21 23:40:17 2008