[prev in list] [next in list] [prev in thread] [next in thread] 

List:       relax-commits
Subject:    r19269 - in /branches/relax_disp: specific_analyses/relax_disp.py target_functions/relax_disp.py
From:       edward () nmr-relax ! com
Date:       2013-03-27 17:14:20
Message-ID: E1UKtvY-0008Oo-SE () subversion ! gna ! org
[Download RAW message or body]

Author: bugman
Date: Wed Mar 27 18:14:20 2013
New Revision: 19269

URL: http://svn.gna.org/viewcvs/relax?rev=19269&view=rev
Log:
Added the model argument to the dispersion target function class to select between \
different equations.


Modified:
    branches/relax_disp/specific_analyses/relax_disp.py
    branches/relax_disp/target_functions/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=19269&r1=19268&r2=19269&view=diff
 ==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp.py Wed Mar 27 18:14:20 2013
@@ -960,7 +960,7 @@
             else:
                 values = spin.sim_intensities[sim_index]
 
-            model = Dispersion(num_params=len(spin.params), \
num_times=len(cdp.cpmg_frqs), values=values, sd=spin.intensity_err, \
cpmg_frqs=cdp.cpmg_frqs, scaling_matrix=scaling_matrix) +            model = \
Dispersion(model=cdp.curve_type, num_params=len(spin.params), \
num_times=len(cdp.cpmg_frqs), values=values, sd=spin.intensity_err, \
cpmg_frqs=cdp.cpmg_frqs, scaling_matrix=scaling_matrix)  
 
             # Setup the minimisation algorithm when constraints are present.

Modified: branches/relax_disp/target_functions/relax_disp.py
URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/target_functions/relax_disp.py?rev=19269&r1=19268&r2=19269&view=diff
 ==============================================================================
--- branches/relax_disp/target_functions/relax_disp.py (original)
+++ branches/relax_disp/target_functions/relax_disp.py Wed Mar 27 18:14:20 2013
@@ -28,9 +28,11 @@
 
 
 class Dispersion:
-    def __init__(self, num_params=None, num_times=None, values=None, sd=None, \
cpmg_frqs=None, scaling_matrix=None): +    def __init__(self, model=None, \
num_params=None, num_times=None, values=None, sd=None, cpmg_frqs=None, \
scaling_matrix=None):  """Relaxation dispersion target functions for optimisation.
 
+        @keyword model:             The relaxation dispersion model to fit.
+        @type model:                str
         @keyword num_param:         The number of parameters in the model.
         @type num_param:            int
         @keyword num_times:         The number of relaxation times.
@@ -53,6 +55,10 @@
         self.cpmg_frqs = cpmg_frqs
         self.scaling_matrix = scaling_matrix
 
+        # Set up the model.
+        if model == 'fast':
+            self.func = self.func_fast_2site
+
 
     def func_fast_2site(self, params):
         """Target function for the fast 2-site exchange model.


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic