mailr19313 - /branches/relax_disp/specific_analyses/relax_disp.py


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

Header


Content

Posted by edward on April 03, 2013 - 11:15:
Author: bugman
Date: Wed Apr  3 11:15:05 2013
New Revision: 19313

URL: http://svn.gna.org/viewcvs/relax?rev=19313&view=rev
Log:
The relax_disp.select_model backend now handles the 'exp_fit' model.


Modified:
    branches/relax_disp/specific_analyses/relax_disp.py

Modified: branches/relax_disp/specific_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp.py?rev=19313&r1=19312&r2=19313&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp.py Wed Apr  3 11:15:05 
2013
@@ -1057,9 +1057,6 @@
         @type params:   list of str
         """
 
-        # Get the current data pipe.
-        cdp = pipes.get_pipe()
-
         # Set the model.
         cdp.curve_type = model
 
@@ -1232,19 +1229,15 @@
         return None
 
 
-    def _select_model(self, model='fast'):
-        """Function for selecting the model of the relaxation dispersion 
curve.
-
-        @keyword model: The relaxation dispersion time scale for curve 
fitting.  Can be one of
-                        'fast' or 'slow'.
+    def _select_model(self, model='fast 2-site'):
+        """Set up the model for the relaxation dispersion analysis.
+
+        @keyword model: The relaxation dispersion analysis type.  This can 
be one of 'exp_fit', 'fast 2-site', 'slow 2-site'.
         @type model:    str
         """
 
         # Test if the current pipe exists.
         pipes.test()
-
-        # Get the current data pipe.
-        cdp = pipes.get_pipe()
 
         # Test if the pipe type is set to 'relax_disp'.
         function_type = cdp.pipe_type
@@ -1260,18 +1253,23 @@
             raise RelaxError("The relaxation dispersion experiment type has 
not been set.")
 
         # Fast-exchange regime.
-        if model == 'fast':
-            print("Fast-exchange regime.")
+        if model == 'exp_fit':
+            print("Basic exponential curve-fitting.")
+            params = ['R2']
+
+        # Fast-exchange regime.
+        elif model == 'fast 2-site':
+            print("2-site fast-exchange.")
             params = ['R2', 'Rex', 'kex']
 
         # Slow-exchange regime.
-        elif model == 'slow':
-            print("Slow-exchange regime.")
+        elif model == 'slow 2-site':
+            print("2-site slow-exchange.")
             params = ['R2A', 'kA', 'dw']
 
         # Invalid model.
         else:
-            raise RelaxError("The model '" + model + "' is invalid.")
+            raise RelaxError("The model '%s' is invalid." % model)
 
         # Set up the model.
         self.model_setup(model, params)




Related Messages


Powered by MHonArc, Updated Wed Apr 03 11:20:01 2013