mailr23357 - /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 22, 2014 - 19:15:
Author: tlinnet
Date: Thu May 22 19:15:34 2014
New Revision: 23357

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

This was discovered with the added 7 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.

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=23357&r1=23356&r2=23357&view=diff
==============================================================================
--- branches/disp_speed/lib/dispersion/b14.py   (original)
+++ branches/disp_speed/lib/dispersion/b14.py   Thu May 22 19:15:34 2014
@@ -147,6 +147,10 @@
     @type num_points:       int
     """
 
+    # 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:
+        return array([r20a]*num_points)
+
     # Repetitive calculations (to speed up calculations).
     deltaR2 = r20a - r20b
 




Related Messages


Powered by MHonArc, Updated Thu May 22 19:20:02 2014