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)
_______________________________________________
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