Functions for reading and writing Bruker binary (ser/fid) files, BrukerJCAMP-DX parameter (acqus) files, and Bruker pulse program (pulseprogram)files.

This modules is imported as nmrglue.bruker and can be called as such.

Nmrglue Python
- Primary Citation. J. Nmrglue: An open source Python package for the analysis of multidimensional NMR data. Journal of Biomolecular NMR.
- 由于python相当易学易用,现在python也较多地用于有大量的计算需求的任务。本文介绍几个并行模块,以及实现程序并行的入门技术。本文比较枯燥,主要是为后面上工程实例做铺垫。 本期介绍pathos模块。 pathos模块pa.
- Nmrglue, an open source Python package for working with multidimensional NMR data, is described. When used in combination with other Python scientific libraries, nmrglue provides a highly flexible.
User Information¶

Se details at: relax with OpenDX. NMRPipe. MddNMR. nmrglue. Art Palmers software: ModelFree4.
User Functions¶
These are functions which are targetted for users of nmrglue.
read([dir, bin_file, acqus_files, ...]) | Read Bruker files from a directory. |
write(dir, dic, data[, bin_file, ...]) | Write Bruker files to disk. |
read_pdata([dir, bin_files, procs_files, ...]) | Read processed Bruker files from a directory. |
remove_digital_filter(dic, data) | Remove the digital filter from Bruker data. |
read_lowmem([dir, bin_file, acqus_files, ...]) | Read Bruker files from a directory using minimal amounts of memory. |
write_lowmem(dir, dic, data[, bin_file, ...]) | Write Bruker files using minimal amounts of memory (trace by trace). |
read_binary(filename[, shape, cplex, big]) | Read Bruker binary data from file and return dic,data pair |
write_binary(filename, dic, data[, ...]) | Write Bruker binary data to file. |
read_pdata_binary(filename[, shape, ...]) | Read a processed Bruker binary file and return dic, data pair. |
read_binary_lowmem(filename[, shape, cplex, big]) | Read Bruker binary data from file using minimal memory. |
write_binary_lowmem(filename, dic, data[, ...]) | Write Bruker binary data to file using minimal memory (trace by trace). |
read_jcamp(filename) | Read a Bruker JCAMP-DX file into a dictionary. |
write_jcamp(dic, filename[, overwrite]) | Write a Bruker JCAMP-DX file from a dictionary |
read_pprog(filename) | Read a Bruker pulse program (pulseprogram) file. |
write_pprog(filename, dic[, overwrite]) | Write a minimal Bruker pulse program to file. |
guess_udic(dic, data) | Guess parameters of universal dictionary from dic, data pair. |
create_dic(udic) | Create a Bruker parameter dictionary from a universal dictionary. |
Developer Infomation¶
Bruker file format information¶
Bruker binary files (ser/fid) store data as an array of int32s whose endinessis determinded by the parameter BYTORDA (1 = big endian, 0 = little endian).Typically the direct dimension is digitally filtered. The exact method ofremoving this filter is unknown but an approximation is avaliable.
Bruker JCAMP-DX files (acqus, etc) are text file which are described by theJCAMP-DX standard. Bruker parameters areprefixed with a ‘$’.
Bruker pulseprogram files are text files described in various Bruker manuals.Of special important are lines which describe external variable assignments(surrounded by “‘s), loops (begin with lo), phases (contain ip of dp) orincrements (contain id, dd, ipu or dpu). These lines are parsed when readingthe file with nmrglue.

Developer Functions¶
Nmrglue Github
These functions are typically not used directly by users. Developers who wantfine control over Bruker files may be interested in these functions.
create_data(data) | Create a bruker data array (recast into a complex128 or int32) |
create_acqus_dic(adic[, direct]) | Create a Bruker acqus dictionary from an Universal axis dictionary. |
guess_shape(dic) | Determine data shape and complexity from Bruker dictionary. |
guess_shape_and_submatrix_shape(dic) | Guess the data shape and the shape of the processed data submatrix. |
get_data(f, big) | Get binary data from file object with given endiness |
put_data(f, data[, big]) | Put data to file object with given endiness |
complexify_data(data) | Complexify data packed real, imag. |
uncomplexify_data(data_in) | Uncomplexify data (pack real,imag) into a int32 array |
reorder_submatrix(data, shape, submatrix_shape) | Reorder processed binary Bruker data. |
rm_dig_filter(data, decim, dspfvs[, grpdly]) | Remove the digital filter from Bruker data. |
parse_jcamp_line(line, f) | Parse a single JCAMP-DX line |
parse_jcamp_value(text) | Parse value text from Bruker JCAMP-DX file returning the value. |
write_jcamp_pair(f, key, value) | Write out a line of a JCAMP file. |

Nmrglue Unit Conversion
Developer Classes¶
Nmrglue Examples
bruker_nd(filename, fshape, cplex, big[, order]) | Emulate a ndarray objects without loading data into memory for low memory |
