# Tag Info

0

Generally resampling data that is non-uniformly sampled and/or contains non-valid samples is an interesting task. If the downsampling ratio is large compared to the maximum (or average) sampling interval, you can possibly use a simple method. Take some average of a neighbourhood. For a filtering approach, designing a continuous domain filter with some cutoff ...

0

Why does my amplitude change upon inverse Fourier Transform...? Because sines and cosines don't work the way you seem to think. Here's a really simple case -- $\sin \omega t \pm \frac{\sin 3\omega t}{3}$. One plot is the sum, one plot is the difference. Note that the two plots are of markedly different shape -- just from changing the phase of one of the ...

2

OP seeks to randomize phase while keeping spectrum magnitude unchanged - and has achieved it. All that remains is to plot the spectrum. Just add this code: def plot(x0, x1, title): plt.plot(x0) plt.plot(x1) plt.title(title, weight='bold', fontsize=16, loc='left') plt.show() plot(amp, np.abs(nft), title="RFFT, original vs new | ...

0

Let's have a quick look at the difference between sample times. It's quite obvious that these differences come in very discrete steps that are integer multiples of each other. That indicates a regular sample grid but with time gaps of an integer number of samples. That means samples are being "dropped". To find the base period, you can simply ...

0

I think you looking for linear regression. Your data looks like a linear function in the form of $$y = kx + b$$ where $x$ is the time index, $k$ is the slope (or regression coefficient) which is exactly what you want and $b$ is the $y$-intercept. Now you have a set of linear equations $$y_1=kx_1+b\\ y_2=kx_2+b\\ \vdots\\ y_N=kx_N+b$$ These can be written ...

Top 50 recent answers are included