Envelope

class of dascore.transform.hilbert
inherits from: Hilbert, PatchProcessor, DascoreBaseModel, pydantic.main.BaseModel
source

Envelope(
    *args ,
    dim: str ,
)-> None

Calculate the envelope of a signal using the Hilbert transform.

The envelope is the magnitude of the analytic signal, which represents the instantaneous amplitude of the signal.

Parameters

Parameter Description
patch The patch to process.
dim The dimension along which to calculate the envelope.

Returns

PatchType A patch containing the envelope (real-valued, positive).

Examples

import dascore as dc
import numpy as np

patch = dc.get_example_patch()
env = patch.envelope(dim="time")
# Envelope is always positive
assert np.all(env.data >= 0)

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 magnitude of the analytic signal along the axis.
model_copy Copy the model, dropping cached values the update invalidates.
new Create new instance with some attributed updated.
numpy_kernel Return the magnitude of the analytic signal along the axis.
envelope Calculate the envelope of a signal using the Hilbert transform.
reconcile Return metadata or a patch holding the final data; default as is.
run Run the operation: check, get_metadata, kernel, reconcile, record.