Closed magnetomeo closed 5 years ago
The convert functionality in nmrglue often requires that the user set the spectral parameters manually. The values from the guess_udic
function are guesses, they are not always correct. From the plots, my guess is that the spectral width of the H dimension is guesses incorrectly. The bruker2pip_2d example provides an example of how these spectral parameters can be set manually. Starting from the values in the guessed universal dictionary can give you the other parameters, although these too should be verified. The tutorial section on universal dictionaries might be helpful as well.
@magnetomeo, after you process the spectrum in Topspin, do you save only the downfield part of the spectrum (> ~6ppm) using the 'Save display region to...' and 'Parameters STSR/STSI' options? It does seem like that from the way the 'distorted' spectrum looks.
If yes, you should use strip_fake=True
while making udic
, which will give the corrected spectral width and center frequencies. See #49 for more details on how this #works.
In short, udic = ng.bruker.guess_udic(dic, data, strip_fake=True)
should work.
Thanks @kaustubhmote! Your solution worked for me! Indeed, I defined STSR/STSI parameters. Also, thanks to @jjhelmus for suggesting a more widely applicable fix.
Hello everybody,
I recently started my PhD in NMR and discovered nmrglue just a week ago. I was really happy to understand that it envisioned a function, ng.convert.converter(), which allows to translate spectra in different file formats. Because I work with Bruker spectrometer and enjoy analysis with Sparky quite a lot, I am very interested in converting Bruker spectra into .ucsf files.
Now, while the script (below) works, it produces very annoying distortions (along the proton dimension only, apparently) which make the resulting .ucsf spectrum unusable.
The script is:
For further reference, I attach two figures of the same spectrum in Sparky format. "distorted" is produced via the above script, while "correct" is yielded through a different script.
Apologies if the issue was already tackled somewhere else, I could not find any helpful resource in this respect.
Thanks in advance!