mailr4285 - /1.3/specific_fns/jw_mapping.py


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

Header


Content

Posted by edward on January 03, 2008 - 18:00:
Author: bugman
Date: Thu Jan  3 18:00:02 2008
New Revision: 4285

URL: http://svn.gna.org/viewcvs/relax?rev=4285&view=rev
Log:
Updated the set() method of the Jw_mapping class to the new relax design.


Modified:
    1.3/specific_fns/jw_mapping.py

Modified: 1.3/specific_fns/jw_mapping.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/jw_mapping.py?rev=4285&r1=4284&r2=4285&view=diff
==============================================================================
--- 1.3/specific_fns/jw_mapping.py (original)
+++ 1.3/specific_fns/jw_mapping.py Thu Jan  3 18:00:02 2008
@@ -359,7 +359,7 @@
             return 'ppm'
 
 
-    def set(self, run=None, value=None, error=None, param=None, index=None):
+    def set(self, value=None, error=None, param=None, spin=None):
         """
         Reduced spectral density mapping set details
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -368,9 +368,8 @@
         value.  These must be set prior to the calculation of spectral 
density values.
 
         """
-
-        # Arguments.
-        self.run = run
+        __docformat__ = "plaintext"
+
 
         # Setting the model parameters prior to calculation.
         ####################################################
@@ -392,12 +391,12 @@
                 value.append(self.default_value('r'))
 
             # Initilise data.
-            if not hasattr(relax_data_store.res[self.run][index], 'csa') or 
not hasattr(relax_data_store.res[self.run][index], 'r'):
-                self.data_init(relax_data_store.res[self.run][index])
+            if not hasattr(spin, 'csa') or not hasattr(spin, 'r'):
+                self.data_init(spin)
 
             # CSA and Bond length.
-            setattr(relax_data_store.res[self.run][index], 'csa', 
float(value[0]))
-            setattr(relax_data_store.res[self.run][index], 'r', 
float(value[1]))
+            setattr(spin, 'csa', float(value[0]))
+            setattr(spin, 'r', float(value[1]))
 
 
         # Individual data type.
@@ -410,19 +409,19 @@
                 raise RelaxError, "The reduced spectral density mapping data 
type " + `param` + " does not exist."
 
             # Initialise all data if it doesn't exist.
-            if not hasattr(relax_data_store.res[self.run][index], 
object_name):
-                self.data_init(relax_data_store.res[self.run][index])
+            if not hasattr(spin, object_name):
+                self.data_init(spin)
 
             # Default value.
             if value == None:
                 value = self.default_value(object_name)
 
             # Set the value.
-            setattr(relax_data_store.res[self.run][index], object_name, 
float(value))
+            setattr(spin, object_name, float(value))
 
             # Set the error.
             if error != None:
-                setattr(relax_data_store.res[self.run][index], 
object_name+'_err', float(error))
+                setattr(spin, object_name+'_err', float(error))
 
 
     def set_frq(self, run=None, frq=None):




Related Messages


Powered by MHonArc, Updated Thu Jan 03 18:20:13 2008