eventlock#

eventlock(data, frames_or_xvals, eventvals, medval=None)#

Shift epochs so their event frames or time values align.

A scalar second argument selects multi-channel mode, where data has shape (channels, frames * trials). Zero infers frames per trial from eventvals. A vector selects single-channel mode, where data has shape (frames, trials); [start_ms, frames, srate_hz] is accepted as a compact time-axis specification. Positive returned shifts move data right.

Parameters:
  • data (Any)

  • frames_or_xvals (Any)

  • eventvals (Any)

  • medval (float | None)

Return type:

tuple[ndarray, float, ndarray]