1111from driftplots .data_loader import DataLoader
1212from driftplots .interactive .driftmap_plot_widget import DriftmapPlotWidget
1313
14- # test ideas:
15- # check signatures match default args between interactive and matplotlib
16-
1714
1815class DriftPlotter :
1916 """Load Kilosort or SpikeInterface output and plot drift maps.
@@ -46,7 +43,7 @@ def __init__(self, path_or_analyzer: str | Path, verbose: bool = True) -> None:
4643 def drift_map_plot_interactive (
4744 self ,
4845 decimate : int | bool | None | Literal ["estimate" ] = "estimate" ,
49- exclude_noise : bool | str = False ,
46+ good_units_only : bool | str = False ,
5047 amplitude_cmap_scaling : str | tuple [float , float ] = "linear" ,
5148 n_color_bins : int = 20 ,
5249 point_size : float = 5.0 ,
@@ -64,12 +61,13 @@ def drift_map_plot_interactive(
6461 automatically reduce spikes to a reasonable count (≈ 100 000).
6562 Pass ``False``, ``None``, or ``0`` to disable decimation. Pass
6663 an integer *n* to keep every *n*-th spike.
67- exclude_noise
68- If ``True``, remove all spikes belonging to clusters labelled
69- "noise". For Kilosort, this is taken from the cluster_groups.csv /
70- cluster_group.tsv file that reflects labels set in Phy. For a
71- SortingAnalyzer, a string must be passed. The labels are taken from
72- the sorting property with the passed name (e.g. "KSLabel").
64+ good_units_only
65+ If ``True``, only spikes belonging to "good" units are displayed.
66+ For Kilosort, this is taken from the
67+ cluster_groups.csv / cluster_group.tsv file that reflects labels
68+ set in Phy. For a SortingAnalyzer, a string must be passed.
69+ The labels are taken from the sorting property with the
70+ passed name (e.g. "KSLabel").
7371 amplitude_cmap_scaling
7472 Controls how spike amplitudes are mapped to the greyscale
7573 colormap. Pass ``"linear"`` or ``"log2"`` or ``"log10"`` for automatic
@@ -105,7 +103,7 @@ def drift_map_plot_interactive(
105103 app = QtWidgets .QApplication .instance () or QtWidgets .QApplication ([])
106104
107105 processed_data = self ._data_loader .get_processed_data (
108- exclude_noise ,
106+ good_units_only ,
109107 decimate ,
110108 filter_amplitude_mode ,
111109 filter_amplitude_values ,
@@ -126,7 +124,7 @@ def drift_map_plot_interactive(
126124 def drift_map_plot_matplotlib (
127125 self ,
128126 decimate : int | bool | None | Literal ["estimate" ] = "estimate" ,
129- exclude_noise : bool | str = False ,
127+ good_units_only : bool | str = False ,
130128 amplitude_cmap_scaling : str | tuple [float , float ] = "linear" ,
131129 n_color_bins : int = 20 ,
132130 point_size : float = 5.0 ,
@@ -147,12 +145,13 @@ def drift_map_plot_matplotlib(
147145 automatically reduce spikes to a reasonable count (≈ 100 000).
148146 Pass ``False``, ``None``, or ``0`` to disable decimation. Pass
149147 an integer *n* to keep every *n*-th spike.
150- exclude_noise
151- If ``True``, remove all spikes belonging to clusters labelled
152- "noise". For Kilosort, this is taken from the cluster_groups.csv /
153- cluster_group.tsv file that reflects labels set in Phy. For a
154- SortingAnalyzer, a string must be passed. The labels are taken from
155- the sorting property with the passed name (e.g. "KSLabel").
148+ good_units_only
149+ If ``True``, only spikes belonging to "good" units are displayed.
150+ For Kilosort, this is taken from the
151+ cluster_groups.csv / cluster_group.tsv file that reflects labels
152+ set in Phy. For a SortingAnalyzer, a string must be passed.
153+ The labels are taken from the sorting property with the
154+ passed name (e.g. "KSLabel").
156155 amplitude_cmap_scaling
157156 Controls how spike amplitudes are mapped to the greyscale
158157 colormap. Pass ``"linear"`` or ``"log2"`` or ``"log10"`` for automatic
@@ -196,7 +195,7 @@ def drift_map_plot_matplotlib(
196195 The populated Matplotlib figure.
197196 """
198197 processed_data = self ._data_loader .get_processed_data (
199- exclude_noise ,
198+ good_units_only ,
200199 decimate ,
201200 filter_amplitude_mode ,
202201 filter_amplitude_values ,
0 commit comments