Skip to content

Commit

Permalink
another plotter tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 committed Oct 28, 2024
1 parent 6b0fd3b commit 5a57c64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/spikeanalysis/spike_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def _plot_scores(
if is_the_sorting_index_the_filter:
z_score_sorting_index = sorting_index
else:
z_score_sorting_index = np.argsort(-np.sum(sub_zscores[:, current_sorting_index, event_window], axis=1))
z_score_sorting_index = np.argsort(-np.nansum(sub_zscores[:, current_sorting_index, event_window], axis=1))

if indices:
if len(self.data.si_units) > 0:
Expand All @@ -320,8 +320,8 @@ def _plot_scores(
if len(np.shape(sorted_z_scores)) == 2:
sorted_z_scores = np.expand_dims(sorted_z_scores, axis=1)

nan_mask = np.all(
np.all(np.isnan(sorted_z_scores) | np.equal(sorted_z_scores, 0) | np.isinf(sorted_z_scores), axis=2),
nan_mask = np.any(
np.any(np.isnan(sorted_z_scores) | np.isinf(sorted_z_scores), axis=2) | np.all(np.equal(sorted_z_scores, 0),axis=2),
axis=1,
)

Expand Down

0 comments on commit 5a57c64

Please sign in to comment.