Author: bugman Date: Fri Nov 22 11:03:35 2013 New Revision: 21595 URL: http://svn.gna.org/viewcvs/relax?rev=21595&view=rev Log: Improvements for the 'CR72' and 'MQ CR72' dispersion model R2eff calculating functions. The numpy.arccosh() function can handle all input values when complex, therefore the checks for the real part being above 1 are not necessary. Modified: branches/relax_disp/lib/dispersion/cr72.py branches/relax_disp/lib/dispersion/mq_cr72.py Modified: branches/relax_disp/lib/dispersion/cr72.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/lib/dispersion/cr72.py?rev=21595&r1=21594&r2=21595&view=diff ============================================================================== --- branches/relax_disp/lib/dispersion/cr72.py (original) +++ branches/relax_disp/lib/dispersion/cr72.py Fri Nov 22 11:03:35 2013 @@ -126,11 +126,5 @@ back_calc[i] = 1e100 continue - # Part of the equation (catch values < 1 to prevent math domain errors). - part = Dpos * cosh(etapos) - Dneg * cos(etaneg) - if part < 1.0: - back_calc[i] = 1e100 - continue - # The full formula. - back_calc[i] = r20_kex - cpmg_frqs[i] * arccosh(part) + back_calc[i] = r20_kex - cpmg_frqs[i] * arccosh(Dpos * cosh(etapos) - Dneg * cos(etaneg)) Modified: branches/relax_disp/lib/dispersion/mq_cr72.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/lib/dispersion/mq_cr72.py?rev=21595&r1=21594&r2=21595&view=diff ============================================================================== --- branches/relax_disp/lib/dispersion/mq_cr72.py (original) +++ branches/relax_disp/lib/dispersion/mq_cr72.py Fri Nov 22 11:03:35 2013 @@ -122,13 +122,8 @@ Q = 1 - mD**2 + mD*mZ - mZ**2 + 0.5*(mD + mZ)*sqrt_pBpA Q = Q.real - # Part of the equation (catch values < 1 to prevent math domain errors). - part = Dpos * cosh(etapos) - Dneg * cos(etaneg) - if part.real < 1.0: - part = -part - # The first eigenvalue. - lambda1 = r20_kex - cpmg_frqs[i] * arccosh(part) + lambda1 = r20_kex - cpmg_frqs[i] * arccosh(Dpos * cosh(etapos) - Dneg * cos(etaneg)) # The full formula. back_calc[i] = lambda1.real - inv_tcpmg * log(Q) / power[i]