neuralib.plot.psth.plot_peri_onset_1d

neuralib.plot.psth.plot_peri_onset_1d(event_time, act_time, act, *, pre=3, post=5, plot_all=False, bins=100, with_fill_between=True, ax=None, **kwargs)[source]

Plot peri-event 1D activity

Parameters:
  • event_time (ndarray) – peri-event time array. Array[float, P]

  • act_time (ndarray) – activity time array. Array[float, T]

  • act (ndarray) – activity array. Array[float, T]

  • pre (float) – peri-event time before

  • post (float) – peri-event time after

  • plot_all (bool) – plot velocity every laps

  • bins (int) – number of bins per trial in a given time bins (peri-left + peri-right)

  • with_fill_between (bool) – fill_between for the sem

  • ax (Axes | None) – Axes

  • kwargs – additional arguments to ax.plot()

Returns:

x (Array[float, B]) and average velocity (Array[float, B])

Return type:

tuple[ndarray, ndarray]