From d4c1d675bc233dd945b8c5759471b5cda16ef5eb Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Tue, 3 Oct 2023 17:14:07 -0400 Subject: [PATCH] tiny fix --- src/spikeanalysis/spike_plotter.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/spikeanalysis/spike_plotter.py b/src/spikeanalysis/spike_plotter.py index 9afcbb1..6873ab4 100644 --- a/src/spikeanalysis/spike_plotter.py +++ b/src/spikeanalysis/spike_plotter.py @@ -699,17 +699,16 @@ def plot_latencies(self): plt.show() def plot_isi(self): - try: raw_isi = self.data.isi_raw except AttributeError: raise Exception("must run `get_interspike_intervals()`") bins = np.arange(0, 500, 10) for cluster in raw_isi.keys(): - isi = raw_isi['cluster']["isi"] * 1000 / self.data._sampling_rate + isi = raw_isi[cluster]["isi"] * 1000 / self.data._sampling_rate fig, ax = plt.subplots(figsize=self.figsize) - ax.hist(isi, density=True, bins=bins, color='k' ) + ax.hist(isi, density=True, bins=bins, color="k") ax.set_xlabel("Time (ms)") ax.set_ylabel("Counts") plt.title(f"ISI {cluster}") @@ -717,8 +716,6 @@ def plot_isi(self): plt.figure(dpi=self.dpi) plt.show() - - def _get_event_lengths(self) -> dict: """ Utility function to get the event lengths and convert from samples to seconds on a trial