Author: bugman Date: Wed Aug 11 00:48:26 2010 New Revision: 11462 URL: http://svn.gna.org/viewcvs/relax?rev=11462&view=rev Log: The tmax_pseudo_ellipse() fn now handles the zero points correctly. 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=11462&r1=11461&r2=11462&view=diff ============================================================================== --- 1.3/maths_fns/frame_order_matrix_ops.py (original) +++ 1.3/maths_fns/frame_order_matrix_ops.py Wed Aug 11 00:48:26 2010 @@ -1354,4 +1354,11 @@ @rtype: float """ - return sqrt(1.0 / (cos(phi)**2/theta_x**2 + sin(phi)**2/theta_y**2)) + # Zero points. + if theta_x == 0.0: + return 0.0 + elif theta_y == 0.0: + return 0.0 + + # Return the maximum angle. + return sqrt(theta_x**2 * theta_y**2 / (cos(phi)**2*theta_y**2 + sin(phi)**2*theta_x**2))