neurodsp.timefrequency.robust_hilbert

neurodsp.timefrequency.robust_hilbert(sig)[source]

Compute the Hilbert transform, ignoring any boundaries that are NaN.

Parameters
sig1d array

Time series.

Returns
sig_hilb1d array

The analytic signal, of which the imaginary part is the Hilbert transform of the input.

Examples

Compute the analytic signal, using zero padding:

>>> from neurodsp.sim import sim_combined
>>> sig = sim_combined(n_seconds=10, fs=500,
...                    components={'sim_powerlaw': {}, 'sim_oscillation': {'freq': 10}})
>>> sig_hilb = robust_hilbert(sig)