Author: bugman
Date: Tue Nov 18 15:14:45 2014
New Revision: 26616

URL: http://svn.gna.org/viewcvs/relax?rev=26616&view=rev
Log:
Added a check for the values of the basis_set argument.

This is to the align_tensor.matrix_angles user function backend.


Modified:
    trunk/pipe_control/align_tensor.py

Modified: trunk/pipe_control/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/align_tensor.py?rev=26616&r1=26615&r2=26616&view=diff
==============================================================================
--- trunk/pipe_control/align_tensor.py  (original)
+++ trunk/pipe_control/align_tensor.py  Tue Nov 18 15:14:45 2014
@@ -898,6 +898,11 @@
     @type tensors:      None or list of str
     """
 
+    # Argument check.
+    allowed = ['matrix', 'unitary 5D', 'geometric 5D']
+    if basis_set not in allowed:
+        raise RelaxError("The basis set of '%s' is not one of %s." % 
(basis_set, allowed))
+
     # Test that alignment tensor data exists.
     if not hasattr(cdp, 'align_tensors') or len(cdp.align_tensors) == 0:
         raise RelaxNoTensorError('alignment')


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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

Reply via email to