Skip to content

Commit 09c8d1d

Browse files
committed
Note future phylib selector release
1 parent fdc92c4 commit 09c8d1d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

phy/apps/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ def _sample_spikes_evenly(spike_ids, n_spikes):
115115

116116
def _select_spikes_evenly(selector, n_spikes, cluster_ids, **kwargs):
117117
"""Use phylib's even selector when available, with a 2.7-compatible fallback."""
118+
# TODO: After phylib releases the even/disjoint selection APIs and phy raises
119+
# its minimum phylib version, remove this fallback and the constructor check
120+
# in `_set_selector()`.
118121
if 'sample_evenly' in inspect.signature(selector).parameters:
119122
return selector(n_spikes, cluster_ids, sample_evenly=True, **kwargs)
120123

@@ -1290,7 +1293,8 @@ def spikes_per_cluster(cluster_id):
12901293
'chunk_bounds': chunk_bounds,
12911294
'n_chunks_kept': self.n_chunks_kept,
12921295
}
1293-
# phylib 2.7 does not yet expose this optimization hint.
1296+
# phylib 2.7 does not yet expose this optimization hint. See the release
1297+
# TODO in `_select_spikes_evenly()`.
12941298
if 'spikes_are_disjoint' in inspect.signature(SpikeSelector).parameters:
12951299
selector_kwargs['spikes_are_disjoint'] = True
12961300
self.selector = SpikeSelector(**selector_kwargs)

0 commit comments

Comments
 (0)