Why is Scipy implementation of Hilbert() function different from Matlab implementation of the function?
It works fine for me:

from scipy.signal import hilbert
import numpy as np
from matplotlib.pyplot import plot

sensor = np.loadtxt('signal.txt')
plot(sensor)

analytical_signal = hilbert(sensor)
plot(analytical_signal.real)
plot(analytical_signal.imag)

amplitude_envelope = np.abs(analytical_signal)
plot(amplitude_envelope)






What are you doing differently?  Maybe you're throwing away the imaginary part of analytical_signal somehow?