Skip to content

Commit

Permalink
fix small bug in an error message (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
joni-herttuainen committed May 15, 2023
1 parent ae58122 commit 5aa3d08
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bluepysnap/_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,12 @@ def spikes_firing_rate_histogram(filtered_report, time_binsize=None, ax=None):
if time_binsize is not None and time_binsize <= 0:
raise BluepySnapError(f"Invalid time_binsize = {time_binsize}. Should be > 0.")

spike_report = filtered_report.spike_report

times = filtered_report.report.index
node_count = filtered_report.report[["ids", "population"]].drop_duplicates().shape[0]

if len(times) == 0:
raise BluepySnapError(
"No data to display. You should check your " f"'group' query: {spike_report.group}."
f"No data to display. You should check your 'group' query: {filtered_report.group}."
)

time_start = np.min(times)
Expand Down Expand Up @@ -214,8 +212,7 @@ def spikes_isi(filtered_report, use_frequency=False, binsize=None, ax=None): #

if len(values) == 0:
raise BluepySnapError(
"No data to display. You should check your "
f"'group' query: {filtered_report.spike_report.group}."
f"No data to display. You should check your 'group' query: {filtered_report.group}."
)
if use_frequency:
values = values[values > 0] # filter out zero intervals
Expand Down

0 comments on commit 5aa3d08

Please sign in to comment.