-
Notifications
You must be signed in to change notification settings - Fork 10
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
How to import multiple Bruker 1D spectra #3
Comments
If you want to just load them individually, you specify the path up to the folder below the exp no subfolders (1/2/3). I.e. in your case: fid_array_1 = nmrpy.from_path('root_folder/P_1')
fid_array_2 = nmrpy.from_path('root_folder/P_2')
fid_array_3 = nmrpy.from_path('root_folder/P_3') Then each FID array will only contain one spectrum. If you want to load all the spectra into a single FID array, NMRPy expects a different folder structure where the experiment subfolders are located all imediately below the root folder, e.g.
So you'd have to move the various "1" folders from P_1, P_2, P_3 to the root folder and rename them in sequence. In my experience Topspin saves these experiments like this automatically when queuing a number of experiments as in a time series. Then you can simply do: fid_array = nmrpy.from_path('root_folder') and the FID array will contain all three spectra. Hope this helps. |
Hi Johann, Thanks a lot for useful suggestions! I'll try to implement it |
Can this issue be closed? |
Hi, |
Hy, Sorry, I'm totally forget to close this iussue. I have implemented the author's suggestion and it works well! |
Hi, |
Can you post the directory tree structure of your files? In the nmrpy install directory (under site-packages) there is some example test Bruker data, the structure looks like this: tests/test_data/bruker2
├── 1
│ ├── WS_FTP.LOG
│ ├── acqu
│ ├── acqum
│ ├── acqums
│ ├── acqus
│ ├── cpdprg2
│ ├── fid
│ ├── format.temp
│ ├── pdata
│ │ └── 1
│ │ ├── 1i
│ │ ├── 1r
│ │ ├── WS_FTP.LOG
│ │ ├── meta
│ │ ├── meta.ext
│ │ ├── outd
│ │ ├── proc
│ │ └── procs
│ ├── pulseprogram
│ └── scon
├── 2
│ ├── WS_FTP.LOG
│ ├── acqu
│ ├── acqum
│ ├── acqums
│ ├── acqus
│ ├── cpdprg2
│ ├── fid
│ ├── format.temp
│ ├── pdata
│ │ └── 1
│ │ ├── 1i
│ │ ├── 1r
│ │ ├── WS_FTP.LOG
│ │ ├── meta
│ │ ├── meta.ext
│ │ ├── outd
│ │ ├── proc
│ │ └── procs
│ ├── pulseprogram
│ └── scon
├── 3
│ ├── WS_FTP.LOG
│ ├── acqu
│ ├── acqum
│ ├── acqums
│ ├── acqus
│ ├── cpdprg2
│ ├── fid
│ ├── format.temp
│ ├── pdata
│ │ └── 1
│ │ ├── 1i
│ │ ├── 1r
│ │ ├── WS_FTP.LOG
│ │ ├── meta
│ │ ├── meta.ext
│ │ ├── outd
│ │ ├── proc
│ │ └── procs
│ ├── pulseprogram
│ └── scon
...
... You would import that with |
Yes, I first tried with the bruker2 experimental files. If I did that, it told me that there are only 3 fid files that can be imported (instead of the 20 ones present in the bruker2 folder's subfolders). Then I also tried with my files, and it has written the error message OSError: Data could not be imported.. cd /Users/User/Desktop/doktori/Lyon-Strassbourg/NMR/DNP/Measuremens/20230228_LNP_C2 |____1 | |____uxnmr.par |____12 |____2 |____13 |
Hi, I triead reading and processing multiple raw 1D Bruker NMR spectra with NMRpy. Bruker fids are orinally located in specific subfolders es "1" (i.e the original Topspin EXPNO number) , For more clarity I have attached a zip files containing the data structure of the original root folder nmr.zip.
How I can process and display them? Thank you in advance!
The text was updated successfully, but these errors were encountered: