Skip to content

Commit f5bcb6a

Browse files
committed
debug wobble after refactoring
1 parent 8dd3502 commit f5bcb6a

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/spikeinterface/sortingcomponents/matching/wobble.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def from_parameters_and_templates(cls, params, templates):
200200

201201
# important : this is differents from the spikeinterface.core.Sparsity
202202
@dataclass
203-
class _Sparsity:
203+
class WobbleSparsity:
204204
"""Variables that describe channel sparsity.
205205
206206
Parameters
@@ -228,7 +228,7 @@ def from_parameters_and_templates(cls, params, templates):
228228
229229
Returns
230230
-------
231-
sparsity : _Sparsity
231+
sparsity : WobbleSparsity
232232
Dataclass object for aggregating channel sparsity variables together.
233233
"""
234234
visible_channels = np.ptp(templates, axis=1) > params.visibility_threshold
@@ -252,7 +252,7 @@ def from_templates(cls, params, templates):
252252
253253
Returns
254254
-------
255-
sparsity : _Sparsity
255+
sparsity : WobbleSparsity
256256
Dataclass object for aggregating channel sparsity variables together.
257257
"""
258258
visible_channels = templates.sparsity.mask
@@ -350,9 +350,9 @@ def __init__(self, recording, return_output=True, parents=None,
350350
params = WobbleParameters(**parameters)
351351
template_meta = TemplateMetadata.from_parameters_and_templates(params, templates_array)
352352
if not templates.are_templates_sparse():
353-
sparsity = _Sparsity.from_parameters_and_templates(params, templates_array)
353+
sparsity = WobbleSparsity.from_parameters_and_templates(params, templates_array)
354354
else:
355-
sparsity = _Sparsity.from_templates(params, templates)
355+
sparsity = WobbleSparsity.from_templates(params, templates)
356356

357357
# Perform initial computations on templates necessary for computing the objective
358358
sparse_templates = np.where(sparsity.visible_channels[:, np.newaxis, :], templates_array, 0)
@@ -555,7 +555,7 @@ def subtract_spike_train(
555555
Dataclass object for aggregating the parameters together.
556556
template_meta : TemplateMetadata
557557
Dataclass object for aggregating template metadata together.
558-
sparsity : _Sparsity
558+
sparsity : WobbleSparsity
559559
Dataclass object for aggregating channel sparsity variables together.
560560
561561
Returns

src/spikeinterface/sortingcomponents/tests/test_wobble.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def test_convolve_templates():
143143
)
144144
unit_overlap = unit_overlap > 0
145145
unit_overlap = np.repeat(unit_overlap, jitter_factor, axis=0)
146-
sparsity = wobble.Sparsity(visible_channels, unit_overlap)
146+
sparsity = wobble.WobbleSparsity(visible_channels, unit_overlap)
147147

148148
# Act: run convolve_templates
149149
pairwise_convolution = wobble.convolve_templates(

0 commit comments

Comments
 (0)