BirdSongToolbox.free_epoch_tools.get_event_related_nd¶
-
BirdSongToolbox.free_epoch_tools.
get_event_related_nd
(data, indices, fs, window, subtract_mean=None, overlapping=None, \*\*kwargs)¶ Take an input ndarray of time series data, vector of event indices, and window sizes, and return a nd matrix of windowed trials around the event indices.
- Parameters
- data: list, shape (Channels, Samples) or (Frequencies, Channels, Samples)
Neural Data
- indiceslist, shape [Events]
Onsets of the Labels to be Clipped for one Chunk
- fsint
Sampling Frequency
- indicesarray-like 1d of integers
Indices of event onset indices
- windowtuple | shape (start, end)
Window (in ms) around event onsets, window components must be integer values
- subtract_meantuple, optional | shape (start, end)
if present, subtract the mean value in the subtract_mean window for each trial from that trial’s time series (this is a trial-by-trial baseline)
- overlappinglist, optional
Samples that overlap with another Epoch (overlapping_samples - epoch_abs_start)
- Returns
- events_matrixndarray | shape (Instances, Channels, Samples) or (Instances, Frequencies, Channels, Samples)
Neural Data in the User Defined Window for all Instances of each Label