SpikeInterface / SpikeInterface/spikeinterface
Monopolar triangulation for compute('unit_locations') is inconsistent with compute('spike_locations')
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 847
- Forks
- 280
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 29
Description
compute_monopolar_triangulation() from localization_tools:
https://github.com/SpikeInterface/spikeinterface/blob/6b476031da1edbfc94d7adcb075f87347313ffc7/src/spikeinterface/postprocessing/localization_tools.py#L18-L27
is used for analyzer.compute('unit_locations') while LocalizeMonopolarTriangulation from sortincomponents.peak_localization
https://github.com/SpikeInterface/spikeinterface/blob/6b476031da1edbfc94d7adcb075f87347313ffc7/src/spikeinterface/sortingcomponents/peak_localization/monopolar.py#L45-L55
is used for motion correction and analyzer.compute('spike_locations').
The issue is that they have different default arguments (as can be seen above). Is that intended? I would think the args from LocalizeMonopolarTriangulation (which use more bells and whistles) make more sense overall.
A separate issue is that enforce_decrease has no effect in compute_monopolar_triangulation (it is just commented out)
https://github.com/SpikeInterface/spikeinterface/blob/6b476031da1edbfc94d7adcb075f87347313ffc7/src/spikeinterface/postprocessing/localization_tools.py#L118-L121
Is that also intended? Either it should be uncommented or the argument dropped.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare compute_monopolar_triangulation() in src/spikeinterface/postprocessing/localization_tools.py with LocalizeMonopolarTriangulation in src/spikeinterface/sortingcomponents/peak_localization/monopolar.py, focusing on their default arguments. Inspect the enforce_decrease handling around localization_tools.py lines 118-121. Done means the intended defaults and enforce_decrease behavior are decided and the two computation paths are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100