Skip to content

Fix the IBL Cbin extractor so that it works with 4 split shanks as well#4567

Open
rai-pranav wants to merge 2 commits intoSpikeInterface:mainfrom
int-brain-lab:fix/cbin-ibl-4-split-shanks
Open

Fix the IBL Cbin extractor so that it works with 4 split shanks as well#4567
rai-pranav wants to merge 2 commits intoSpikeInterface:mainfrom
int-brain-lab:fix/cbin-ibl-4-split-shanks

Conversation

@rai-pranav
Copy link
Copy Markdown

The .meta file that is produced when converting the Np2 probes to 4 individual shanks does not contain the ~ sign in front of the fileds which are lists, and hence the read_meta_file function from neo.rawio.spikeglxrawio fails. So I have written some functions which can handle this version of the meta file.

@rai-pranav
Copy link
Copy Markdown
Author

Hi @alejoe91
I have created this PR to fix some IBL specific loading of the Np2 4 shanks dataset.
Some of the windows OS tests are failing which I don't think are related to the my changes. Any hints on how to resolve them?

@chrishalcrow
Copy link
Copy Markdown
Member

Hello, I think the test failure was related to a downstream cache test failure here: https://github.com/SpikeInterface/spikeinterface/actions/runs/24997078165
I reran the caching successfully here: https://github.com/SpikeInterface/spikeinterface/actions/runs/25054593823
Which seems to have fixed the git-annex install here.
I'm not sure how to make this more robust, but at least the tests are passing now!

@rai-pranav
Copy link
Copy Markdown
Author

I cannot directly assign reviewers to this PR.
Can someone please review this PR ? @chrishalcrow @alejoe91 🙏

@chrishalcrow
Copy link
Copy Markdown
Member

Hi @rai-pranav , I think that all the probe reading logic should be handled by ProbeInterface instead of SpikeInterface.

I don't quite understand the problem. Does SpikeGLX produce these .meta files, or do you make them yourself when you convert your 4-shank recording into 4 1-shank recordings? If SpikeGLX makes them, we should update this function

https://github.com/SpikeInterface/probeinterface/blob/6c94c35dbdadc703ee38359fcd16d39bcf34aad6/src/probeinterface/neuropixels_tools.py#L875

to work with your data.

Could you share your .meta files? Would help me understand the issue better :)

@rai-pranav
Copy link
Copy Markdown
Author

Hi @chrishalcrow
Thanks for your reply.

I have uploaded an example .meta file here

These meta files are produced when we convert the NP 2.4 probes to 4 1 shank probes. So I think this is very IBL specific, and that is why I was thinking including it inside cbin_ibl.py file would restrict it to the IBL data.

@alejoe91 alejoe91 added the extractors Related to extractors module label May 4, 2026
@alejoe91
Copy link
Copy Markdown
Member

alejoe91 commented May 4, 2026

I think it's fine to keep it here then, but let's rename the function to _read_cbin_probe

I am taking the latest way of getting the sample shifts during the merge conflit.
@rai-pranav rai-pranav force-pushed the fix/cbin-ibl-4-split-shanks branch from cf9faa0 to e76b603 Compare May 5, 2026 11:38
@rai-pranav rai-pranav force-pushed the fix/cbin-ibl-4-split-shanks branch from e76b603 to 622dde8 Compare May 5, 2026 11:51
@rai-pranav
Copy link
Copy Markdown
Author

Hi @alejoe91
I have renamed the function to _read_cbin_probe.
Let me know if I should make any other changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extractors Related to extractors module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants