Author: bugman Date: Fri Jun 14 11:39:19 2013 New Revision: 20114 URL: http://svn.gna.org/viewcvs/relax?rev=20114&view=rev Log: Added a check for the RDC data type to the rdc.read user function. 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=20114&r1=20113&r2=20114&view=diff ============================================================================== --- trunk/pipe_control/rdc.py (original) +++ trunk/pipe_control/rdc.py Fri Jun 14 11:39:19 2013 @@ -577,6 +577,11 @@ if data_col == None and error_col == None: raise RelaxError("One of either the data or error column must be supplied.") + # Check the data types. + rdc_types = ['D', '2D'] + if data_type not in rdc_types: + raise RelaxError("The RDC data type '%s' must be one of %s." % (data_type, rdc_types)) + # Store the data type as global data (need for the conversion of RDC data). if not hasattr(cdp, 'rdc_data_types'): cdp.rdc_data_types = {}