Skip to content

Commit

Permalink
tiny fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 committed Oct 3, 2023
1 parent 72a22cc commit d4c1d67
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/spikeanalysis/spike_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,26 +699,23 @@ 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}")
plt.tight_layout()
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
Expand Down

0 comments on commit d4c1d67

Please sign in to comment.