Author: tlinnet
Date: Wed May 21 13:02:58 2014
New Revision: 23297

URL: http://svn.gna.org/viewcvs/relax?rev=23297&view=rev
Log:
Align math-domain catching for model IT99 with trunk implementation.

task #7793: (https://gna.org/task/?7793) Speed-up of dispersion models.

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

The catching of errors have to be more careful.

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

Modified: branches/disp_speed/lib/dispersion/it99.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_speed/lib/dispersion/it99.py?rev=23297&r1=23296&r2=23297&view=diff
==============================================================================
--- branches/disp_speed/lib/dispersion/it99.py  (original)
+++ branches/disp_speed/lib/dispersion/it99.py  Wed May 21 13:02:58 2014
@@ -107,6 +107,11 @@
     # The numerator.
     numer = padw2 * pB * tex
 
+    # Catch zeros (to avoid pointless mathematical operations).
+    # This will result in no exchange, returning flat lines.
+    if numer == 0.0:
+        return array([r20]*num_points)
+
     # The effective rotating frame field.
     omega_1eff4 = 2304.0 * cpmg_frqs**4
 


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to