mailr21590 - in /branches/relax_disp: lib/dispersion/mq_cr72.py target_functions/relax_disp.py


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

Header


Content

Posted by edward on November 21, 2013 - 22:31:
Author: bugman
Date: Thu Nov 21 22:31:40 2013
New Revision: 21590

URL: http://svn.gna.org/viewcvs/relax?rev=21590&view=rev
Log:
Another bug fix for the 'MQ CR72' dispersion model.

The nu_CPMG value rather than the relaxation time was being used to calculate 
the R2eff values as
the division by 'n' was missing.


Modified:
    branches/relax_disp/lib/dispersion/mq_cr72.py
    branches/relax_disp/target_functions/relax_disp.py

Modified: branches/relax_disp/lib/dispersion/mq_cr72.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/lib/dispersion/mq_cr72.py?rev=21590&r1=21589&r2=21590&view=diff
==============================================================================
--- branches/relax_disp/lib/dispersion/mq_cr72.py (original)
+++ branches/relax_disp/lib/dispersion/mq_cr72.py Thu Nov 21 22:31:40 2013
@@ -31,7 +31,7 @@
 from numpy import arccosh, cos, cosh, log, sin, sqrt
 
 
-def r2eff_mq_cr72(r20=None, pA=None, pB=None, dw=None, dwH=None, kex=None, 
k_AB=None, k_BA=None, cpmg_frqs=None, tcp=None, back_calc=None, 
num_points=None, power=None):
+def r2eff_mq_cr72(r20=None, pA=None, pB=None, dw=None, dwH=None, kex=None, 
k_AB=None, k_BA=None, cpmg_frqs=None, inv_tcpmg=None, tcp=None, 
back_calc=None, num_points=None, power=None):
     """The CR72 model extended to MQ CPMG data.
 
     This function calculates and stores the R2eff values.
@@ -55,6 +55,8 @@
     @type k_BA:             float
     @keyword cpmg_frqs:     The CPMG nu1 frequencies.
     @type cpmg_frqs:        numpy rank-1 float array
+    @keyword inv_tcpmg:     The inverse of the total duration of the CPMG 
element (in inverse seconds).
+    @type inv_tcpmg:        float
     @keyword tcp:           The tau_CPMG times (1 / 4.nu1).
     @type tcp:              numpy rank-1 float array
     @keyword back_calc:     The array for holding the back calculated R2eff 
values.  Each element corresponds to one of the CPMG nu1 frequencies.
@@ -129,4 +131,4 @@
         lambda1 = r20_kex - cpmg_frqs[i] * arccosh(part)
 
         # The full formula.
-        back_calc[i] = lambda1.real - cpmg_frqs[i] * log(Q) / power[i]
+        back_calc[i] = lambda1.real - inv_tcpmg * log(Q) / power[i]

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=21590&r1=21589&r2=21590&view=diff
==============================================================================
--- branches/relax_disp/target_functions/relax_disp.py (original)
+++ branches/relax_disp/target_functions/relax_disp.py Thu Nov 21 22:31:40 
2013
@@ -1042,7 +1042,7 @@
                         aliased_dwH = dw_frq
 
                     # Back calculate the R2eff values.
-                    r2eff_mq_cr72(r20=R20[r20_index], pA=pA, pB=pB, 
dw=aliased_dw, dwH=aliased_dwH, kex=kex, k_AB=k_AB, k_BA=k_BA, 
cpmg_frqs=self.cpmg_frqs[exp_index][frq_index], 
tcp=self.tau_cpmg[exp_index][frq_index], 
back_calc=self.back_calc[exp_index][spin_index][frq_index], 
num_points=self.num_disp_points[exp_index][frq_index], 
power=self.power[exp_index][frq_index])
+                    r2eff_mq_cr72(r20=R20[r20_index], pA=pA, pB=pB, 
dw=aliased_dw, dwH=aliased_dwH, kex=kex, k_AB=k_AB, k_BA=k_BA, 
cpmg_frqs=self.cpmg_frqs[exp_index][frq_index], 
inv_tcpmg=self.inv_relax_times[exp_index][frq_index], 
tcp=self.tau_cpmg[exp_index][frq_index], 
back_calc=self.back_calc[exp_index][spin_index][frq_index], 
num_points=self.num_disp_points[exp_index][frq_index], 
power=self.power[exp_index][frq_index])
 
                     # For all missing data points, set the back-calculated 
value to the measured values so that it has no effect on the chi-squared 
value.
                     for point_index in 
range(self.num_disp_points[exp_index][frq_index]):




Related Messages


Powered by MHonArc, Updated Thu Nov 21 23:00:03 2013