allensdk.brain_observatory.behavior.event_detection module

allensdk.brain_observatory.behavior.event_detection.filter_events_array(arr: numpy.ndarray, scale: float = 2, n_time_steps: int = 20) → numpy.ndarray[source]

Convolve the trace array with a 1d causal half-gaussian filter to smooth it for visualization

Uses a halfnorm distribution as weights to the filter

Modified from initial implementation by Nick Ponvert

arr: np.ndarray

Trace matrix of dimension n traces x n frames

scale: float

std deviation of halfnorm distribution

n_time_steps: int

number of time steps to use for the convolution operation


Output of the convolution operation