cedalion.sigproc.epochs
Extract epochs from a time series based on stimulus events.
Functions
|
Extract epochs from the time series based on stimulus events. |
- cedalion.sigproc.epochs.to_epochs(
- ts: cdt.NDTimeSeries,
- df_stim: pd.DataFrame,
- trial_types: list[str],
- before: cdt.QTime,
- after: cdt.QTime,
Extract epochs from the time series based on stimulus events.
- Parameters:
ts – the time series
df_stim – DataFrame containing stimulus events.
trial_types – List of trial types to include in the epochs.
before – Time before stimulus event to include in epoch.
after – Time after stimulus event to include in epoch.
- Returns:
Array containing the extracted epochs.
- Return type:
xarray.DataArray