SpikeInterface / SpikeInterface/spikeinterface
Feature Request: Making order = np.argsort(device_channel_indices) optional
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 847
- Forks
- 280
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 29
Description
Dear Spikeinterface community,
I am asking for this feature in the _set_probes() as I would like to feed my previous dataset sorted by kilosort standalone into an analyser with the new function read_kilosort_as_analyzer #4366
The problem is that my probe map, coming from probe_interface library is not sorted by channels. While using spikeinterface to do spike sorting, it is fine to sort them by channels. However, when using read_kilosort_as_analyzer, it will check whether channels location used in the kilosort4 phy folder matches with its counterpart in the Recording (e.g. OpenEphysBinaryRecordingExtractor). Since kilosort4 does not sort the map, there is always a mismatch between the two.
or
I can certainly create a set of probe maps and sort them by channels first before using kilosort standalone to do spike sorting so that I will never to worry about this mismatch. However, would it be possible to make order = np.argsort(device_channel_indices) an option to skip so that both Recording and either my original probe.prb or kilosort's channel_map.npy, channel_locations.npy, and channel_shanks.npy are equally unsorted?
Or if you have any suggestion about circuvment the mismatch in channels location when using read_kilosort_as_analyzer?
Many thanks in advance.
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 at _set_probes() and follow how device_channel_indices is ordered, then inspect read_kilosort_as_analyzer and the handling of channel_map.npy, channel_locations.npy, and channel_shanks.npy. Done means an unsorted probe and Kilosort dataset can be read without a channel-location mismatch while existing sorted behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100