mailr24760 - /branches/r1rho_plotting/lib/nmr.py


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

Header


Content

Posted by tlinnet on July 25, 2014 - 17:50:
Author: tlinnet
Date: Fri Jul 25 17:50:28 2014
New Revision: 24760

URL: http://svn.gna.org/viewcvs/relax?rev=24760&view=rev
Log:
Added NMR library function to convert the given frequency from rad/s to ppm 
units.

sr #3124(https://gna.org/support/?3124): Grace graphs production for R1rho 
analysis with R2_eff as function of Omega_eff.
sr #3138(https://gna.org/support/?3138): Interpolating theta through 
spin-lock offset [Omega], rather than spin-lock field strength [w1].

Modified:
    branches/r1rho_plotting/lib/nmr.py

Modified: branches/r1rho_plotting/lib/nmr.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/r1rho_plotting/lib/nmr.py?rev=24760&r1=24759&r2=24760&view=diff
==============================================================================
--- branches/r1rho_plotting/lib/nmr.py  (original)
+++ branches/r1rho_plotting/lib/nmr.py  Fri Jul 25 17:50:28 2014
@@ -63,6 +63,23 @@
     return frq / B0 * g1H / return_gyromagnetic_ratio(isotope) / 1e-6
 
 
+def frequency_to_ppm_from_rad(frq=None, B0=None, isotope=None):
+    """Convert the given frequency from rad/s to ppm units.
+
+    @keyword frq:       The frequency in rad/s.
+    @type frq:          float
+    @keyword B0:        The magnetic field strength as the proton frequency 
in Hertz.
+    @type B0:           float
+    @keyword isotope:   The isotope type of the nucleus of interest.
+    @type isotope:      str
+    @return:            The frequency in ppm.
+    @rtype:             float
+    """
+
+    # Convert and return.
+    return frq / (2.0 * pi) / B0 * g1H / return_gyromagnetic_ratio(isotope) 
/ 1e-6
+
+
 def frequency_to_rad_per_s(frq=None, B0=None, isotope=None):
     """Convert the given frequency from ppm to rad/s units.
 




Related Messages


Powered by MHonArc, Updated Fri Jul 25 18:00:03 2014