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(
*args ,
dim: str ,
)-> None
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.
Examples
Methods
| Name | Description |
|---|---|
| check | Refuse a patch which does not carry what the operation needs. |
| get_metadata | Return the axis, once it is known to be evenly sampled. |
| kernel | Return the analytic signal along the axis, through the FFT. |
| model_copy | Copy the model, dropping cached values the update invalidates. |
| new | Create new instance with some attributed updated. |
| numpy_kernel | Return the analytic signal along the axis. |
| hilbert | Perform a Hilbert transform on a patch. |
| reconcile | Return metadata or a patch holding the final data; default as is. |
| run | Run the operation: check, get_metadata, kernel, reconcile, record. |