mailr27035 - in /trunk: pipe_control/grace.py user_functions/grace.py


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

Header


Content

Posted by edward on December 09, 2014 - 08:32:
Author: bugman
Date: Tue Dec  9 08:32:31 2014
New Revision: 27035

URL: http://svn.gna.org/viewcvs/relax?rev=27035&view=rev
Log:
Added the norm_type argument to the grace.write user function.

This is in response to 
http://thread.gmane.org/gmane.science.nmr.relax.devel/7392/focus=7438.

This norm_type argument can either be 'first' or 'last' to allow different 
points of the plot to be
the normalisation factor.  The default of 'first' preserves the old behaviour 
of first point
normalisation.


Modified:
    trunk/pipe_control/grace.py
    trunk/user_functions/grace.py

Modified: trunk/pipe_control/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/grace.py?rev=27035&r1=27034&r2=27035&view=diff
==============================================================================
--- trunk/pipe_control/grace.py (original)
+++ trunk/pipe_control/grace.py Tue Dec  9 08:32:31 2014
@@ -205,7 +205,7 @@
     system(grace_exe + " \"" + file_path + "\" &")
 
 
-def write(x_data_type='res_num', y_data_type=None, spin_id=None, 
plot_data='value', file=None, dir=None, force=False, norm=True):
+def write(x_data_type='res_num', y_data_type=None, spin_id=None, 
plot_data='value', norm_type='first', file=None, dir=None, force=False, 
norm=True):
     """Writing data to a file.
 
     @keyword x_data_type:   The category of the X-axis data.
@@ -216,6 +216,8 @@
     @type spin_id:          str
     @keyword plot_data:     The type of the plotted data, one of 'value', 
'error', or 'sim'.
     @type plot_data:        str
+    @keyword norm_type:     The point to normalise to 1.  This can be 
'first' or 'last'.
+    @type norm_type:        str
     @keyword file:          The name of the Grace file to create.
     @type file:             str
     @keyword dir:           The optional directory to place the file into.

Modified: trunk/user_functions/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/grace.py?rev=27035&r1=27034&r2=27035&view=diff
==============================================================================
--- trunk/user_functions/grace.py       (original)
+++ trunk/user_functions/grace.py       Tue Dec  9 08:32:31 2014
@@ -146,6 +146,23 @@
     wiz_read_only = True
 )
 uf.add_keyarg(
+    name = "norm_type",
+    default = "first",
+    py_type = "str",
+    desc_short = "normalisation point",
+    desc = "How the graph should be normalised, if the norm flag is set.",
+    wiz_element_type = "combo",
+    wiz_combo_choices = [
+        "First point normalisation",
+        "Last point normalisation"
+    ],
+    wiz_combo_data = [
+        "first",
+        "last"
+    ],
+    wiz_read_only = True
+)
+uf.add_keyarg(
     name = "file",
     py_type = "str",
     arg_type = "file sel",
@@ -175,7 +192,7 @@
     default = False,
     py_type = "bool",
     desc_short = "normalisation flag",
-    desc = "A flag which, if set to True, will cause all graphs to be 
normalised to a starting value of 1.  This is for the normalisation of series 
type data."
+    desc = "A flag which, if set to True, will cause all graphs to be 
normalised to 1.  This is for the normalisation of series type data.  The 
point for normalisation is set with the norm_type argument."
 )
 # Description.
 uf.desc.append(Desc_container())




Related Messages


Powered by MHonArc, Updated Tue Dec 09 08:40:02 2014