Skip to content

Commit

Permalink
Merge pull request SpikeInterface#2334 from zm711/fix-syn-rdm-firing
Browse files Browse the repository at this point in the history
Fix add_shift_shuffle section in synthesize_random_firings
  • Loading branch information
alejoe91 authored Dec 14, 2023
2 parents cd317f8 + c46ae85 commit b7b891b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spikeinterface/core/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,9 @@ def synthesize_random_firings(
a = refractory_sample
b = refractory_sample * 20
shift = a + (b - a) * x**2
shift = shift.astype("int64")
spike_times[some] += shift
times0 = times0[(0 <= times0) & (times0 < segment_size)]
spike_times = spike_times[(0 <= spike_times) & (spike_times < segment_size)]

(violations,) = np.nonzero(np.diff(spike_times) < refractory_sample)
spike_times = np.delete(spike_times, violations)
Expand Down

0 comments on commit b7b891b

Please sign in to comment.