Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading and vizualizing .rda nmr spectroscopy files #110

Open
alexandrova-s opened this issue Nov 28, 2019 · 3 comments
Open

Reading and vizualizing .rda nmr spectroscopy files #110

alexandrova-s opened this issue Nov 28, 2019 · 3 comments

Comments

@alexandrova-s
Copy link

Hi,
I am writing my thesis and I have to analyze the spectrum from Siemens apparatus in .rda format. I would love to use nmrglue for analysis, because I really like the methods of this module.
Unfortunately, I have a problem loading my specters. Is there a method in nmrglue that will allow me to load my .rda data and it will be ready for further analysis and visualization?
I really need leftshift and line broadening in my spectra, because they are slightly shifted relative to each other, and I would like to present them on a common graph.
I am asking for help very much.
I have already tried to load the spectrum as follows:

dic, data = ng.pipe.read_2D(".\whoiii3\whoiii_30_2.rda")
print(data.shape)
print(data.dtype)

but it gives me answer like that:

C:\Users\Aleksandra\AppData\Local\Programs\Python\Python37\lib\site-packages\nmrglue\fileio\pipe.py:1478: UserWarning: (4103,)cannot be shaped into(0, 0)
warn(str(data.shape) + "cannot be shaped into" + str(shape))
(4103,)
float32

and such results are not possible for further analysis.

thank you in advance for your help :)

@kaustubhmote
Copy link
Collaborator

Nmrglue currently does not read this format automatically. The command you are using is applicable for nmrpipe data alone. You may have to manually read in your dataset as a numpy array (see numpy.load, numpy.loadtxt and numpy.fromfile), and then manually make a universal dictionary. Then you should be able to use the nmrglue processing functions.

It may help if you post an example dataset, if someone would like to make a PR to add this functionality to nmrglue at some stage.

@jjhelmus
Copy link
Owner

jjhelmus commented Dec 2, 2019

The documentation for the suspect indicates that it may be able to read in Siemens rda files. The library is open source, it might be useful to study if anyone wants to add this functionality to nmrglue.

@alexandrova-s
Copy link
Author

Thank you both very, very much for your help :)
I hope to manage it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants