mailr4790 - /branches/N_state_model/test_suite/unit_tests/_data/test_align_tensor.py


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

Header


Content

Posted by edward on January 16, 2008 - 16:49:
Author: bugman
Date: Wed Jan 16 16:49:28 2008
New Revision: 4790

URL: http://svn.gna.org/viewcvs/relax?rev=4790&view=rev
Log:
Bug fixes for the alignment tensor setting unit tests.

The diagonalised tensor returned by calc_objects() was not the true 
diagonalised tensor but just the
Sxx, Syy, and Szz along the diagonal of a matrix.  The non-diagonalised 
tensor is now returned.


Modified:
    branches/N_state_model/test_suite/unit_tests/_data/test_align_tensor.py

Modified: 
branches/N_state_model/test_suite/unit_tests/_data/test_align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/test_suite/unit_tests/_data/test_align_tensor.py?rev=4790&r1=4789&r2=4790&view=diff
==============================================================================
--- branches/N_state_model/test_suite/unit_tests/_data/test_align_tensor.py 
(original)
+++ branches/N_state_model/test_suite/unit_tests/_data/test_align_tensor.py 
Wed Jan 16 16:49:28 2008
@@ -42,12 +42,12 @@
         Sxxyy = Sxx - Syy
 
         # Matrices.
-        tensor_diag = array([[ Sxx,  0.0,  0.0],
-                             [  0.0, Syy,  0.0],
-                             [  0.0,  0.0, Szz]])
+        tensor = array([[ Sxx, Sxy, Sxz],
+                        [ Sxy, Syy, Syz],
+                        [ Sxz, Syz, Szz]])
 
         # Return the objects.
-        return Szz, Sxxyy, tensor_diag
+        return Szz, Sxxyy, tensor
 
 
     def setUp(self):
@@ -96,14 +96,14 @@
         self.assertEqual(self.align_data.Syz_sim[0], Syz)
 
         # Calculate the diffusion tensor objects.
-        Szz, Sxxyy, tensor_diag = self.calc_objects(Sxx, Syy, Sxy, Sxz, Syz)
+        Szz, Sxxyy, tensor = self.calc_objects(Sxx, Syy, Sxy, Sxz, Syz)
 
         # Test the automatically created values.
         self.assertEqual(self.align_data.Szz_sim[0], Szz)
         self.assertEqual(self.align_data.Sxxyy_sim[0], Sxxyy)
 
         # Test the matrices.
-        self.assertEqual(self.align_data.tensor_diag_sim[0].tostring(), 
tensor_diag.tostring())
+        self.assertEqual(self.align_data.tensor_sim[0].tostring(), 
tensor.tostring())
 
 
     def test_set_Szz(self):
@@ -149,14 +149,14 @@
         self.assertEqual(self.align_data.Syz_err, Syz)
 
         # Calculate the diffusion tensor objects.
-        Szz, Sxxyy, tensor_diag = self.calc_objects(Sxx, Syy, Sxy, Sxz, Syz)
+        Szz, Sxxyy, tensor = self.calc_objects(Sxx, Syy, Sxy, Sxz, Syz)
 
         # Test the automatically created values.
         self.assertEqual(self.align_data.Szz_err, Szz)
         self.assertEqual(self.align_data.Sxxyy_err, Sxxyy)
 
         # Test the matrices.
-        self.assertEqual(self.align_data.tensor_diag_err.tostring(), 
tensor_diag.tostring())
+        self.assertEqual(self.align_data.tensor_err.tostring(), 
tensor.tostring())
 
 
     def test_set_params(self):
@@ -192,14 +192,14 @@
         self.assertEqual(self.align_data.Syz, Syz)
 
         # Calculate the diffusion tensor objects.
-        Szz, Sxxyy, tensor_diag = self.calc_objects(Sxx, Syy, Sxy, Sxz, Syz)
+        Szz, Sxxyy, tensor = self.calc_objects(Sxx, Syy, Sxy, Sxz, Syz)
 
         # Test the automatically created values.
         self.assertEqual(self.align_data.Szz, Szz)
         self.assertEqual(self.align_data.Sxxyy, Sxxyy)
 
         # Test the matrices.
-        self.assertEqual(self.align_data.tensor_diag.tostring(), 
tensor_diag.tostring())
+        self.assertEqual(self.align_data.tensor.tostring(), 
tensor.tostring())
 
 
     def test_set_sim(self):
@@ -257,14 +257,14 @@
         self.assertEqual(self.align_data.Syz_sim[0], Syz)
 
         # Calculate the diffusion tensor objects.
-        Szz, Sxxyy, tensor_diag = self.calc_objects(Sxx, Syy, Sxy, Sxz, Syz)
+        Szz, Sxxyy, tensor = self.calc_objects(Sxx, Syy, Sxy, Sxz, Syz)
 
         # Test the automatically created values.
         self.assertEqual(self.align_data.Szz_sim[0], Szz)
         self.assertEqual(self.align_data.Sxxyy_sim[0], Sxxyy)
 
         # Test the matrices.
-        self.assertEqual(self.align_data.tensor_diag_sim[0].tostring(), 
tensor_diag.tostring())
+        self.assertEqual(self.align_data.tensor_sim[0].tostring(), 
tensor.tostring())
 
 
     def test_set_Sxx(self):




Related Messages


Powered by MHonArc, Updated Wed Jan 16 17:00:18 2008