mailr23416 - /branches/disp_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 May 26, 2014 - 13:38:
Author: tlinnet
Date: Mon May 26 13:38:13 2014
New Revision: 23416

URL: http://svn.gna.org/viewcvs/relax?rev=23416&view=rev
Log:
Critical fix for the math domain catching of model B14.

This was discovered with the added 8 unit tests demonstrating edge case 'no 
Rex' failures.

This follows from the ideas in the post 
http://article.gmane.org/gmane.science.nmr.relax.devel/5858.
This is related to: task #7793: (https://gna.org/task/?7793) Speed-up of 
dispersion models.

This is to implement catching of math domain errors, before they occur.

When kex is large, ex: kex = 1e5, "nan" values where produced,
which was replaced with 1e100.

The cathing of these occurences needed to be re-written.

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

Modified: branches/disp_speed/lib/dispersion/b14.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_speed/lib/dispersion/b14.py?rev=23416&r1=23415&r2=23416&view=diff
==============================================================================
--- branches/disp_speed/lib/dispersion/b14.py   (original)
+++ branches/disp_speed/lib/dispersion/b14.py   Mon May 26 13:38:13 2014
@@ -148,7 +148,7 @@
     """
 
     # 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:
+    if dw == 0.0 or pA == 1.0 or k_AB == 0.0 or kex >= 1.e5:
         return array([r20a]*num_points)
 
     # Repetitive calculations (to speed up calculations).




Related Messages


Powered by MHonArc, Updated Mon May 26 14:00:03 2014