mailr11676 - /1.3/test_suite/system_tests/diffusion_tensor.py


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

Header


Content

Posted by edward on November 18, 2010 - 13:51:
Author: bugman
Date: Thu Nov 18 13:51:23 2010
New Revision: 11676

URL: http://svn.gna.org/viewcvs/relax?rev=11676&view=rev
Log:
The hardcoded variables in get_spheroid() are now keyword args.


Modified:
    1.3/test_suite/system_tests/diffusion_tensor.py

Modified: 1.3/test_suite/system_tests/diffusion_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/diffusion_tensor.py?rev=11676&r1=11675&r2=11676&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/diffusion_tensor.py (original)
+++ 1.3/test_suite/system_tests/diffusion_tensor.py Thu Nov 18 13:51:23 2010
@@ -263,18 +263,14 @@
         return Dx, Dy, Dz, Diso, Da, Dr, alpha, beta, gamma, D, D_prime, R
 
 
-    def get_spheroid(self):
-        """Return all the diffusion tensor info about the {Dpar, Dper, 
theta, phi} = {1e7, 2e7, 1.5, 2} spheroid tensor."""
+    def get_spheroid(self, Dpar=None, Dper=None, theta=None, phi=None):
+        """Return all the diffusion tensor info about the given spheroid 
tensor."""
 
         # The tensor info.
-        Dpar = 1e7
-        Dper = 4e7
         Diso = (Dpar + 2*Dper) / 3.0
         tm = 1.0/(6.0 * Diso)
         Da = Dpar - Dper
         Dratio = Dpar / Dper
-        theta = 0.5
-        phi = 1.0
 
         # The eigenvalues and unique axis in the eigenframe.
         Dx = Dpar
@@ -303,7 +299,7 @@
         D = dot(transpose(R), dot(D, R))
 
         # Return the data.
-        return tm, Dpar, Dper, Dx, Dy, Dz, Diso, Da, Dratio, theta, phi, D, 
D_prime, R
+        return tm, Dx, Dy, Dz, Diso, Da, Dratio, D, D_prime, R
 
 
     def test_back_calc_ellipsoid(self):
@@ -590,7 +586,8 @@
         """Test the initialisation of the spheroid diffusion tensor using 
parameter set 4."""
 
         # Get the spheroid data.
-        tm, Dpar, Dper, Dx, Dy, Dz, Diso, Da, Dratio, theta, phi, D, 
D_prime, R = self.get_spheroid()
+        Dpar, Dper, theta, phi = 1e7, 4e7, 0.5, 1.0
+        tm, Dx, Dy, Dz, Diso, Da, Dratio, D, D_prime, R = 
self.get_spheroid(Dpar=Dpar, Dper=Dper, theta=theta, phi=phi)
 
         # Create a new data pipe.
         self.interpreter.pipe.create('spheroid2', 'mf')
@@ -636,7 +633,8 @@
         """Test the initialisation of the spheroid diffusion tensor using 
parameter set 0."""
 
         # Get the spheroid data.
-        tm, Dpar, Dper, Dx, Dy, Dz, Diso, Da, Dratio, theta, phi, D, 
D_prime, R = self.get_spheroid()
+        Dpar, Dper, theta, phi = 1e7, 4e7, 0.5, 1.0
+        tm, Dx, Dy, Dz, Diso, Da, Dratio, D, D_prime, R = 
self.get_spheroid(Dpar=Dpar, Dper=Dper, theta=theta, phi=phi)
 
         # Create a new data pipe.
         self.interpreter.pipe.create('spheroid2', 'mf')
@@ -652,7 +650,8 @@
         """Test the initialisation of the spheroid diffusion tensor using 
parameter set 1."""
 
         # Get the spheroid data.
-        tm, Dpar, Dper, Dx, Dy, Dz, Diso, Da, Dratio, theta, phi, D, 
D_prime, R = self.get_spheroid()
+        Dpar, Dper, theta, phi = 1e7, 4e7, 0.5, 1.0
+        tm, Dx, Dy, Dz, Diso, Da, Dratio, D, D_prime, R = 
self.get_spheroid(Dpar=Dpar, Dper=Dper, theta=theta, phi=phi)
 
         # Create a new data pipe.
         self.interpreter.pipe.create('spheroid2', 'mf')
@@ -668,7 +667,8 @@
         """Test the initialisation of the spheroid diffusion tensor using 
parameter set 1, and angles in deg."""
 
         # Get the spheroid data.
-        tm, Dpar, Dper, Dx, Dy, Dz, Diso, Da, Dratio, theta, phi, D, 
D_prime, R = self.get_spheroid()
+        Dpar, Dper, theta, phi = 1e7, 4e7, 0.5, 1.0
+        tm, Dx, Dy, Dz, Diso, Da, Dratio, D, D_prime, R = 
self.get_spheroid(Dpar=Dpar, Dper=Dper, theta=theta, phi=phi)
 
         # Create a new data pipe.
         self.interpreter.pipe.create('spheroid2', 'mf')
@@ -684,7 +684,8 @@
         """Test the initialisation of the spheroid diffusion tensor using 
parameter set 2."""
 
         # Get the spheroid data.
-        tm, Dpar, Dper, Dx, Dy, Dz, Diso, Da, Dratio, theta, phi, D, 
D_prime, R = self.get_spheroid()
+        Dpar, Dper, theta, phi = 1e7, 4e7, 0.5, 1.0
+        tm, Dx, Dy, Dz, Diso, Da, Dratio, D, D_prime, R = 
self.get_spheroid(Dpar=Dpar, Dper=Dper, theta=theta, phi=phi)
 
         # Create a new data pipe.
         self.interpreter.pipe.create('spheroid2', 'mf')
@@ -700,7 +701,8 @@
         """Test the initialisation of the spheroid diffusion tensor using 
parameter set 3."""
 
         # Get the spheroid data.
-        tm, Dpar, Dper, Dx, Dy, Dz, Diso, Da, Dratio, theta, phi, D, 
D_prime, R = self.get_spheroid()
+        Dpar, Dper, theta, phi = 1e7, 4e7, 0.5, 1.0
+        tm, Dx, Dy, Dz, Diso, Da, Dratio, D, D_prime, R = 
self.get_spheroid(Dpar=Dpar, Dper=Dper, theta=theta, phi=phi)
 
         # Create a new data pipe.
         self.interpreter.pipe.create('spheroid2', 'mf')
@@ -716,7 +718,8 @@
         """Test the initialisation of the spheroid diffusion tensor using 
parameter set 4."""
 
         # Get the spheroid data.
-        tm, Dpar, Dper, Dx, Dy, Dz, Diso, Da, Dratio, theta, phi, D, 
D_prime, R = self.get_spheroid()
+        Dpar, Dper, theta, phi = 1e7, 4e7, 0.5, 1.0
+        tm, Dx, Dy, Dz, Diso, Da, Dratio, D, D_prime, R = 
self.get_spheroid(Dpar=Dpar, Dper=Dper, theta=theta, phi=phi)
 
         # Create a new data pipe.
         self.interpreter.pipe.create('spheroid2', 'mf')




Related Messages


Powered by MHonArc, Updated Thu Nov 18 14:20:01 2010