SpikeInterface / SpikeInterface/spikeinterface

The `get_extremum_channels` should have an `auto` option.

Open
#2,132 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently the get_extremum_channels (and many other functions) require a peak_sign. However, since the input of all these functions is usually a WaveformExtractor, we could add the option to automatically estimate the peak_sign from the templates.

e.g.:

if peak_sign is None:
    mean_template_value = np.mean(all_templates)
    peak_sign = "neg" if mean_template_value < 0 else "pos"
# or we could use the skewness of the all_templates distribution, which should have a negative (or positive) tail

What do you guys think?

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

Locate get_extremum_channels and the other functions that require peak_sign, then inspect how they receive a WaveformExtractor and access templates. The proposed behavior is not settled between using the mean template value or distribution skewness, so confirm the intended estimation rule and define tests showing that the auto option selects the expected peak sign.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.