import dascore as dc
import numpy as np
patch = dc.get_example_patch()
analytic = patch.hilbert(dim="time")
# 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.