mailr6358 - /1.3/specific_fns/model_free/main.py


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

Header


Content

Posted by edward on June 22, 2008 - 01:20:
Author: bugman
Date: Sun Jun 22 01:19:55 2008
New Revision: 6358

URL: http://svn.gna.org/viewcvs/relax?rev=6358&view=rev
Log:
Modified the return_conversion_factor() method to accept both the spin 
container and spin_id string.


Modified:
    1.3/specific_fns/model_free/main.py

Modified: 1.3/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/main.py?rev=6358&r1=6357&r2=6358&view=diff
==============================================================================
--- 1.3/specific_fns/model_free/main.py (original)
+++ 1.3/specific_fns/model_free/main.py Sun Jun 22 01:19:55 2008
@@ -1786,7 +1786,7 @@
         ds.warning[self.run] = None
 
 
-    def return_conversion_factor(self, param, spin_id):
+    def return_conversion_factor(self, param, spin=None, spin_id=None):
         """Return the factor of conversion between different parameter units.
 
         For example, the internal representation of te is in seconds, 
whereas the external
@@ -1795,14 +1795,17 @@
 
         @param param:   The name of the parameter to return the conversion 
factor for.
         @type param:    str
-        @param spin_id: The spin identification string.
+        @param spin:    The spin container.
+        @type spin:     SpinContainer instance
+        @param spin_id: The spin identification string (ignored if the spin 
container is supplied).
         @type spin_id:  str
         @return:        The conversion factor.
         @rtype:         float
         """
 
         # Get the spin.
-        spin = return_spin(spin_id)
+        if not spin:
+            spin = return_spin(spin_id)
 
         # Get the object name.
         object_name = self.return_data_name(param)




Related Messages


Powered by MHonArc, Updated Sun Jun 22 01:40:11 2008