SpikeInterface / SpikeInterface/spikeinterface

Clarify scope of `valid_unit_periods` extension and the `periods` argument in metric extensions

Open
#4,590 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
847
Forks
280
Avg merge
3d 9h
Merged PRs (30d)
29

Description

I am working on ndx-spikesorting with @alejoe91, where I am mapping the concept of intervals in SpikeInterface to NWB. I want to ask three design questions about the scope of valid_unit_periods and the periods argument in the metric extensions:

  1. On the role of valid_unit_periods's output: is its per-unit interval output valuable as standalone data (for visualization via ValidUnitPeriodsWidget, curation decisions, downstream user analyses outside SpikeInterface), or is its only purpose to produce intervals that restrict the computation of metric extensions?

  2. On interval calculation: should valid_unit_periods remain the only extension that calculates per-unit intervals, or should multiple extensions for different algorithms (Bombcell-style criteria, drift-aware variants, faithful npyx ports, etc.) coexist as siblings?

  3. On the periods= argument: should quality_metrics (and spiketrain_metrics) accept only intervals from quality-driven sources like valid_unit_periods, or also arbitrary intervals (behavioral epochs, trial structure, drift-corrected windows, etc.)? What was the intent here?

From reading the code, my current interpretation is:

  1. valid_unit_periods is the canonical (and only expected) source of per-unit time intervals; the meaning of these intervals is generically "times where the sorting is good."
  2. The metric extensions' periods= argument is meant to consume intervals only of that type: "times where the sorting is good."

Having these clarified would help me map the SpikeInterface structures to NWB cleanly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the valid_unit_periods extension and the periods arguments in quality_metrics and spiketrain_metrics. Compare the issue's three design questions with the current code and explain whether intervals are canonical quality periods or may be arbitrary. Done means the intended scope and sibling-extension model are decided clearly enough to guide the NWB mapping.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.