Author: tlinnet Date: Sat Jun 7 21:43:21 2014 New Revision: 23724 URL: http://svn.gna.org/viewcvs/relax?rev=23724&view=rev Log: Temporary changed the lib/dispersion/cr72.py function to unsafe state. This change turns-off all the safety measures, since they have to be re-implemented for higher dimensional structures. Modified: branches/disp_spin_speed/lib/dispersion/cr72.py Modified: branches/disp_spin_speed/lib/dispersion/cr72.py URL: http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/lib/dispersion/cr72.py?rev=23724&r1=23723&r2=23724&view=diff ============================================================================== --- branches/disp_spin_speed/lib/dispersion/cr72.py (original) +++ branches/disp_spin_speed/lib/dispersion/cr72.py Sat Jun 7 21:43:21 2014 @@ -92,6 +92,7 @@ """ # Python module imports. +import numpy as np from numpy import arccosh, array, cos, cosh, isfinite, min, max, sqrt, sum # Repetitive calculations (to speed up calculations). @@ -122,9 +123,9 @@ """ # 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 kex == 0.0: - back_calc[:] = array([r20a]*num_points) - return + #if dw == 0.0 or pA == 1.0 or kex == 0.0: + # back_calc[:] = array([r20a]*num_points) + # return # The B population. pB = 1.0 - pA @@ -136,7 +137,7 @@ k_AB = pB * kex # The Psi and zeta values. - if r20a != r20b: + if not np.allclose(r20a, r20b): fact = r20a - r20b - k_BA + k_AB Psi = fact**2 - dw2 + 4.0*pA*pB*kex**2 zeta = 2.0*dw * fact @@ -158,22 +159,22 @@ # Catch math domain error of cosh(val > 710). # This is when etapos > 710. - if max(etapos) > 700: - back_calc[:] = array([r20a]*num_points) - return + #if max(etapos) > 700: + # back_calc[:] = array([r20a]*num_points) + # return # The arccosh argument - catch invalid values. fact = Dpos * cosh(etapos) - Dneg * cos(etaneg) - if min(fact) < 1.0: - back_calc[:] = array([r20_kex]*num_points) - return + #if min(fact) < 1.0: + # back_calc[:] = array([r20_kex]*num_points) + # return # Calculate R2eff. R2eff = r20_kex - cpmg_frqs * arccosh( fact ) # Catch errors, taking a sum over array is the fastest way to check for # +/- inf (infinity) and nan (not a number). - if not isfinite(sum(R2eff)): - R2eff = array([1e100]*num_points) + #if not isfinite(sum(R2eff)): + # R2eff = array([1e100]*num_points) back_calc[:] = R2eff