nmrglue.pipe

Functions for reading and writing NMRPipe files and table (.tab) files

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

User Information

User Functions

read(filename)

Read a NMRPipe file.

write(filename, dic, data[, overwrite])

Write a NMRPipe file to disk.

read_lowmem(filename)

Read a NMRPipe file with minimal memory usage.

write_lowmem(filename, dic, data[, overwrite])

Write a NMRPipe file to disk using minimal memory (trace by trace).

read_table(filename)

Read a NMRPipe database table (.tab) file.

write_table(filename, pcomments, pformats, rec)

Write a NMRPipe database table (.tab) file.

make_uc(dic, data[, dim])

Create a unit conversion object

guess_udic(dic, data)

Guess parameters of universal dictionary from dic, data pair.

create_dic(udic[, datetimeobj])

Crate a NMRPipe parameter dictionary from universal dictionary

datetime2dic(dt, dic)

Add datatime object to a NMRPipe dictionary

dic2datetime(dic)

Create a datetime object from a NMRPipe dictionary

User Classes

iter3D(filemask[, in_lead, out_lead])

Object which allows for graceful iteration over 3D NMRPipe files.

Developer Information

NMRPipe file structure is described in the NMRPipe man pages and fdatap.h

Developer Functions

These functions are typically not used directly by users. Developers who want fine control over NMRPipe files may be interested in these functions.

create_data(data)

Create a NMRPipe data array (recast into float32 or complex64)

add_axis_to_dic(dic, adic, n)

Add an axis dictionary (adic) to a NMRPipe dictionary (dic) as axis n.

create_empty_dic()

Creates a NMRPipe dictionary with default values

read_1D(filename)

Read a 1D NMRPipe file.

read_2D(filename)

Read a 2D NMRPipe file or NMRPipe data stream.

read_lowmem_2D(filename)

Read a 2D NMRPipe file or NMRPipe data stream using minimal memory.

read_stream(filename)

Read a NMRPipe data stream (one file 3D or 4D files).

read_lowmem_stream(filename)

Read a NMRPipe data stream using minimal memory.

read_3D(filemask)

Read a 3D NMRPipe file.

read_lowmem_3D(filemask)

Read a 3D NMRPipe file using minimal memory.

read_4D(filemask)

Read a 3D NMRPipe file.

read_lowmem_4D(filemask)

Read a NMRPipe file using minimal memory.

write_single(filename, dic, data[, overwrite])

Write data to a single NMRPipe file from memory.

write_3D(filemask, dic, data[, overwrite])

Write a standard multi-file 3D NMRPipe file

write_4D(filemask, dic, data[, overwrite])

Write a one or two index 4D NMRPipe file.

write_lowmem_2D(filename, dic, data[, overwrite])

Write a 2D NMRPipe file using minimal memory (trace by trace)

write_lowmem_3D(filename, dic, data[, overwrite])

Write a standard multi-file 3D NMRPipe file using minimal memory.

write_lowmem_3Ds(filename, dic, data[, …])

Write 3D NMRPipe data stream file using minimal memory (trace by trace)

write_lowmem_4D(filename, dic, data[, overwrite])

Write a multi-file (single or double index) 4D NMRPipe file using minimal memory.

write_lowmem_4Ds(filename, dic, data[, …])

Write 4D NMRPipe data stream file using minimal memory (trace by trace)

put_fdata(fh, fdata)

Put NMR data, fdata, to a NMRPipe file described by file object fh.

put_trace(fh, trace)

Put a trace (real or complex) to NMRPipe file described by file object fh.

put_data(filename, fdata, data[, overwrite])

Put fdata and data to 2D NMRPipe.

write_slice_3D(filemask, dic, data, shape, …)

Write a slice of a 3D data array to file.

pack_complex(data)

Pack inteleaved real,imag array into complex array.

transpose_3D(dic, data[, axes])

Transpose pipe_3d object and dictionary

find_shape(dic)

Find the shape (tuple) of data in a NMRPipe file from parameters.

reshape_data(data, shape)

Reshape data or return 1D data after warning.

unshape_data(data)

Return 1D version of data.

unappend_data(data)

Return complex data with last axis (-1) unappended.

append_data(data)

Return data with last axis (-1) appeneded.

fdata2dic(fdata)

Convert a fdata array to fdata dictionary.

dic2fdata(dic)

Converts a NMRPipe dictionary into an array.

get_fdata(filename)

Get an array of length 512-bytes holding NMRPipe header.

get_data(filename)

Get array of data

get_fdata_data(filename)

Get fdata and data array, return (fdata, data)

get_trace(fhandle, ntrace, pts, bswap, cplex)

Get a single trace from a NMRPipe file

Developer Classes

pipe_2d(filename[, order])

Emulate a ndarray objects without loading data into memory for low memory reading of 2D NMRPipe files.

pipe_3d(filemask[, order, fcheck])

Emulate a ndarray objects without loading data into memory for low memory reading of 3D NMRPipe files (multiple file data sets).

pipestream_3d(filename[, order])

Emulate a ndarray objects without loading data into memory for low memory reading of 3D NMRPipe data stream files (one file data sets).

pipe_4d(filemask[, order, fcheck])

Emulate a ndarray objects without loading data into memory for low memory reading of single/two index 4D NMRPipe data files.

pipestream_4d(filename[, order])

Emulate a ndarray objects without loading data into memory for low memory reading of 4D NMRPipe data steams (one file 4D data sets).