mailr9950 - /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 November 25, 2009 - 09:05:
Author: bugman
Date: Wed Nov 25 09:05:00 2009
New Revision: 9950

URL: http://svn.gna.org/viewcvs/relax?rev=9950&view=rev
Log:
Updated the data_init() method for API consistency.


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=9950&r1=9949&r2=9950&view=diff
==============================================================================
--- 1.3/specific_fns/relax_fit.py (original)
+++ 1.3/specific_fns/relax_fit.py Wed Nov 25 09:05:00 2009
@@ -482,11 +482,13 @@
         return mc_data
 
 
-    def data_init(self, spin):
+    def data_init(self, data_cont, sim=False):
         """Initialise the spin specific data structures.
 
-        @param spin:    The spin container.
-        @type spin:     SpinContainer instance
+        @param data_cont:   The spin container.
+        @type data_cont:    SpinContainer instance
+        @keyword sim:       The Monte Carlo simulation flag, which if true 
will initialise the simulation data structure.
+        @type sim:          bool
         """
 
         # Loop over the data structure names.
@@ -500,9 +502,9 @@
             else:
                 init_data = None
 
-            # If the name is not in 'spin', add it.
-            if not hasattr(spin, name):
-                setattr(spin, name, init_data)
+            # If the name is not in 'data_cont', add it.
+            if not hasattr(data_cont, name):
+                setattr(data_cont, name, init_data)
 
 
     def data_names(self, set='all', error_names=False, sim_names=False):




Related Messages


Powered by MHonArc, Updated Wed Nov 25 09:20:03 2009