mailr6272 - /1.3/data/align_tensor.py


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

Header


Content

Posted by sebastien . morin . 1 on May 28, 2008 - 13:25:
Author: semor
Date: Wed May 28 13:25:43 2008
New Revision: 6272

URL: http://svn.gna.org/viewcvs/relax?rev=6272&view=rev
Log:
Numeric to numpy conversion.


Modified:
    1.3/data/align_tensor.py

Modified: 1.3/data/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/align_tensor.py?rev=6272&r1=6271&r2=6272&view=diff
==============================================================================
--- 1.3/data/align_tensor.py (original)
+++ 1.3/data/align_tensor.py Wed May 28 13:25:43 2008
@@ -23,7 +23,7 @@
 # Python module imports.
 from re import search
 from math import cos, sin
-from Numeric import Float64, dot, identity, transpose, zeros
+from numpy import dot, float64, identity, transpose, zeros
 from types import ListType
 
 # relax module imports.
@@ -284,11 +284,11 @@
     @param gamma:   The Euler angle gamma in radians using the z-y-z 
convention.
     @type gamma:    float
     @return:        The Sxx unit vector.
-    @rtype:         Numeric array (Float64)
+    @rtype:         numpy array (float64)
     """
 
     # Initilise the vector.
-    Sxx_unit = zeros(3, Float64)
+    Sxx_unit = zeros(3, float64)
 
     # Calculate the x, y, and z components.
     Sxx_unit[0] = -sin(alpha) * sin(gamma)  +  cos(alpha) * cos(beta) * 
cos(gamma)
@@ -315,11 +315,11 @@
     @param gamma:   The Euler angle gamma in radians using the z-y-z 
convention.
     @type gamma:    float
     @return:        The Syy unit vector.
-    @rtype:         Numeric array (Float64)
+    @rtype:         numpy array (float64)
     """
 
     # Initilise the vector.
-    Syy_unit = zeros(3, Float64)
+    Syy_unit = zeros(3, float64)
 
     # Calculate the x, y, and z components.
     Syy_unit[0] = cos(alpha) * sin(gamma)  +  sin(alpha) * cos(beta) * 
cos(gamma)
@@ -344,11 +344,11 @@
     @param gamma:   The Euler angle gamma in radians using the z-y-z 
convention.
     @type gamma:    float
     @return:        The Szz unit vector.
-    @rtype:         Numeric array (Float64)
+    @rtype:         numpy array (float64)
     """
 
     # Initilise the vector.
-    Szz_unit = zeros(3, Float64)
+    Szz_unit = zeros(3, float64)
 
     # Calculate the x, y, and z components.
     Szz_unit[0] = -sin(beta) * cos(gamma)
@@ -410,17 +410,17 @@
               | Sxx_unit[2]  Syy_unit[2]  Szz_unit[2] |
 
     @param Sxx_unit:    The Sxx unit vector.
-    @type Sxx_unit:     Numeric array (Float64)
+    @type Sxx_unit:     numpy array (float64)
     @param Syy_unit:    The Syy unit vector.
-    @type Syy_unit:     Numeric array (Float64)
+    @type Syy_unit:     numpy array (float64)
     @param Szz_unit:    The Szz unit vector.
-    @type Szz_unit:     Numeric array (Float64)
+    @type Szz_unit:     numpy array (float64)
     @return:            The rotation matrix.
-    @rtype:             Numeric array ((3, 3), Float64)
+    @rtype:             numpy array ((3, 3), float64)
     """
 
     # Initialise the rotation matrix.
-    rotation = identity(3, Float64)
+    rotation = identity(3, float64)
 
     # First column of the rotation matrix.
     rotation[:, 0] = Sxx_unit
@@ -455,7 +455,7 @@
     """
 
     # Initialise the tensor.
-    tensor = zeros((3, 3), Float64)
+    tensor = zeros((3, 3), float64)
 
     # Populate the diagonal elements.
     tensor[0, 0] = Sxx
@@ -486,11 +486,11 @@
         R^T . tensor_diag . R.
 
     @param rotation:    The rotation matrix.
-    @type rotation:     Numeric array ((3, 3), Float64)
+    @type rotation:     numpy array ((3, 3), float64)
     @param tensor:      The full alignment tensor.
-    @type tensor:       Numeric array ((3, 3), Float64)
+    @type tensor:       numpy array ((3, 3), float64)
     @return:        The diagonalised alignment tensor.
-    @rtype:         Numeric array ((3, 3), Float64)
+    @rtype:         numpy array ((3, 3), float64)
     """
 
     # Rotation (R^T . tensor_diag . R).




Related Messages


Powered by MHonArc, Updated Wed May 28 21:00:36 2008