Get the reference frequency ('SR')

Skip to first unread message

Nov 5, 2018, 9:05:25 AM11/5/18
to nmrglue-discuss
Dear all,

I use nmrglue.fileio.bruker.read_pdata to read-in Bruker NMR spectra into python, which works greats for eveything, except that there does not seem to be anyway to get to the reference frequency (SR in topspin) and this is a big problem for what I am trying to do. May someone tell me if there is a way to get this value, or if I simply missed it ?

Many thanks in advance !

Kaustubh Mote

Nov 5, 2018, 12:51:02 PM11/5/18
to nmrglue-discuss
The procNs files in Topsin dont store the 'SR' value directly and hence it cannot be read in nmrglue.
What is stored instead is a 'corrected' spectrometer freqeuency given by dic['procs']['SF'] and the corrected upfield of the spectrum (dic['procs']['OFFSET'])
This value should almost always be sufficient to do any further processing. 
For referencing, it is probably best to use dic['procs']['OFFSET'] and dic['procs']['SW_p']  or alternatively using the universal dictionary and/or unit_conversion in nmrglue

However, if you want the 'SR' values for some other reasons, you will have to read in the corresponding 'acqus' files and backcalculate with the 'SFO1' and the 'O1' values in that file

Here is a working example:
# read in data and acqus and procs files from 'datadir'
, data = ng.bruker.read_pdata(datadir+'pdata/1/', read_acqus=True, acqus_files=[datadir+'acqus'])

# calculate SR
= dic[datadir+'acqus']['O1'] + dic['procs']['SF']*1e6 - dic[datadir+'acqus']['SFO1']*1e6


Kaustubh Mote

Nov 5, 2018, 1:03:47 PM11/5/18
to nmrglue-discuss
It seems like reading in acqus files works if there is no trailing forward-slash in the folder name.
So a simple read_pdata should already give you acquNs files in the dictionary. You can directly use those.


On Monday, November 5, 2018 at 7:35:25 PM UTC+5:30, wrote:

Nov 6, 2018, 6:58:41 AM11/6/18
to nmrglue-discuss
All good, this all works fine.
Many thanks for your reply and for teaching me something from the internal Topsin mechanics !
Reply all
Reply to author
0 new messages