Reputation: 23
I was looking for Hilbert transforms in the scipy package and I noticed there are two versions of the Hilbert transform--one in scipy.fftpack
and the other in scipy.signal
. I saw that they differ in the outputs being complex conjugates, but are there any other fundamental difference between the two Hilbert transforms I should be aware of before using one version or the other? Nothing particularly jumped out at me when I looked at the source-code.
Upvotes: 2
Views: 2942
Reputation: 5115
From the pages, scipy.signal.hilbert computes the analytic signal, using the Hilbert transform. Namely, the analytical signal,
x_a = x + i*y
where y is the hilbert transform. On the other hand, scipy.fftpack.hilbert is just the Hilbert transform. If you want the Hilbert transform, not the analytical signal, use scipy.fftpack.hilbert.
Upvotes: 3