mailr14832 - /1.3/generic_fns/pcs.py


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

Header


Content

Posted by edward on October 12, 2011 - 14:06:
Author: bugman
Date: Wed Oct 12 14:06:31 2011
New Revision: 14832

URL: http://svn.gna.org/viewcvs/relax?rev=14832&view=rev
Log:
Fix for a divide by zero error in the PCS Q factor function.


Modified:
    1.3/generic_fns/pcs.py

Modified: 1.3/generic_fns/pcs.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/pcs.py?rev=14832&r1=14831&r2=14832&view=diff
==============================================================================
--- 1.3/generic_fns/pcs.py (original)
+++ 1.3/generic_fns/pcs.py Wed Oct 12 14:06:31 2011
@@ -376,7 +376,10 @@
             pcs2_sum = pcs2_sum + spin.pcs[align_id]**2
 
         # The Q-factor for the alignment.
-        Q = sqrt(sse / pcs2_sum)
+        if pcs2_sum:
+            Q = sqrt(sse / pcs2_sum)
+        else:
+            Q = None
         cdp.q_factors_pcs.append(Q)
 
         # Warnings (and then exit).




Related Messages


Powered by MHonArc, Updated Wed Oct 12 14:40:01 2011