Author: bugman Date: Sun Nov 9 21:22:29 2014 New Revision: 26473 URL: http://svn.gna.org/viewcvs/relax?rev=26473&view=rev Log: A divide by zero fix for the free rotor pseudo-ellipse. This is in the compile_2nd_matrix_pseudo_ellipse_free_rotor() relax library function. Modified: branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_free_rotor.py Modified: branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_free_rotor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_free_rotor.py?rev=26473&r1=26472&r2=26473&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_free_rotor.py (original) +++ branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_free_rotor.py Sun Nov 9 21:22:29 2014 @@ -78,9 +78,19 @@ """ # The surface area normalisation factor. - fact3 = 1.0 / (3.0 * pec(theta_x, theta_y)) - fact4 = 1.0 / (4.0 * pec(theta_x, theta_y)) - fact6 = 1.0 / (6.0 * pec(theta_x, theta_y)) + fact3 = 3.0 * pec(theta_x, theta_y) + fact4 = 4.0 * pec(theta_x, theta_y) + fact6 = 6.0 * pec(theta_x, theta_y) + + # Invert. + if fact3 == 0.0: + fact3 = 1e100 + fact4 = 1e100 + fact6 = 1e100 + else: + fact3 = 1.0 / fact3 + fact4 = 1.0 / fact4 + fact6 = 1.0 / fact6 # Diagonal. matrix[0, 0] = fact6 * (4.0*pi - quad(part_int_daeg2_pseudo_ellipse_free_rotor_00, -pi, pi, args=(theta_x, theta_y), full_output=1)[0])