SpikeInterface / SpikeInterface/probeinterface
Discussion: deprecate `read_imro`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 85
- Forks
- 49
- Avg merge
- 13h 47m
- Merged PRs (30d)
- 3
Description
When discussing this pull request with @chrishalcrow, I’ve been thinking about the following:
Why do we expose read_imro directly?
The private function _read_imro_string is the one actually used by SpikeGLX and Open Ephys, while read_imro is just a wrapper around it that, for a reason that I can't remember, is exposed.
To make read_imro work, we need quite a bit of logic to infer the imDatPrb_pn (probe model number) from imDatPrb_type (probe type). This code is complex and since it was determined through trial and error when we did not have a general table, maybe not very reliable:
This was necessary when our probe descriptions were based on the probe type. However, now that the official metadata table is organized around imDatPrb_pn (probe part number), this complexity is no longer needed. In other words, this logic doesn’t serve the key functionality anymore, which is reading neuropixel metadata.
Additionally, I’m not sure exposing the functionality to read IMRO tables on their own makes sense. These tables are embedded in the meta file, and trying to read them independently seems like a feature no one has asked for.
Proposed solution:
- Move the logic for inferring
imDatPrb_pnfromimDatPrb_typeout of the core function (_read_imro_string) and into the wrapper (read_imro), keeping the complexity at the periphery. - If there is no use for stand-alone reading of imro tables then deprecate
read_imroand eventually remove it. This will allow us to eliminate code that is no longer needed now that we can rely on the metadata table.
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 in src/probeinterface/neuropixels_tools.py at read_imro and _read_imro_string, then inspect pull request #349 and callers to determine whether standalone IMRO reading is used. Done means the project has a settled decision on moving the inference logic and deprecating or retaining read_imro, with the resulting scope documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100