mailr9796 - /branches/bmrb/bmrblib/kinetics/relax_base.py


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

Header


Content

Posted by edward on October 27, 2009 - 14:41:
Author: bugman
Date: Tue Oct 27 14:41:42 2009
New Revision: 9796

URL: http://svn.gna.org/viewcvs/relax?rev=9796&view=rev
Log:
Relaxation values and errors of ? are now handled and converted to None.


Modified:
    branches/bmrb/bmrblib/kinetics/relax_base.py

Modified: branches/bmrb/bmrblib/kinetics/relax_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/kinetics/relax_base.py?rev=9796&r1=9795&r2=9796&view=diff
==============================================================================
--- branches/bmrb/bmrblib/kinetics/relax_base.py (original)
+++ branches/bmrb/bmrblib/kinetics/relax_base.py Tue Oct 27 14:41:42 2009
@@ -142,8 +142,14 @@
         # Convert the residue numbers to ints and the values and errors to 
floats.
         for i in range(len(res_nums)):
             res_nums[i] = int(res_nums[i])
-            values[i] = float(values[i])
-            errors[i] = float(errors[i])
+            if values[i] == '?':
+                values[i] = None
+            else:
+                values[i] = float(values[i])
+            if errors[i] == '?':
+                errors[i] = None
+            else:
+                errors[i] = float(errors[i])
 
         # Return the data.
         return res_nums, res_names, atom_names, values, errors




Related Messages


Powered by MHonArc, Updated Tue Oct 27 15:00:02 2009