mailr11326 - /1.3/maths_fns/frame_order_matrix_ops.py


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

Header


Content

Posted by edward on July 21, 2010 - 13:28:
Author: bugman
Date: Wed Jul 21 13:28:41 2010
New Revision: 11326

URL: http://svn.gna.org/viewcvs/relax?rev=11326&view=rev
Log:
Alphabetical arrangement of the functions in the frame_order_matrix_ops 
module.


Modified:
    1.3/maths_fns/frame_order_matrix_ops.py

Modified: 1.3/maths_fns/frame_order_matrix_ops.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/maths_fns/frame_order_matrix_ops.py?rev=11326&r1=11325&r2=11326&view=diff
==============================================================================
--- 1.3/maths_fns/frame_order_matrix_ops.py (original)
+++ 1.3/maths_fns/frame_order_matrix_ops.py Wed Jul 21 13:28:41 2010
@@ -37,66 +37,6 @@
 from maths_fns.rotation_matrix import two_vect_to_R
 
 
-def compile_1st_matrix_pseudo_ellipse(matrix, theta_x, theta_y, sigma_max):
-    """Generate the 1st degree Frame Order matrix for the pseudo ellipse.
-
-    @param matrix:      The Frame Order matrix, 1st degree to be populated.
-    @type matrix:       numpy 3D, rank-2 array
-    @param theta_x:     The cone opening angle along x.
-    @type theta_x:      float
-    @param theta_y:     The cone opening angle along y.
-    @type theta_y:      float
-    @param sigma_max:   The maximum torsion angle.
-    @type sigma_max:    float
-    """
-
-    # The surface area normalisation factor.
-    fact = 1.0 / (2.0 * sigma_max * pec(theta_x, theta_y))
-
-    # Numerical integration of phi of each element.
-    matrix[0, 0] = fact * quad(part_int_daeg1_pseudo_ellipse_xx, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-    matrix[1, 1] = fact * quad(part_int_daeg1_pseudo_ellipse_yy, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-    matrix[2, 2] = fact * quad(part_int_daeg1_pseudo_ellipse_zz, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-
-
-def compile_2nd_matrix_pseudo_ellipse(matrix, theta_x, theta_y, sigma_max):
-    """Generate the 2nd degree Frame Order matrix for the pseudo ellipse.
-
-    @param matrix:      The Frame Order matrix, 2nd degree to be populated.
-    @type matrix:       numpy 9D, rank-2 array
-    @param theta_x:     The cone opening angle along x.
-    @type theta_x:      float
-    @param theta_y:     The cone opening angle along y.
-    @type theta_y:      float
-    @param sigma_max:   The maximum torsion angle.
-    @type sigma_max:    float
-    """
-
-    # The surface area normalisation factor.
-    fact = 1.0 / (2.0 * sigma_max * pec(theta_x, theta_y))
-
-    # Diagonal.
-    matrix[0, 0] = fact * quad(part_int_daeg2_pseudo_ellipse_00, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-    matrix[1, 1] = fact * quad(part_int_daeg2_pseudo_ellipse_11, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-    matrix[2, 2] = fact * quad(part_int_daeg2_pseudo_ellipse_22, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-    matrix[3, 3] = fact * quad(part_int_daeg2_pseudo_ellipse_33, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-    matrix[4, 4] = fact * quad(part_int_daeg2_pseudo_ellipse_44, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-    matrix[5, 5] = fact * quad(part_int_daeg2_pseudo_ellipse_55, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-    matrix[6, 6] = fact * quad(part_int_daeg2_pseudo_ellipse_66, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-    matrix[7, 7] = fact * quad(part_int_daeg2_pseudo_ellipse_77, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-    matrix[8, 8] = fact * quad(part_int_daeg2_pseudo_ellipse_88, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
-
-    # Off diagonal set 1.
-    matrix[0, 4] = matrix[4, 0] = fact * 
quad(part_int_daeg2_pseudo_ellipse_04, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
-    matrix[0, 8] = matrix[8, 0] = fact * 
quad(part_int_daeg2_pseudo_ellipse_08, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
-    matrix[4, 8] = matrix[8, 4] = fact * 
quad(part_int_daeg2_pseudo_ellipse_48, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
-
-    # Off diagonal set 2.
-    matrix[1, 3] = matrix[3, 1] = fact * 
quad(part_int_daeg2_pseudo_ellipse_13, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
-    matrix[2, 6] = matrix[6, 2] = fact * 
quad(part_int_daeg2_pseudo_ellipse_26, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
-    matrix[5, 7] = matrix[7, 5] = fact * 
quad(part_int_daeg2_pseudo_ellipse_57, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
-
-
 def compile_2nd_matrix_iso_cone(matrix, R, z_axis, cone_axis, theta_axis, 
phi_axis, s1):
     """Generate the rotated 2nd degree Frame Order matrix.
 
@@ -147,6 +87,66 @@
     return matrix
 
 
+def compile_1st_matrix_pseudo_ellipse(matrix, theta_x, theta_y, sigma_max):
+    """Generate the 1st degree Frame Order matrix for the pseudo ellipse.
+
+    @param matrix:      The Frame Order matrix, 1st degree to be populated.
+    @type matrix:       numpy 3D, rank-2 array
+    @param theta_x:     The cone opening angle along x.
+    @type theta_x:      float
+    @param theta_y:     The cone opening angle along y.
+    @type theta_y:      float
+    @param sigma_max:   The maximum torsion angle.
+    @type sigma_max:    float
+    """
+
+    # The surface area normalisation factor.
+    fact = 1.0 / (2.0 * sigma_max * pec(theta_x, theta_y))
+
+    # Numerical integration of phi of each element.
+    matrix[0, 0] = fact * quad(part_int_daeg1_pseudo_ellipse_xx, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+    matrix[1, 1] = fact * quad(part_int_daeg1_pseudo_ellipse_yy, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+    matrix[2, 2] = fact * quad(part_int_daeg1_pseudo_ellipse_zz, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+
+
+def compile_2nd_matrix_pseudo_ellipse(matrix, theta_x, theta_y, sigma_max):
+    """Generate the 2nd degree Frame Order matrix for the pseudo ellipse.
+
+    @param matrix:      The Frame Order matrix, 2nd degree to be populated.
+    @type matrix:       numpy 9D, rank-2 array
+    @param theta_x:     The cone opening angle along x.
+    @type theta_x:      float
+    @param theta_y:     The cone opening angle along y.
+    @type theta_y:      float
+    @param sigma_max:   The maximum torsion angle.
+    @type sigma_max:    float
+    """
+
+    # The surface area normalisation factor.
+    fact = 1.0 / (2.0 * sigma_max * pec(theta_x, theta_y))
+
+    # Diagonal.
+    matrix[0, 0] = fact * quad(part_int_daeg2_pseudo_ellipse_00, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+    matrix[1, 1] = fact * quad(part_int_daeg2_pseudo_ellipse_11, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+    matrix[2, 2] = fact * quad(part_int_daeg2_pseudo_ellipse_22, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+    matrix[3, 3] = fact * quad(part_int_daeg2_pseudo_ellipse_33, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+    matrix[4, 4] = fact * quad(part_int_daeg2_pseudo_ellipse_44, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+    matrix[5, 5] = fact * quad(part_int_daeg2_pseudo_ellipse_55, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+    matrix[6, 6] = fact * quad(part_int_daeg2_pseudo_ellipse_66, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+    matrix[7, 7] = fact * quad(part_int_daeg2_pseudo_ellipse_77, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+    matrix[8, 8] = fact * quad(part_int_daeg2_pseudo_ellipse_88, -pi, pi, 
args=(theta_x, theta_y, sigma_max))[0]
+
+    # Off diagonal set 1.
+    matrix[0, 4] = matrix[4, 0] = fact * 
quad(part_int_daeg2_pseudo_ellipse_04, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
+    matrix[0, 8] = matrix[8, 0] = fact * 
quad(part_int_daeg2_pseudo_ellipse_08, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
+    matrix[4, 8] = matrix[8, 4] = fact * 
quad(part_int_daeg2_pseudo_ellipse_48, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
+
+    # Off diagonal set 2.
+    matrix[1, 3] = matrix[3, 1] = fact * 
quad(part_int_daeg2_pseudo_ellipse_13, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
+    matrix[2, 6] = matrix[6, 2] = fact * 
quad(part_int_daeg2_pseudo_ellipse_26, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
+    matrix[5, 7] = matrix[7, 5] = fact * 
quad(part_int_daeg2_pseudo_ellipse_57, -pi, pi, args=(theta_x, theta_y, 
sigma_max))[0]
+
+
 def daeg_to_rotational_superoperator(daeg, Rsuper):
     """Convert the frame order matrix (daeg) to the rotational superoperator.
 




Related Messages


Powered by MHonArc, Updated Wed Jul 21 13:40:02 2010