Hi Troels, You may wish to revert this change due to the unit test bug:
http://article.gmane.org/gmane.science.nmr.relax.devel/5938 Cheers, Edward On 26 May 2014 23:09, <[email protected]> wrote: > Author: tlinnet > Date: Mon May 26 23:09:47 2014 > New Revision: 23441 > > URL: http://svn.gna.org/viewcvs/relax?rev=23441&view=rev > Log: > Critical fix for the math domain catching of model IT99. > > This was discovered with the added 8 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. > > The cathing of these occurences needed to be re-written. > > Modified: > branches/disp_speed/lib/dispersion/mp05.py > > Modified: branches/disp_speed/lib/dispersion/mp05.py > URL: > http://svn.gna.org/viewcvs/relax/branches/disp_speed/lib/dispersion/mp05.py?rev=23441&r1=23440&r2=23441&view=diff > ============================================================================== > --- branches/disp_speed/lib/dispersion/mp05.py (original) > +++ branches/disp_speed/lib/dispersion/mp05.py Mon May 26 23:09:47 2014 > @@ -122,16 +122,11 @@ > # Catch zeros (to avoid pointless mathematical operations). > # This will result in no exchange, returning flat lines. > if numer == 0.0: > - return R1_cos_theta2 + R1rho_prime_sin_theta2 > + return array([r1rho_prime]*num_points) > > # Denominator. > waeff2_wbeff2 = waeff2*wbeff2 > fact_denom = waeff2_wbeff2 + weff2*kex2 > - > - # Catch math domain error of dividing with 0. > - # This is when fact_denom = 0. > - if min(abs(fact_denom)) == 0: > - return array([1e100]*num_points) > > fact = 1.0 + 2.0*kex2*(pA*waeff2 + pB*wbeff2) / fact_denom > denom = waeff2_wbeff2/weff2 + kex2 - sin_theta2*phi_ex*(fact) > > > _______________________________________________ > relax (http://www.nmr-relax.com) > > This is the relax-commits mailing list > [email protected] > > 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 _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-devel mailing list [email protected] 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-devel

