nmrglue.process.proc_lp.lp_1d

nmrglue.process.proc_lp.lp_1d(trace, pred=1, slice=slice(None, None, None), order=8, mode='f', append='after', bad_roots='auto', fix_mode='on', mirror=None, method='svd')[source]

Linear Prediction extrapolation of 1D data.

Parameters :

trace : ndarray

1D NMR data in the time domain.

pred : int

Number of points to predict along the last axis.

slice : slice object, optional

Slice object which selects the region along the last axis to use in LP equation. The default (slice(None)) will use all points.

order : int

Prediction order, number of LP coefficients calculated.

mode : {‘f’, ‘b’, ‘fb’ or ‘bf’}

Mode to generate LP filter. ‘f’ for forward,’b’ for backward, fb for ‘forward-backward and ‘bf’ for backward-forward.

extend : {‘before’, ‘after’}

Location to extend the data, either ‘before’ the current data, or ‘after’ the existing data. This is independent of the mode parameter.

bad_roots : {‘incr’, ‘decr’, None, ‘auto’}

Type of roots which to consider bad and to stabilize. Option are those with increasing signals ‘incr’ or decreasing signals ‘decr’. None will perform no root stabiliting. The default (‘auto’) will set the parameter based on the mode parameter. ‘f’ or ‘fb’ mode will results in a ‘incr’ bad_roots parameter, ‘b’ or ‘bf` in ‘decr’

fix_mode : {‘on’, ‘reflect’}

Method used to stabilize bad roots, ‘on’ to move the roots onto the unit circle, ‘reflect’ to reflect bad roots across the unit circle. This parameter is ignored when bad_roots is None.

mirror : {None, ‘0’, ‘180’}

Mode to form mirror image of data before processing. None will process the data trace as provided (no mirror image). ‘0’ or ‘180’ forms a mirror image of the sliced trace to calculate the LP filter. ‘0’ should be used with data with no delay, ‘180’ with data with an initial half-point delay.

method : {‘svd’, ‘qr’, ‘choleskey’, ‘tls’}

Method to use to calculate the LP filter. Choices are a SVD (‘svd’), QR (‘qr’), or Choleskey (‘choleskey’) decomposition, or Total Least Squares (‘tls’).

Returns :

ntrace : ndarray

NMR data with pred number of points linear predicted and appended to the original data.

See also

lp
1D or 2D linear prediction extrapolation.

Notes

In forward-backward or backward-forward mode root stabilizing is done on both sets of signal roots as calculated in the first mode direction. After averaging the coefficient the roots are again stabilized.

When the append parameter does not match the LP mode, for example if a backward linear prediction (mode=’b’) is used to predict points after the trace (append=’after’), any root fixing is done before reversing the filter.

Previous topic

nmrglue.process.proc_lp.lp_model

Next topic

nmrglue.process.proc_lp.extrapolate_2d

This Page