Perform a forward 2D linear prediction extrapolation on data.
Use the 2D linear prediction algorithm presented in: G. Zhu and A. Bax, Journal of Magnetic Resonance, 1992, 98, 192-199. to extend the last (1) axis by pred points. A PxM prediction matrix, C, is formed by solving the modified linear prediction equation given by:
data[n,m] = /sigma_{l=0}^{P-1} /sigma_{k=1}^M C_{l,k}*data[n-l,m-k]
For all valid points in data. This prediction matrix together with the data matrix with a mirror image appended is used to extend the last (1) axis by pred points resulting in a new array of size [N_0, N_1+pred] where N_0 and N_1 are the sizes of the original data. To linear predict both dimensions this function should be used twice with a transpose between the uses.
Backward linear prediction using this method is not possible as the method depends on being able to mirror the data before the first collected point. In backwards mode this would correspond to being able to correctly determind points after the last point which cannot be determinded using the mirror method. A backward prediction matrix can be calculated but would not prove useful.
The forward-backward averaging of the linear prediction coefficients is not possible as there is no characteristic polynomial to root and reflect. Therefore the backward prediction matrix cannot be reversed.
Parameters : | data : ndarray
pred : int
P : int
M : int
mirror : {‘0’ or ‘180’}
fix_points : bool
method : {‘svd’, ‘qr’, ‘cholesky’, ‘tls’}
|
---|---|
Returns : | ndata : ndarray
|
Notes
The axes in this function are reversed as compared to the JMR paper.