import dascore as dc
import numpy as np
= dc.get_example_patch()
patch = patch.hilbert(dim="time")
analytic # Real part is original signal
assert np.allclose(analytic.data.real, patch.data)
hilbert
hilbert(
patch: Patch ,
dim: str ,
)-> ‘PatchType’
Perform a Hilbert transform on a patch.
The Hilbert transform returns the analytic signal (complex-valued) where the real part is the original signal and the imaginary part is the Hilbert transform of the signal.
Parameters
Parameter | Description |
---|---|
patch | The patch to transform. |
dim | The dimension along which to apply the Hilbert transform. |
Returns
PatchType A patch with a complex data array representing the analytic signal.