mailr23837 - /branches/disp_spin_speed/lib/dispersion/cr72.py


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

Header


Content

Posted by tlinnet on June 11, 2014 - 14:55:
Author: tlinnet
Date: Wed Jun 11 14:55:34 2014
New Revision: 23837

URL: http://svn.gna.org/viewcvs/relax?rev=23837&view=rev
Log:
Removed the masked replacement if fact is less than 1.0.

This is very strange, but otherwise system test:
Relax_disp.test_hansen_cpmg_data_missing_auto_analysis

would fail.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
models for Clustered analysis.

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=23837&r1=23836&r2=23837&view=diff
==============================================================================
--- branches/disp_spin_speed/lib/dispersion/cr72.py     (original)
+++ branches/disp_spin_speed/lib/dispersion/cr72.py     Wed Jun 11 14:55:34 
2014
@@ -125,7 +125,6 @@
     # Flag to tell if values should be replaced if max_etapos in cosh 
function is violated.
     t_dw_zero = False
     t_max_etapos = False
-    t_min_fact = False
 
     # Catch parameter values that will result in no exchange, returning flat 
R2eff = R20 lines (when kex = 0.0, k_AB = 0.0).
     # Test if pA or kex is zero.
@@ -179,10 +178,8 @@
     # The arccosh argument - catch invalid values.
     fact = Dpos * cosh(etapos) - Dneg * cos(etaneg)
     if min(fact) < 1.0:
-        t_min_fact = True
-        mask_min_fact = masked_less(fact, 1.0)
-        # To prevent math errors, set fact to 1.
-        fact[mask_min_etapos.mask] = 1.0
+        back_calc[:] = r20_kex
+        return
 
     # Calculate R2eff.
     R2eff = r20_kex - cpmg_frqs * arccosh( fact )
@@ -204,14 +201,6 @@
         else:
             R2eff[mask_max_etapos.mask] = r20a[mask_max_etapos.mask]
 
-    # If fact < 1.0.
-    if t_min_fact:
-        if isinstance(r20a, float):
-            back_calc[:] = array([r20a]*num_points)
-            return
-        else:
-            R2eff[mask_min_fact.mask] = r20a[mask_min_fact.mask]
-
     # 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)):




Related Messages


Powered by MHonArc, Updated Wed Jun 11 15:20:01 2014