mailr21349 - in /branches/relax_disp: ./ pipe_control/spectrometer.py


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

Header


Content

Posted by edward on October 31, 2013 - 09:14:
Author: bugman
Date: Thu Oct 31 09:14:49 2013
New Revision: 21349

URL: http://svn.gna.org/viewcvs/relax?rev=21349&view=rev
Log:
Merged revisions 21348 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r21348 | bugman | 2013-10-31 09:14:27 +0100 (Thu, 31 Oct 2013) | 3 lines
  
  Created the pipe_control.spectrometer.get_frequency() function for 
returning the frequency for a given ID.
........

Modified:
    branches/relax_disp/   (props changed)
    branches/relax_disp/pipe_control/spectrometer.py

Propchange: branches/relax_disp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Oct 31 09:14:49 2013
@@ -1,1 +1,1 @@
-/trunk:1-21346
+/trunk:1-21348

Modified: branches/relax_disp/pipe_control/spectrometer.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/pipe_control/spectrometer.py?rev=21349&r1=21348&r2=21349&view=diff
==============================================================================
--- branches/relax_disp/pipe_control/spectrometer.py (original)
+++ branches/relax_disp/pipe_control/spectrometer.py Thu Oct 31 09:14:49 2013
@@ -141,6 +141,23 @@
         warn(RelaxWarning("The proton frequency of %s Hz appears to be too 
low." % frq))
     if frq > 2e9:
         warn(RelaxWarning("The proton frequency of %s Hz appears to be too 
high." % frq))
+
+
+def get_frequency(id=None):
+    """Return the frequency corresponding to the given ID.
+
+    @param id:  The experiment ID string.
+    @type id:   str
+    @return:    The spectrometer proton frequency in Hertz for the given ID.
+    @rtype:     float
+    """
+
+    # Checks.
+    pipes.test()
+    check_frequency(id=id)
+
+    # Return the frequency in Hz.
+    return cdp.spectrometer_frq[id]
 
 
 def get_frequencies(units='Hz'):




Related Messages


Powered by MHonArc, Updated Thu Oct 31 09:40:02 2013