mailr23331 - /trunk/lib/dispersion/ns_cpmg_2site_expanded.py


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

Header


Content

Posted by edward on May 22, 2014 - 14:52:
Author: bugman
Date: Thu May 22 14:52:08 2014
New Revision: 23331

URL: http://svn.gna.org/viewcvs/relax?rev=23331&view=rev
Log:
Fix for all edge case 'no Rex' failures of the 'NS CPMG 2-site expanded' 
model.

This uses the no exchange checking idea, modified to function in the relax 
trunk, from
http://article.gmane.org/gmane.science.nmr.relax.devel/5847.  This is 
importantly on line 1 of the
function.

The recently introduced set of 7 unit tests (r23327) comprehensively showing 
these failures now all
pass.  This commit is mainly for demonstration purposes.


Modified:
    trunk/lib/dispersion/ns_cpmg_2site_expanded.py

Modified: trunk/lib/dispersion/ns_cpmg_2site_expanded.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/ns_cpmg_2site_expanded.py?rev=23331&r1=23330&r2=23331&view=diff
==============================================================================
--- trunk/lib/dispersion/ns_cpmg_2site_expanded.py      (original)
+++ trunk/lib/dispersion/ns_cpmg_2site_expanded.py      Thu May 22 14:52:08 
2014
@@ -272,6 +272,12 @@
     @type num_cpmg:             numpy int16, rank-1 array
     """
 
+    # Catch parameter values that will result in no exchange, returning flat 
R2eff = R20 lines (when kex = 0.0, k_AB = 0.0).
+    if dw == 0.0 or pA == 1.0 or k_AB == 0.0:
+        for i in range(num_points):
+            back_calc[i] = r20
+        return
+
     # Repeditive calculations.
     half_tcp = 0.5 * tcp
     k_AB_plus_k_BA = k_AB + k_BA




Related Messages


Powered by MHonArc, Updated Thu May 22 15:00:03 2014