@@ -190,6 +190,14 @@ def test_plot_unit_waveforms(self):
190
190
backend = backend ,
191
191
** self .backend_kwargs [backend ],
192
192
)
193
+ # channel ids
194
+ sw .plot_unit_waveforms (
195
+ self .sorting_analyzer_sparse ,
196
+ channel_ids = self .sorting_analyzer_sparse .channel_ids [::3 ],
197
+ unit_ids = unit_ids ,
198
+ backend = backend ,
199
+ ** self .backend_kwargs [backend ],
200
+ )
193
201
# test warning with "larger" sparsity
194
202
with self .assertWarns (UserWarning ):
195
203
sw .plot_unit_waveforms (
@@ -205,18 +213,18 @@ def test_plot_unit_templates(self):
205
213
for backend in possible_backends :
206
214
if backend not in self .skip_backends :
207
215
print (f"Testing backend { backend } " )
208
- print ( "Dense" )
216
+ # dense
209
217
sw .plot_unit_templates (self .sorting_analyzer_dense , backend = backend , ** self .backend_kwargs [backend ])
210
218
unit_ids = self .sorting .unit_ids [:6 ]
211
- print ( "Dense + radius" )
219
+ # dense + radius
212
220
sw .plot_unit_templates (
213
221
self .sorting_analyzer_dense ,
214
222
sparsity = self .sparsity_radius ,
215
223
unit_ids = unit_ids ,
216
224
backend = backend ,
217
225
** self .backend_kwargs [backend ],
218
226
)
219
- print ( "Dense + best" )
227
+ # dense + best
220
228
sw .plot_unit_templates (
221
229
self .sorting_analyzer_dense ,
222
230
sparsity = self .sparsity_best ,
@@ -225,15 +233,13 @@ def test_plot_unit_templates(self):
225
233
** self .backend_kwargs [backend ],
226
234
)
227
235
# test different shadings
228
- print ("Sparse" )
229
236
sw .plot_unit_templates (
230
237
self .sorting_analyzer_sparse ,
231
238
unit_ids = unit_ids ,
232
239
templates_percentile_shading = None ,
233
240
backend = backend ,
234
241
** self .backend_kwargs [backend ],
235
242
)
236
- print ("Sparse2" )
237
243
sw .plot_unit_templates (
238
244
self .sorting_analyzer_sparse ,
239
245
unit_ids = unit_ids ,
@@ -242,8 +248,6 @@ def test_plot_unit_templates(self):
242
248
backend = backend ,
243
249
** self .backend_kwargs [backend ],
244
250
)
245
- # test different shadings
246
- print ("Sparse3" )
247
251
sw .plot_unit_templates (
248
252
self .sorting_analyzer_sparse ,
249
253
unit_ids = unit_ids ,
@@ -252,15 +256,14 @@ def test_plot_unit_templates(self):
252
256
shade_templates = False ,
253
257
** self .backend_kwargs [backend ],
254
258
)
255
- print ("Sparse4" )
256
259
sw .plot_unit_templates (
257
260
self .sorting_analyzer_sparse ,
258
261
unit_ids = unit_ids ,
259
262
templates_percentile_shading = 0.1 ,
260
263
backend = backend ,
261
264
** self .backend_kwargs [backend ],
262
265
)
263
- print ( "Extra sparsity" )
266
+ # extra sparsity
264
267
sw .plot_unit_templates (
265
268
self .sorting_analyzer_sparse ,
266
269
sparsity = self .sparsity_strict ,
@@ -269,6 +272,16 @@ def test_plot_unit_templates(self):
269
272
backend = backend ,
270
273
** self .backend_kwargs [backend ],
271
274
)
275
+ # channel ids
276
+ sw .plot_unit_templates (
277
+ self .sorting_analyzer_sparse ,
278
+ channel_ids = self .sorting_analyzer_sparse .channel_ids [::3 ],
279
+ unit_ids = unit_ids ,
280
+ templates_percentile_shading = [1 , 10 , 90 , 99 ],
281
+ backend = backend ,
282
+ ** self .backend_kwargs [backend ],
283
+ )
284
+
272
285
# test "larger" sparsity
273
286
with self .assertWarns (UserWarning ):
274
287
sw .plot_unit_templates (
0 commit comments