Reading 1D spectral data from processed Bruker files in the pdata
directory is very easy with NumPy, the following works to read the real
data when in the pdata/1 or similar directory:
import numpy as np
data = np.fromfile('1r', 'i4')
Depending on the byteorder 'i4' might need to be replaced with '>i4' or
'<i4' (the data is 32-bit integers). The imaginary data can be read
from the 1i file in the same way. From my initial looking the parameter
for units (PPM, etc) are mostly stored in the procs file which can be
read with nmrglue.bruker.read_jcamp.
Reading 2D and 3D data is a bit more tricky as there are more file (2rr,
2ri, 2ir, 2ii, etc) and they are stored in a sub-matrix format. This
mean data reshaping and shuffling, nothing to hard, Sparky data uses a
similar format.
I'll look into adding the ability to read all types of processed Bruker
data into nmrglue, the details are not difficult, but I need to think
about how to fit this into the overall nmrglue architecture.
Hope this helps, I'll keep the list updated on any development on this.
Cheers,
- Jonathan Helmus
> --