mailr18165 - /trunk/generic_fns/frq.py


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

Header


Content

Posted by edward on December 18, 2012 - 11:52:
Author: bugman
Date: Tue Dec 18 11:52:35 2012
New Revision: 18165

URL: http://svn.gna.org/viewcvs/relax?rev=18165&view=rev
Log:
The frq.set user function now warns if the frequency is lower than 100 MHz or 
higher than 2 GHz.


Modified:
    trunk/generic_fns/frq.py

Modified: trunk/generic_fns/frq.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/frq.py?rev=18165&r1=18164&r2=18165&view=diff
==============================================================================
--- trunk/generic_fns/frq.py (original)
+++ trunk/generic_fns/frq.py Tue Dec 18 11:52:35 2012
@@ -22,9 +22,13 @@
 # Module docstring.
 """Module for manipulating the spectrometer frequency of experiments."""
 
+# Python module imports.
+from warnings import warn
+
 # relax module imports.
 from generic_fns import pipes
 from relax_errors import RelaxError
+from relax_warnings import RelaxWarning
 
 
 def get_values():
@@ -88,3 +92,8 @@
     # Set the frequency.
     cdp.frq[id] = frq * conv
 
+    # Warnings.
+    if cdp.frq[id] < 1e8:
+        warn(RelaxWarning("The proton frequency of %s Hz appears to be too 
low." % cdp.frq[id])
+    if cdp.frq[id] > 2e9:
+        warn(RelaxWarning("The proton frequency of %s Hz appears to be too 
high." % cdp.frq[id])




Related Messages


Powered by MHonArc, Updated Tue Dec 18 12:00:02 2012