mailr23900 - /branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_tap03.py


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

Header


Content

Posted by tlinnet on June 13, 2014 - 07:21:
Author: tlinnet
Date: Fri Jun 13 07:21:00 2014
New Revision: 23900

URL: http://svn.gna.org/viewcvs/relax?rev=23900&view=rev
Log:
Made dw in unit tests of TAP03 be of numpy array.

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_tap03.py

Modified: 
branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_tap03.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_tap03.py?rev=23900&r1=23899&r2=23900&view=diff
==============================================================================
--- 
branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_tap03.py 
      (original)
+++ 
branches/disp_spin_speed/test_suite/unit_tests/_lib/_dispersion/test_tap03.py 
      Fri Jun 13 07:21:00 2014
@@ -21,7 +21,7 @@
 
###############################################################################
 
 # Python module imports.
-from numpy import arctan2, array, cos, float64, int16, pi, sin, zeros
+from numpy import arctan2, array, cos, float64, int16, pi, sin, ones, zeros
 from unittest import TestCase
 
 # relax module imports.
@@ -68,8 +68,11 @@
         # Parameter conversions.
         pB, dw_frq, spin_lock_omega1, spin_lock_omega1_squared = 
self.param_conversion(pA=self.pA, dw=self.dw, sfrq=self.sfrq, 
spin_lock_nu1=self.spin_lock_nu1)
 
+        # Convert to numpy array.
+        a = ones([self.num_points])
+
         # Calculate the R1rho values.
-        r1rho_TAP03(r1rho_prime=self.r1rho_prime, omega=self.omega, 
offset=self.offset, pA=self.pA, pB=pB, dw=dw_frq, kex=self.kex, R1=self.r1, 
spin_lock_fields=spin_lock_omega1, 
spin_lock_fields2=spin_lock_omega1_squared, back_calc=self.R1rho, 
num_points=self.num_points)
+        r1rho_TAP03(r1rho_prime=self.r1rho_prime, omega=self.omega, 
offset=self.offset, pA=self.pA, pB=pB, dw=dw_frq*a, kex=self.kex, R1=self.r1, 
spin_lock_fields=spin_lock_omega1, 
spin_lock_fields2=spin_lock_omega1_squared, back_calc=self.R1rho, 
num_points=self.num_points)
 
         # Compare to function value.
         # Larmor frequency [s^-1].




Related Messages


Powered by MHonArc, Updated Fri Jun 13 07:40:02 2014