From f708529fff8c8f89cb071bb21614eb0d635b7d17 Mon Sep 17 00:00:00 2001 From: Luke Shaheen Date: Thu, 1 Apr 2021 16:51:35 -0700 Subject: [PATCH 1/2] Fix bug where selected clusters were being shown in the grey dots/histogram ('other' clusters) --- phy/apps/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phy/apps/base.py b/phy/apps/base.py index d3d4e059..79f406b2 100644 --- a/phy/apps/base.py +++ b/phy/apps/base.py @@ -1312,6 +1312,8 @@ def _amplitude_getter(self, cluster_ids, name=None, load_all=False): channel_id = channel_ids[0] # All clusters appearing on the first cluster's peak channel. other_clusters = self.get_clusters_on_channel(channel_id) + # Remove slected clusters from other_clusters to prevent them from being included in grey dots/histogram + other_clusters = [e for e in other_clusters if e not in cluster_ids] # Get the amplitude method. f = self._get_amplitude_functions()[name] # Take spikes from the waveform selection if we're loading the raw amplitudes, From 268eab53f252f3b00cb3c2393f876ba05cb23959 Mon Sep 17 00:00:00 2001 From: lshaheen Date: Tue, 6 Apr 2021 13:06:53 -0700 Subject: [PATCH 2/2] Update base.py Fixed comment line too long. --- phy/apps/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phy/apps/base.py b/phy/apps/base.py index 79f406b2..0425ddc3 100644 --- a/phy/apps/base.py +++ b/phy/apps/base.py @@ -1312,7 +1312,8 @@ def _amplitude_getter(self, cluster_ids, name=None, load_all=False): channel_id = channel_ids[0] # All clusters appearing on the first cluster's peak channel. other_clusters = self.get_clusters_on_channel(channel_id) - # Remove slected clusters from other_clusters to prevent them from being included in grey dots/histogram + # Remove selected clusters from other_clusters to prevent them from being included + # in both the grey dots and grey histogram other_clusters = [e for e in other_clusters if e not in cluster_ids] # Get the amplitude method. f = self._get_amplitude_functions()[name]