nmrglue.fileio.bruker.read_pdata

nmrglue.fileio.bruker.read_pdata(dir='.', bin_files=None, procs_files=None, read_procs=True, acqus_files=None, read_acqus=True, scale_data=True, shape=None, submatrix_shape=None, all_components=False, big=None, isfloat=None)[source]

Read processed Bruker files from a directory.

In Topspin and other programs this data is typically scaled by dividing by 2 ** -NC_proc where NC_proc is defined in the procs file. This scaling can be accomplished by setting the scale_data parameter to True.

Parameters
dirstr

Directory to read from.

bin_fileslist of str, optional

List of filename of binary file in directory. None uses standard files.

procs_fileslist, optional

List of filename(s) of procs parameter files in directory. None uses standard files.

read_procsbool, optional

True to read procs files(s), False prevents reading.

acqus_fileslist, optional

List of filename(s) of acqus parameter files in directory. None uses standard files.

read_acqusbool, optional

True to read acqus files(s), False prevents reading.

scale_databool, optional

True, the default, to apply scaling defined in the procs file. The data should almost always be scaled. False, returns the data as it appears in the file.

shapetuple, optional

Shape of resulting data. None will guess the shape from the parameters in the procs file(s).

submatrix_shapetuple, optional

Shape of submatrix for 2D+ data. None will guess the shape from the metadata in the procs file(s).

all_componentsbool

True to return a list of all components, False returns just the all real component (1r, 2rr, 3rrr, etc).

bigbool or None, optional

Endianness of binary file. True for big-endian, False for little-endian, None to determine endianness from procs file(s).

isfloatbool or None, optional

Data type of binary file. True for float64, False for int32. None to determine data type from procs file(s).

Returns
dicdict

Dictionary of Bruker parameters.

datandarray or list

Array of NMR data. If all_components is True this is a list of array with each quadrature component.

Notes

There is currently no support for writing Bruker processed files or reading processed files using minimal memory.