Author: bugman
Date: Sun Nov 9 21:20:27 2014
New Revision: 26472
URL: http://svn.gna.org/viewcvs/relax?rev=26472&view=rev
Log:
A divide by zero fix for the torsionless pseudo-ellipse.
This is in the compile_2nd_matrix_pseudo_ellipse_torsionless() relax library
function.
Modified:
branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py
Modified:
branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py?rev=26472&r1=26471&r2=26472&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py
(original)
+++ branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py
Sun Nov 9 21:20:27 2014
@@ -91,8 +91,14 @@
return rotate_daeg(matrix, Rx2_eigen)
# The surface area normalisation factor.
- fact = 1.0 / (6.0 * pec(theta_x, theta_y))
- fact2 = 2.0 * fact
+ fact = 6.0 * pec(theta_x, theta_y)
+ fact2 = 0.5 * fact
+
+ # Invert.
+ if fact == 0.0:
+ fact = 1e100
+ else:
+ fact = 1.0 / fact
# Diagonal.
matrix[0, 0] = fact2 * (3.0*pi +
quad(part_int_daeg2_pseudo_ellipse_torsionless_00, -pi, pi, args=(theta_x,
theta_y), full_output=1)[0])
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits