mailr5937 - /1.3/generic_fns/diffusion_tensor.py


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

Header


Content

Posted by edward on April 21, 2008 - 17:43:
Author: bugman
Date: Mon Apr 21 17:43:43 2008
New Revision: 5937

URL: http://svn.gna.org/viewcvs/relax?rev=5937&view=rev
Log:
Converted the return_units() function to the new relax design.


Modified:
    1.3/generic_fns/diffusion_tensor.py

Modified: 1.3/generic_fns/diffusion_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/diffusion_tensor.py?rev=5937&r1=5936&r2=5937&view=diff
==============================================================================
--- 1.3/generic_fns/diffusion_tensor.py (original)
+++ 1.3/generic_fns/diffusion_tensor.py Mon Apr 21 17:43:43 2008
@@ -858,12 +858,20 @@
     return Dx, Dy, Dz
 
 
-def return_units(param):
+def return_units(param, spin_id=None):
     """Function for returning a string representing the parameters units.
 
     For example, the internal representation of tm is in seconds, whereas 
the external
     representation is in nanoseconds, therefore this function will return 
the string
     'nanoseconds' for tm.
+
+
+    @param param:       The name of the parameter to return the units for.
+    @type param:        str
+    @keyword spin_id:   The spin identification string.  This arg is unused.
+    @type spin_id:      None or str
+    @return:            The parameter units string.
+    @rtype:             str
     """
 
     # Get the object name.
@@ -874,11 +882,11 @@
         return 'ns'
 
     # Diso, Da, Dx, Dy, Dz, Dpar, Dper.
-    elif object_name in ['Diso', 'Da', 'Dx', 'Dy', 'Dz', 'Dpar', 'Dper']:
+    if object_name in ['Diso', 'Da', 'Dx', 'Dy', 'Dz', 'Dpar', 'Dper']:
         return '1e6 1/s'
 
     # Angles.
-    elif object_name in ['theta', 'phi', 'alpha', 'beta', 'gamma']:
+    if object_name in ['theta', 'phi', 'alpha', 'beta', 'gamma']:
         return 'deg'
 
 




Related Messages


Powered by MHonArc, Updated Mon Apr 21 23:00:25 2008