Skip to content

Commit 0ea9ff5

Browse files
authored
Merge pull request #209 from chrishalcrow/fix-spikerate-if-small-rec
Fix spikerate bug if recording is less than 1 min
2 parents 2b3436f + 23679e3 commit 0ea9ff5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spikeinterface_gui/spikerateview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _qt_refresh(self):
7171
total_frames = self.controller.final_spike_samples
7272
bins_s = self.settings['bin_s']
7373
t_start, _ = self.controller.get_t_start_t_stop()
74-
num_bins = total_frames[segment_index] // int(sampling_frequency) // bins_s
74+
num_bins = max(total_frames[segment_index] // int(sampling_frequency) // bins_s, 1)
7575

7676
for r, unit_id in enumerate(visible_unit_ids):
7777

0 commit comments

Comments
 (0)