data_base
❭ db_initializers
❭ prepare_ANN_batches
❭ compute_ISI_from_st
compute_ISI_from_st¶
-
data_base.db_initializers.prepare_ANN_batches.compute_ISI_from_st(st, timepoint, fillna=
None
)¶ Calculate the time since the last spike in ms for each element in a spike time pd.Series or pd.DataFrame.
Given a pandas Series or DataFrame of spike times, this method returns a list of size
(max\_time - min\_time)//time\_step
, where each time step gives the amount of time since the last spike in ms.- Parameters:¶
st (pd.DataFrame | pd.Series) – pandas DataFrame or Series of spike times
timepoint (int) – Time point in ms
fillna (int, optional) – Fill with NaN until the array has this length. Defaults to None.
- Returns:¶
A pandas Series of inter-spike intervals in ms.
- Return type:¶
pd.Series
See also
compute_ISI_from_st_list()
for the list version.compute_ISI_array()
for the array version.