mailr21261 - /trunk/pipe_control/value.py


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

Header


Content

Posted by edward on October 27, 2013 - 19:09:
Author: bugman
Date: Sun Oct 27 19:09:56 2013
New Revision: 21261

URL: http://svn.gna.org/viewcvs/relax?rev=21261&view=rev
Log:
The value.write user function can now properly handle non-numeric data types.

This allows the spin specific model name to be written to file, or any other 
string defined in the
specific analysis PARAMS data object.


Modified:
    trunk/pipe_control/value.py

Modified: trunk/pipe_control/value.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/value.py?rev=21261&r1=21260&r2=21261&view=diff
==============================================================================
--- trunk/pipe_control/value.py (original)
+++ trunk/pipe_control/value.py Sun Oct 27 19:09:56 2013
@@ -27,6 +27,7 @@
 import sys
 
 # relax module imports.
+from lib.check_types import is_num
 from lib.errors import RelaxError, RelaxNoSequenceError, RelaxParamSetError, 
RelaxValueError
 from lib.io import get_file_path, open_write_file, read_spin_data, 
write_spin_data
 from pipe_control import minimise, pipes
@@ -662,9 +663,9 @@
     @type scaling:  float
     """
 
-    # None.
-    if value == None:
-        return None
+    # No a number, so return the value unmodified.
+    if not is_num(value):
+        return value
 
     # Scale.
     return value * scaling




Related Messages


Powered by MHonArc, Updated Sun Oct 27 19:20:02 2013