I consider an array:
import numpy as np from scipy.fft import fft from scipy.signal import hilbert a=np.random.rand(5)
First I manually compute the fourier spectrum of the analytic signal,i.e. by zeroing the negative frequency terms and doubling the positive frequency terms:
a_spec_manual = fft(a) a_spec_manual[1:len(a)//2+1] = 2*a_spec_manual[1:len(a)//2+1] a_spec_manual[len(a)//2+1:] = 0
Then I auto-compute the fourier transform of the analytic signal derived from
a_fft_analytic = fft(hilbert(a))
I was expecting
a_fft_analytic to be equal to
a_spec_manual. However, it is not the case.
a_fft_analytic does have negative frequency components and I wonder why?
If indeed the first case is correct, is it possible to obtain the fourier spectrum of the analytic signal from real using single fft operation?