SpikeInterface / SpikeInterface/spikeinterface
Encountered divided by zero when using ''localize_peaks()"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 847
- Forks
- 280
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 29
Description
Hello,
I was testing out DREDge with my recording but it seems to have some problem during peak localization step. It encounters some divided by zero problem. I checked the probe coordinates and device indices, both are good.
The warning message is:
RuntimeWarning: divide by zero encountered in divide
com = np.sum(wf_data[:, np.newaxis] * local_contact_locations, axis=0) / np.sum(wf_data)
My preparation of the recording:
Peak detection:
Localization step (this is where the error comes from):
Please let me know which direction to head towards to solve this. Thanks a lot!
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
Start by tracing DREDge's peak-localization path into localize_peaks and reproduce the reported RuntimeWarning using the recording preparation and peak-detection setup shown in the issue. Inspect the inputs to the displayed NumPy calculation and determine what condition produces a zero denominator; done means localization handles that condition without the divide-by-zero warning and the reported workflow still completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100