Linear Prediction (LP) functions for extrapolating and modeling NMR signals.

This module is imported as nmrglue.proc_lp and can be called as such.

User Functions

lp(data[, pred, slice, order, mode, append, ...])

Linear prediction extrapolation of 1D or 2D data.

lp_svd(data[, pred, slice, order, mode, ...])

Linear Prediction extrapolation of 1D or 2D data using SVD decomposition.

lp_qr(data[, pred, slice, order, mode, ...])

Linear Prediction extrapolation of 1D or 2D data using QR decomposition.

lp_cho(data[, pred, slice, order, mode, ...])

Linear Prediction extrapolation of 1D or 2D data using Cholesky decomposition.

lp_tls(data[, pred, slice, order, mode, ...])

Linear Prediction extrapolation of 1D or 2D data using Total Least Squares.

lp2d(data, pred, P, M[, mirror, fix_points, ...])

Perform a forward 2D linear prediction extrapolation on data.

cadzow(data, M, K, niter[, min_var])

Perform a (row wise) Cadzow-like signal enhancement on 1D or 2D data.

lp_model(trace[, slice, order, mode, ...])

Use Linear Prediction to model 1D NMR time domain data.

Developer Functions

__developer_info__ = “”” Notes ^^^^^ This module contains functions for performing linear prediction on NMR data. The algorithms used were selected for simplicity to show how linear prediction works not for computational speed nor stability. Locations where significant improvements can be made to improve speed or stability are indicated with SPEED and STABILITY within the source code with discussion following.

The notation for the Linear Prediction equation, coefficients, roots, etc. closely match those in “NMR Data Processing” by Hoch snd Stern. This book was references for many of the algorithms in this module.

Reduced order LP-SVD and LP-TLS methods are not implemented but should

These functions are called by high-level function are and most users will not use them in common processing scripts. Developers may be interested in them.

lp_1d(trace[, pred, slice, order, mode, ...])

Linear Prediction extrapolation of 1D data.

extrapolate_2d(x, C, pred, fix_points, mirror)

Extrapolate points along the 1st axis using the lp2d algorithm.

make_lp2d_Dd(x, P, M[, mode])

Form the lp2d equation matrix and vector.

cadzow_single(x, M, K[, min_var])

Perform a single iteration of Cadzow signal enhancement on a 1D vector


Calculate the damping factor from a LP root


Calculate the frequency from a LP root


Calculate a signal amplitude from a model coefficient


Calculate a signal phase from a model coefficient

make_D(x, order, mode)

Make the LP equation D matrix (Da = d')

make_little_d(x, order, mode)

Make the LP equation d' vector (Da = d')

make_Dd(x, order, mode)

make the LP equation D matrix and d' vector (Da=d')

make_mirror(x, mode)

Make a mirror image trace.

find_lpc(D, d, method)

Find linear prediction filter using a provided method.

find_lpc_svd(D, d)

Find linear prediction filter using single value decomposition.

pinv_diagsvd(s, m, L)

Construct the pseudo-inverse of the sigma matrix from singular values

find_lpc_qr(D, d)

Find linear prediction filter using QR decomposition.

find_lpc_cholesky(D, d)

Find linear prediction filter using a Cholesky decomposition.

find_lpc_tls(D, d)

Find linear prediction filter using the Total Least Squares method

find_lpc_fb(x, order, bad_roots, fix_mode, ...)

Determind LP coefficient using forward-backward linear prediction.

find_lpc_bf(x, order, bad_roots, fix_mode, ...)

Determind LP coefficient using backward-forward linear prediction.

find_lproots_hsvd(x, M, K, mode[, zmethod])

Find LP roots (poles) using the HSVD method

find_roots(a[, mode])

Find LP roots (poles) from a set of LP coefficients.

find_coeff(poles[, mode])

Find LP coefficients from a set of LP roots (poles).

reverse_filter(a, mode)

Reverse a filter (change forward LP to backwards LP).

fix_roots(poles[, fix_roots, fix_mode])

Fix (stabilize) LP roots.

extrapolate(trace, a, pred, append)

Extrapolate points using LP prediction filter.