Resample x to num samples using Fourier method along the given axis.
The resampled signal starts at the same value as x but is sampled with a spacing of len(x) / num * (spacing of x). Because a Fourier method is used, the signal is assumed to be periodic.
Parameters : | x : array_like
num : int
t : array_like, optional
axis : int, optional
window : array_like, callable, string, float, or tuple, optional
|
---|---|
Returns : | resampled_x or (resampled_x, resampled_t) :
|
Notes
The argument window controls a Fourier-domain window that tapers the Fourier spectrum before zero-padding to alleviate ringing in the resampled values for sampled signals you didn’t intend to be interpreted as band-limited.
If window is a function, then it is called with a vector of inputs indicating the frequency bins (i.e. fftfreq(x.shape[axis]) ).
If window is an array of the same length as x.shape[axis] it is assumed to be the window to be applied directly in the Fourier domain (with dc and low-frequency first).
For any other type of window, the function scipy.signal.get_window is called to generate the window.
The first sample of the returned vector is the same as the first sample of the input vector. The spacing between samples is changed from dx to:
dx * len(x) / num
If t is not None, then it represents the old sample positions, and the new sample positions will be returned as well as the new samples.