mailr22694 - /trunk/lib/software/grace.py


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

Header


Content

Posted by edward on April 10, 2014 - 18:25:
Author: bugman
Date: Thu Apr 10 18:25:40 2014
New Revision: 22694

URL: http://svn.gna.org/viewcvs/relax?rev=22694&view=rev
Log:
Large improvement for the lib.software.grace module.

The '*_err' and '*_bc' parameter names for the parameter error and 
back-calculated parameters
respectively are now supported.  This allows these values to be easily 
plotted.


Modified:
    trunk/lib/software/grace.py

Modified: trunk/lib/software/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/software/grace.py?rev=22694&r1=22693&r2=22694&view=diff
==============================================================================
--- trunk/lib/software/grace.py (original)
+++ trunk/lib/software/grace.py Thu Apr 10 18:25:40 2014
@@ -25,6 +25,7 @@
 
 # Python module imports.
 from math import ceil, sqrt
+from re import search
 
 # relax module imports.
 import pipe_control
@@ -398,11 +399,18 @@
             else:
                 # Label.
                 if analysis_spec and (not axis_labels or not 
axis_labels[gi][i]):
+                    # Strip out the '_err' and '_bc' from the data type to 
allow the error and back-calculated structures to be used.
+                    data_type_i = data_type[i]
+                    if search('_err$', data_type_i):
+                        data_type_i = data_type_i[:-4]
+                    elif search('_bc$', data_type_i):
+                        data_type_i = data_type_i[:-3]
+
                     # Get the units.
-                    units = return_units(data_type[i])
+                    units = return_units(data_type_i)
 
                     # Set the label.
-                    axis_labels[gi][i] = return_grace_string(data_type[i])
+                    axis_labels[gi][i] = return_grace_string(data_type_i)
 
                     # Add units.
                     if units:




Related Messages


Powered by MHonArc, Updated Thu Apr 10 18:40:01 2014