mailr6360 - /1.3/specific_fns/model_free/main.py


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

Header


Content

Posted by edward on June 22, 2008 - 01:29:
Author: bugman
Date: Sun Jun 22 01:29:56 2008
New Revision: 6360

URL: http://svn.gna.org/viewcvs/relax?rev=6360&view=rev
Log:
The return_conversion_factor() method now does error checking for the spin 
args.


Modified:
    1.3/specific_fns/model_free/main.py

Modified: 1.3/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/main.py?rev=6360&r1=6359&r2=6360&view=diff
==============================================================================
--- 1.3/specific_fns/model_free/main.py (original)
+++ 1.3/specific_fns/model_free/main.py Sun Jun 22 01:29:56 2008
@@ -37,7 +37,7 @@
 from maths_fns.mf import Mf
 from minfx.generic import generic_minimise
 from physical_constants import N15_CSA, NH_BOND_LENGTH
-from relax_errors import RelaxError, RelaxFuncSetupError, RelaxInfError, 
RelaxInvalidDataError, RelaxLenError, RelaxNaNError, RelaxNoModelError, 
RelaxNoPdbError, RelaxNoResError, RelaxNoPipeError, RelaxNoSequenceError, 
RelaxNoTensorError, RelaxNoValueError, RelaxNoVectorsError, 
RelaxNucleusError, RelaxTensorError
+from relax_errors import RelaxError, RelaxFuncSetupError, RelaxInfError, 
RelaxInvalidDataError, RelaxLenError, RelaxNaNError, RelaxNoModelError, 
RelaxNoPdbError, RelaxNoResError, RelaxNoPipeError, RelaxNoSequenceError, 
RelaxNoSpinSpecError, RelaxNoTensorError, RelaxNoValueError, 
RelaxNoVectorsError, RelaxNucleusError, RelaxTensorError
 import specific_fns
 
 
@@ -1803,6 +1803,10 @@
         @rtype:         float
         """
 
+        # The spin must be specified to get frequency units.
+        if spin == None and spin_id == None:
+            raise RelaxNoSpinSpecError
+
         # Get the spin.
         if not spin:
             spin = return_spin(spin_id)




Related Messages


Powered by MHonArc, Updated Sun Jun 22 01:40:11 2008