Author: bugman Date: Sat Nov 1 17:00:00 2014 New Revision: 26400 URL: http://svn.gna.org/viewcvs/relax?rev=26400&view=rev Log: Zero values can now be handled in the pseudo-ellipse 1st degree frame order matrix function. This is in lib.frame_order.pseudo_ellipse.compile_1st_matrix_pseudo_ellipse(). Modified: branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py Modified: branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py?rev=26400&r1=26399&r2=26400&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py (original) +++ branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse.py Sat Nov 1 17:00:00 2014 @@ -52,7 +52,13 @@ """ # The surface area normalisation factor. - fact = 1.0 / (2.0 * sigma_max * pec(theta_x, theta_y)) + fact = 2.0 * sigma_max * pec(theta_x, theta_y) + + # Invert. + if fact == 0.0: + fact = 1e100 + else: + fact = 1.0 / fact # 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), full_output=1)[0]