mailr23852 - /branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_b14.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 - 19:37:
Author: tlinnet
Date: Wed Jun 11 19:37:45 2014
New Revision: 23852

URL: http://svn.gna.org/viewcvs/relax?rev=23852&view=rev
Log:
Changed unit test for B14 to match numpy input requirement.

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

Modified:
    
branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_b14.py

Modified: 
branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_b14.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_b14.py?rev=23852&r1=23851&r2=23852&view=diff
==============================================================================
--- 
branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_b14.py 
(original)
+++ 
branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_b14.py 
Wed Jun 11 19:37:45 2014
@@ -20,7 +20,7 @@
 
###############################################################################
 
 # Python module imports.
-from numpy import array, float64, int16, pi, zeros
+from numpy import array, float64, int16, ones, pi, zeros
 from unittest import TestCase
 
 # relax module imports.
@@ -59,8 +59,11 @@
         # Parameter conversions.
         k_AB, k_BA, pB, dw_frq = self.param_conversion(pA=self.pA, 
kex=self.kex, dw=self.dw, sfrq=self.sfrq)
 
+        # Convert to array.
+        a = ones([self.num_points])
+
         # Calculate the R2eff values.
-        r2eff_B14(r20a=self.r20a, r20b=self.r20b, pA=self.pA, pB=pB, 
dw=dw_frq, kex=self.kex, k_AB=k_AB, k_BA=k_BA, ncyc=self.ncyc, 
inv_tcpmg=self.inv_relax_times, tcp=self.tau_cpmg, back_calc=self.R2eff, 
num_points=self.num_points)
+        r2eff_B14(r20a=self.r20a*a, r20b=self.r20b*a, pA=self.pA, pB=pB, 
dw=dw_frq*a, kex=self.kex, k_AB=k_AB, k_BA=k_BA, ncyc=self.ncyc, 
inv_tcpmg=self.inv_relax_times, tcp=self.tau_cpmg, back_calc=self.R2eff, 
num_points=self.num_points)
 
         # Check all R2eff values.
         for i in range(self.num_points):
@@ -174,10 +177,10 @@
 
 
     def test_b14_no_rex8(self):
-        """Test the r2eff_b14() function for no exchange when kex = 1e5."""
+        """Test the r2eff_b14() function for no exchange when kex = 1e8."""
 
         # Parameter reset.
-        self.kex = 1e5
+        self.kex = 1e8
 
         # Calculate and check the R2eff values.
         self.calc_r2eff()




Related Messages


Powered by MHonArc, Updated Wed Jun 11 21:00:03 2014