stnmf.preprocessing.spiketriggered.average
- stnmf.preprocessing.spiketriggered.average(stimulus, spikes, tau, continuous=False, tqdm_args=None)
Compute the spike-triggered average (STA) for multiple cells
- Parameters:
stimulus (
iteratoror array_like) – This iterator should yield a (x,y,trial_length) array_like for each trial, where trial_length matches the number of elements of spikesspikes (
(num_trials,trial_length,num_cells) array_like) – Binned spike counts of multiple cells. If two dimensional, assume num_cells == 1tau (
int) – Temporal filter lengthcontinuous (
bool, optional) – Specify if trials should be treated as connected chunks of a continuous recording or if they are separated. Default is Falsetqdm_args (
dict, optional) – Arguments to pass to tqdm progress bar. If empty, tqdm is not used. Default is None
- Returns:
sta (
(num_cells,x,y,tau) numpy.ndarray) – STAs of all cells