mailr27783 - /trunk/pipe_control/rdc.py


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

Header


Content

Posted by edward on March 05, 2015 - 14:49:
Author: bugman
Date: Thu Mar  5 14:49:00 2015
New Revision: 27783

URL: http://svn.gna.org/viewcvs/relax?rev=27783&view=rev
Log:
Added an extra check for the assembly of RDC data.

This is in the pipe_control.rdc.return_rdc_data() function and the check is 
for any unit vectors set
to None, which is a fatal condition.


Modified:
    trunk/pipe_control/rdc.py

Modified: trunk/pipe_control/rdc.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/rdc.py?rev=27783&r1=27782&r2=27783&view=diff
==============================================================================
--- trunk/pipe_control/rdc.py   (original)
+++ trunk/pipe_control/rdc.py   Thu Mar  5 14:49:00 2015
@@ -1152,6 +1152,11 @@
     # Fix the unit vector data structure.
     num = None
     for rdc_index in range(len(unit_vect)):
+        # Sanity check, to prevent cryptic Python errors.
+        for i in range(len(unit_vect[rdc_index])):
+            if unit_vect[rdc_index][i] == None:
+                raise RelaxError("Unit vectors of None have been detected.")
+
         # Convert to numpy structures.
         unit_vect[rdc_index] = array(unit_vect[rdc_index], float64)
 




Related Messages


Powered by MHonArc, Updated Thu Mar 05 15:20:02 2015