mailr23869 - /branches/disp_spin_speed/lib/dispersion/b14.py


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

Header


Content

Posted by tlinnet on June 12, 2014 - 12:23:
Author: tlinnet
Date: Thu Jun 12 12:23:20 2014
New Revision: 23869

URL: http://svn.gna.org/viewcvs/relax?rev=23869&view=rev
Log:
Made the lib function of B14 accept dw of the original array.

This is for speed-up.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
models for Clustered analysis.

Modified:
    branches/disp_spin_speed/lib/dispersion/b14.py

Modified: branches/disp_spin_speed/lib/dispersion/b14.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/lib/dispersion/b14.py?rev=23869&r1=23868&r2=23869&view=diff
==============================================================================
--- branches/disp_spin_speed/lib/dispersion/b14.py      (original)
+++ branches/disp_spin_speed/lib/dispersion/b14.py      Thu Jun 12 12:23:20 
2014
@@ -116,7 +116,7 @@
 # Repetitive calculations (to speed up calculations).
 g_fact = 1/sqrt(2)
 
-def r2eff_B14(r20a=None, r20b=None, pA=None, pB=None, dw=None, kex=None, 
k_AB=None, k_BA=None, ncyc=None, inv_tcpmg=None, tcp=None, back_calc=None, 
num_points=None):
+def r2eff_B14(r20a=None, r20b=None, pA=None, pB=None, dw=None, dw_orig=None, 
kex=None, k_AB=None, k_BA=None, ncyc=None, inv_tcpmg=None, tcp=None, 
back_calc=None, num_points=None):
     """Calculate the R2eff values for the CR72 model.
 
     See the module docstring for details.
@@ -132,6 +132,8 @@
     @type pB:               float
     @keyword dw:            The chemical exchange difference between states 
A and B in rad/s.
     @type dw:               numpy float array of rank [NE][NS][[NM][NO][ND]
+    @keyword dw_orig:       The chemical exchange difference between states 
A and B in ppm. This is only for faster checking of zero value, which result 
in no exchange.
+    @type dw_orig:          numpy float array of rank-1
     @keyword kex:           The kex parameter value (the exchange rate in 
rad/s).
     @type kex:              float
     @keyword k_AB:          The rate of exchange from site A to B (rad/s).
@@ -163,7 +165,7 @@
             return
 
     # Test if dw is zero. Wait for replacement, since this is spin specific.
-    if min(fabs(dw)) == 0.0:
+    if min(fabs(dw_orig)) == 0.0:
         t_dw_zero = True
         mask_dw_zero = masked_where(dw == 0.0, dw)
 




Related Messages


Powered by MHonArc, Updated Thu Jun 12 12:40:03 2014