mailr23431 - /branches/disp_speed/test_suite/unit_tests/_lib/_dispersion/test_dpl94.py


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

Header


Content

Posted by tlinnet on May 26, 2014 - 20:13:
Author: tlinnet
Date: Mon May 26 20:13:46 2014
New Revision: 23431

URL: http://svn.gna.org/viewcvs/relax?rev=23431&view=rev
Log:
Added the 8th unit tests demonstrating edge case 'no Rex' failures of the 
model 'DPL94'.

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.

These tests cover all parameter value combinations which result in no 
exchange:

    - kex = 1e20,

Modified:
    branches/disp_speed/test_suite/unit_tests/_lib/_dispersion/test_dpl94.py

Modified: 
branches/disp_speed/test_suite/unit_tests/_lib/_dispersion/test_dpl94.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_speed/test_suite/unit_tests/_lib/_dispersion/test_dpl94.py?rev=23431&r1=23430&r2=23431&view=diff
==============================================================================
--- branches/disp_speed/test_suite/unit_tests/_lib/_dispersion/test_dpl94.py  
  (original)
+++ branches/disp_speed/test_suite/unit_tests/_lib/_dispersion/test_dpl94.py  
  Mon May 26 20:13:46 2014
@@ -67,9 +67,14 @@
         # Calculate the R1rho values.
         R1rho = r1rho_DPL94(r1rho_prime=self.r1rho_prime, 
phi_ex=phi_ex_scaled, kex=self.kex, theta=self.theta, R1=self.r1, 
spin_lock_fields2=spin_lock_omega1_squared, num_points=self.num_points)
 
+
         # Check all R1rho values.
-        for i in range(self.num_points):
-            self.assertAlmostEqual(R1rho[i], self.r1rho_prime)
+        if self.kex > 1.e5:
+            for i in range(self.num_points):
+                self.assertAlmostEqual(R1rho[i], self.r1rho_prime, 2)
+        else:
+            for i in range(self.num_points):
+                self.assertAlmostEqual(R1rho[i], self.r1rho_prime)
 
 
     def param_conversion(self, pA=None, dw=None, sfrq=None, 
spin_lock_nu1=None):
@@ -178,3 +183,13 @@
 
         # Calculate and check the R1rho values.
         self.calc_r1rho()
+
+
+    def test_dpl94_no_rex8(self):
+        """Test the r1rho_dpl94() function for no exchange when kex = 
1e20."""
+
+        # Parameter reset.
+        self.kex = 1e20
+
+        # Calculate and check the R2eff values.
+        self.calc_r1rho()




Related Messages


Powered by MHonArc, Updated Mon May 26 20:20:03 2014