I have used the code from: https://github.com/quantumlib/OpenFermion/blob/v1.5.1/src/openfermion/linalg/wave_fitting.py#L41-L76
try using with my signal:
def ns_s(t):
if t >= 0 and t < 0.1:
return 10*np.cos(20*np.pi*t)
if t >= 0.1 and t <= 0.4:
return 10*np.cos(20*np.pi*t)+3*np.sin(40*np.pi*t)
if t > 0.4:
return 0.0
def s_s(t):
return 10*np.cos(20*np.pi*t)+3*np.sin(40*np.pi*t)+.01j
def s_old(x):
return 3*np.sin(20.0*2.0*np.pi*x)+np.cos(50.0*2.0*np.pi*x)
FFT mag:
STFT mag:
Prony amplitudes:
What should I do to make it work? I tried complex signal but it doesn't work with it either (and fft, stft looks like random).
With stationary signal it's doesn't work also:
FFT:
Prony: