mailr4304 - /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 January 04, 2008 - 11:26:
Author: bugman
Date: Fri Jan  4 11:26:36 2008
New Revision: 4304

URL: http://svn.gna.org/viewcvs/relax?rev=4304&view=rev
Log:
Converted specific_fns.relax_fit.data_init() to the new relax 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=4304&r1=4303&r2=4304&view=diff
==============================================================================
--- 1.3/specific_fns/relax_fit.py (original)
+++ 1.3/specific_fns/relax_fit.py Fri Jan  4 11:26:36 2008
@@ -209,39 +209,26 @@
         return mc_data
 
 
-    def data_init(self):
+    def data_init(self, spin):
         """Function for initialising the data structures."""
-
-        # Curve type.
-        if not hasattr(relax_data_store, 'curve_type'):
-            relax_data_store.curve_type = {}
 
         # Get the data names.
         data_names = self.data_names()
 
-        # Loop over the sequence.
-        for i in xrange(len(relax_data_store.res[self.run])):
-            # Alias the residue specific data structure.
-            data = relax_data_store.res[self.run][i]
-
-            # Skip unselected residues.
-            if not data.select:
-                continue
-
-            # Loop over the data structure names.
-            for name in data_names:
-                # Data structures which are initially empty arrays.
-                list_data = [ 'params' ]
-                if name in list_data:
-                    init_data = []
-
-                # Otherwise initialise the data structure to None.
-                else:
-                    init_data = None
-
-                # If the name is not in 'data', add it.
-                if not hasattr(data, name):
-                    setattr(data, name, init_data)
+        # Loop over the data structure names.
+        for name in data_names:
+            # Data structures which are initially empty arrays.
+            list_data = [ 'params' ]
+            if name in list_data:
+                init_data = []
+
+            # Otherwise initialise the data structure to None.
+            else:
+                init_data = None
+
+            # If the name is not in 'spin', add it.
+            if not hasattr(spin, name):
+                setattr(spin, name, init_data)
 
 
     def data_names(self, set='all'):




Related Messages


Powered by MHonArc, Updated Fri Jan 04 11:40:13 2008