data_base
❭ db_initializers
❭ prepare_ANN_batches
❭ compute_AP_array
compute_AP_array¶
-
data_base.db_initializers.prepare_ANN_batches.compute_AP_array(st, min_time, max_time, fillna=
1000
, step=1
)¶ One-hot encode spike times to a binned time vector.
Given a collection of spike times of a single trial, this method returns an array of length
(max\_time - min\_time)//step
, where a boolean represents if a spike is found in this interval.- Parameters:¶
st (array) – Array of spike times
min_time (float/int) – Min time in ms
max_time (float/int) – Max time in ms
step (int, optional) – Size of timesteps to consider. Defaults to 1 ms
- Returns:¶
Array where each element is a boolean representing if an AP was present during this timestep.
- Return type:¶
array