mailr21717 - /trunk/lib/dispersion/cr72.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on November 29, 2013 - 12:28:
Author: bugman
Date: Fri Nov 29 12:28:05 2013
New Revision: 21717

URL: http://svn.gna.org/viewcvs/relax?rev=21717&view=rev
Log:
The lib.dispersion.cr72.r2eff_CR72() function is now more robust.

Values less than 1.0 are now caught to avoid passing it into the 
numpy.arccosh() function.  This
avoids many warning messages on Mac OS X.


Modified:
    trunk/lib/dispersion/cr72.py

Modified: trunk/lib/dispersion/cr72.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/cr72.py?rev=21717&r1=21716&r2=21717&view=diff
==============================================================================
--- trunk/lib/dispersion/cr72.py (original)
+++ trunk/lib/dispersion/cr72.py Fri Nov 29 12:28:05 2013
@@ -126,5 +126,11 @@
             back_calc[i] = 1e100
             continue
 
+        # The arccosh argument - catch invalid values.
+        fact = Dpos * cosh(etapos) - Dneg * cos(etaneg)
+        if fact < 1.0:
+            back_calc[i] = r20_kex
+            continue
+
         # The full formula.
-        back_calc[i] = r20_kex - cpmg_frqs[i] * arccosh(Dpos * cosh(etapos) 
- Dneg * cos(etaneg))
+        back_calc[i] = r20_kex - cpmg_frqs[i] * arccosh(fact)




Related Messages


Powered by MHonArc, Updated Fri Nov 29 15:00:02 2013