mailr26825 - in /trunk: specific_analyses/relax_fit/uf.py user_functions/relax_fit.py


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

Header


Content

Posted by edward on November 29, 2014 - 10:10:
Author: bugman
Date: Sat Nov 29 10:10:56 2014
New Revision: 26825

URL: http://svn.gna.org/viewcvs/relax?rev=26825&view=rev
Log:
Added the saturation recovery experiment to the relax_fit.select_model user 
function.

This simply adds a new option and sets up a different parameter set [Rx, 
Iinf].


Modified:
    trunk/specific_analyses/relax_fit/uf.py
    trunk/user_functions/relax_fit.py

Modified: trunk/specific_analyses/relax_fit/uf.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_fit/uf.py?rev=26825&r1=26824&r2=26825&view=diff
==============================================================================
--- trunk/specific_analyses/relax_fit/uf.py     (original)
+++ trunk/specific_analyses/relax_fit/uf.py     Sat Nov 29 10:10:56 2014
@@ -82,7 +82,7 @@
 def select_model(model='exp'):
     """Function for selecting the model of the exponential curve.
 
-    @keyword model: The exponential curve type.  Can be one of 'exp' or 
'inv'.
+    @keyword model: The exponential curve type.  Can be one of 'exp', 'inv', 
or 'sat'.
     @type model:    str
     """
 
@@ -108,6 +108,11 @@
         print("Three parameter inversion recovery fit.")
         params = ['rx', 'i0', 'iinf']
 
+    # The saturation recovery.
+    if model == 'exp':
+        print("Saturation recovery.")
+        params = ['rx', 'iinf']
+
     # Invalid model.
     else:
         raise RelaxError("The model '" + model + "' is invalid.")

Modified: trunk/user_functions/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/relax_fit.py?rev=26825&r1=26824&r2=26825&view=diff
==============================================================================
--- trunk/user_functions/relax_fit.py   (original)
+++ trunk/user_functions/relax_fit.py   Sat Nov 29 10:10:56 2014
@@ -84,20 +84,23 @@
     wiz_element_type = "combo",
     wiz_combo_choices = [
         "exp: [Rx, I0]",
-        "inv: [Rx, I0, Iinf]"
+        "inv: [Rx, I0, Iinf]",
+        "Saturation recovery, [Rx, Iinf]"
     ],
     wiz_combo_data = [
         "exp",
-        "inv"
+        "inv",
+        "sat"
     ],
     wiz_read_only = True
 )
 # Description.
 uf.desc.append(Desc_container())
-uf.desc[-1].add_paragraph("The supported relaxation experiments include the 
default two parameter exponential fit, selected by setting the model type to 
'exp', and the three parameter inversion recovery experiment in which the 
peak intensity limit is a non-zero value, selected by setting the model to 
'inv'.")
+uf.desc[-1].add_paragraph("The supported relaxation experiments include the 
default two parameter exponential fit, selected by setting the model type to 
'exp', the three parameter inversion recovery experiment in which the peak 
intensity limit is a non-zero value, selected by setting the model to 'inv', 
and the saturation recovery R1 experiment.")
 uf.desc[-1].add_paragraph("The two models are:")
 uf.desc[-1].add_item_list_element("'exp'", "The parameters are [Rx, I0], and 
the equation is I(t) = I0*exp(-Rx*t).")
 uf.desc[-1].add_item_list_element("'inv'", "The parameters are [Rx, I0, 
Iinf].  This has not been implemented yet.")
+uf.desc[-1].add_item_list_element("'sat'", "The saturation recovery 
experiment.  The parameters are [Rx, Iinf] and the equation is I(t) = 
Iinf*(1-exp(-Rx*t)).")
 uf.backend = select_model
 uf.menu_text = "&select_model"
 uf.gui_icon = "oxygen.actions.list-add"




Related Messages


Powered by MHonArc, Updated Sat Nov 29 10:20:04 2014