Previous topic

nmrglue.process.proc_lp.extrapolate

Next topic

nmrglue.process.proc_lp.lp_svd

This Page

nmrglue.process.proc_lp.lp

nmrglue.process.proc_lp.lp(data, pred=1, slice=slice(None, None, None), order=8, mode='f', append='after', bad_roots='auto', fix_mode='on', mirror=None, method='svd')

Linear prediction extrapolation of 1D or 2D data.

Parameters:

  • data 1D or 2D data (time domain in last axis).

  • pred Number of points to predict along the last axis.

  • slice slice object selecting region of each row to use in LP equation

  • order Prediction order (Number of LP coefficients)

  • mode Mode to generate LP filter (‘f’-forward,’b’-backward,

    fb-‘forward-backward,’bf’-backward-forward)

  • extend Extend before or after trace, (“before” or “after”).

  • bad_roots Type of roots which are bad and should be stabilized,

    either those with “incr” or “decr” signals, set to None for no root stabilizing. Default of “auto” set root fixing based on LP mode. (mode==”f” or “fb” -> “incr”, mode==”b” or “bf” -> “decr”)

  • fix_mode Method used to stabilize bad roots, “on” to move the roots

    onto the unit circle, “reflect” to reflect bad roots across the unit circle

  • mirror None to process trace as provided, ‘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 Method to use to calculate the LP filter, choose from

    ‘svd’,’qr’,’choleskey’ or ‘tls’.

Notes:

When given 2D data a series of 1D Linear predictions are made to each row in the array, extending each by pred points. To perform a 2D linear prediction using a 2D prediction matrix use the lp2d functions.

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.