Author: tlinnet Date: Wed May 21 13:02:56 2014 New Revision: 23296 URL: http://svn.gna.org/viewcvs/relax?rev=23296&view=rev Log: Align math-domain catching for model DPL94 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/dpl94.py Modified: branches/disp_speed/lib/dispersion/dpl94.py URL: http://svn.gna.org/viewcvs/relax/branches/disp_speed/lib/dispersion/dpl94.py?rev=23296&r1=23295&r2=23296&view=diff ============================================================================== --- branches/disp_speed/lib/dispersion/dpl94.py (original) +++ branches/disp_speed/lib/dispersion/dpl94.py Wed May 21 13:02:56 2014 @@ -98,6 +98,11 @@ # The numerator. numer = sin_theta2 * phi_ex * kex + # Catch zeros (to avoid pointless mathematical operations). + # This will result in no exchange, returning flat lines. + if min(numer) == 0.0: + return R1_R2 + # Denominator. denom = kex2 + spin_lock_fields2