5.2.6. nvector.core.interp_nvectors¶
- interp_nvectors(t_i, t, nvectors, kind='linear', window_length=0, polyorder=2, mode='interp', cval=0.0)[source]¶
Returns interpolated values from nvector data.
- Parameters
- t_i: real vector length m
Vector of interpolation times.
- t: real vector length n
Vector of times.
- nvectors: 3 x n array
n-vector(s) [no unit] decomposed in E.
- kind: str or int, optional
Specifies the kind of interpolation as a string (‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’ where ‘zero’, ‘slinear’, ‘quadratic’ and ‘cubic’ refer to a spline interpolation of zeroth, first, second or third order) or as an integer specifying the order of the spline interpolator to use. Default is ‘linear’.
- window_length: positive odd integer
The length of the Savitzky-Golay filter window (i.e., the number of coefficients). Default window_length=0, i.e. no smoothing.
- polyorder: int
The order of the polynomial used to fit the samples. polyorder must be less than window_length.
- mode: ‘mirror’, ‘constant’, ‘nearest’, ‘wrap’ or ‘interp’.
Determines the type of extension to use for the padded signal to which the filter is applied. When mode is ‘constant’, the padding value is given by cval. When the ‘interp’ mode is selected (the default), no extension is used. Instead, a degree polyorder polynomial is fit to the last window_length values of the edges, and this polynomial is used to evaluate the last window_length // 2 output values.
- cval: scalar, optional
Value to fill past the edges of the input if mode is ‘constant’. Default is 0.0.
- Returns
- result: 3 x m array
Interpolated n-vector(s) [no unit] decomposed in E.
Notes
The result for spherical Earth is returned.
Examples