nmrglue.fileio.pipe.write

nmrglue.fileio.pipe.write(filename, dic, data, overwrite=False)[source]

Write a NMRPipe file to disk.

Parameters :

filename : str

Filename of NMRPipe to write to. See Notes.

dic : dict

Dictionary of NMRPipe parameters.

data : array_like

Array of NMR data.

overwrite : bool, optional.

Set True to overwrite files, False will raise a Warning if file exists.

See also

write_lowmem
Write NMRPipe files using minimal amounts of memory.
read
Read NMRPipe files.

Notes

For 3D data if filename has no ‘%’ formatter then the data is written as a 3D NMRPipe data stream. When the ‘%’ formatter is provided the data is written out as a standard NMRPipe 3D multi-file 3D.

For 4D data, filename can have one, two or no ‘%’ formatters resulting in a single index file (test%03d.ft), two index file(test%02d%03d.ft), or one file data stream (test.ft4).

dic[“FDPIPEFLAG”] is not changed or checked when writing, please check that this value is 0.0 for standard non-data stream files, and 1.0 for data stream files or an file may be written with an incorrect header.

Set overwrite to True to overwrite files that exist.

Previous topic

nmrglue.fileio.pipe.read

Next topic

nmrglue.fileio.pipe.read_lowmem

This Page