spiketools.measures.conversions.convert_isis_to_times¶
- spiketools.measures.conversions.convert_isis_to_times(isis, add_initial=True, start_time=0)[source]¶
Convert a sequence of inter-spike intervals to spike times.
- Parameters:
- isis1d array
Distribution of interspike intervals, in seconds.
- add_initialbool, optional, default: True
Whether to prepend the offset value to the beginning of the spike times.
- start_timefloat, optional
The initial start time for the converted spike times.
- Returns:
- spikes1d array
Spike times, in seconds.
Examples
Convert a sequence of inter-spike intervals to their corresponding spike times, in seconds:
>>> isis = np.array([0.3, 0.6, 0.8, 0.2, 0.7]) >>> convert_isis_to_times(isis) array([0. , 0.3, 0.9, 1.7, 1.9, 2.6])