mailr3961 - /1.3/test_suite/unit_tests/diffusion_tensor_testing_base.py


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

Header


Content

Posted by edward on November 25, 2007 - 21:08:
Author: bugman
Date: Sun Nov 25 21:08:44 2007
New Revision: 3961

URL: http://svn.gna.org/viewcvs/relax?rev=3961&view=rev
Log:
Wrote a unit test for the setting up of an ellipsoidal diffusion tensor.


Modified:
    1.3/test_suite/unit_tests/diffusion_tensor_testing_base.py

Modified: 1.3/test_suite/unit_tests/diffusion_tensor_testing_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/diffusion_tensor_testing_base.py?rev=3961&r1=3960&r2=3961&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/diffusion_tensor_testing_base.py (original)
+++ 1.3/test_suite/unit_tests/diffusion_tensor_testing_base.py Sun Nov 25 
21:08:44 2007
@@ -67,6 +67,25 @@
         self.assertRaises(RelaxError, self.diffusion_tensor_fns.init, 
params=1e-9, angle_units='aaa')
 
 
+    def test_init_ellipsoid(self):
+        """Test the setting up of a ellipsoid diffusion tensor.
+
+        The functions tested are both generic_fns.diffusion_tensor.init() and
+        prompt.diffusion_tensor.init().
+        """
+
+        # Initialise the tensor.
+        self.diffusion_tensor_fns.init(params=(13.9, 1.8, 0.7, 10.6, -23.3, 
0.34), time_scale=1e-9, d_scale=1e7, angle_units='rad', param_types=0, 
fixed=1)
+
+        # Test the diffusion tensor.
+        self.assertEqual(relax_data_store['orig'].diff_tensor.type, 
'ellipsoidal')
+        self.assertAlmostEqual(relax_data_store['orig'].diff_tensor.tm * 
1e9, 13.9, 14)
+        self.assertEqual(relax_data_store['orig'].diff_tensor.Da, 
5.2854122621564493e6)
+        self.assertEqual(relax_data_store['orig'].diff_tensor.theta, 
2.0943951023931948)
+        self.assertEqual(relax_data_store['orig'].diff_tensor.phi, 
2.7925268031909276)
+
+
+
     def test_init_sphere(self):
         """Test the setting up of a spherical diffusion tensor.
 
@@ -98,4 +117,3 @@
         self.assertEqual(relax_data_store['orig'].diff_tensor.Da, 
5.2854122621564493e6)
         self.assertEqual(relax_data_store['orig'].diff_tensor.theta, 
2.0943951023931948)
         self.assertEqual(relax_data_store['orig'].diff_tensor.phi, 
2.7925268031909276)
-




Related Messages


Powered by MHonArc, Updated Sun Nov 25 21:20:21 2007