code: def hilbert_amplitude(ts):
      
      output = np.abs(signal.hilbert(signal.detrend(ts, axis=0), axis=0))
      return Timeseries(output, ts.tspan, labels=ts.labels)
docs: Amplitude of the analytic signal, using the Hilbert transform