Skip to content

Spikeglx: use probe features from ProbeTable to infer Neuropixels type#1842

Merged
h-mayorquin merged 9 commits into
NeuralEnsemble:masterfrom
alejoe91:spikeglx-probe-table
Jun 10, 2026
Merged

Spikeglx: use probe features from ProbeTable to infer Neuropixels type#1842
h-mayorquin merged 9 commits into
NeuralEnsemble:masterfrom
alejoe91:spikeglx-probe-table

Conversation

@alejoe91

Copy link
Copy Markdown
Contributor

Following #1839, the SpikeGLX reader is updated to infer the 1.0/2.0 probe type from the datasheet field of the associated entry in the noe/resources/neuropixels_probe_features.json.

In case the datasheet is not 1.0/2.0, a warning is pronted and unitary gains are added.

@alejoe91 alejoe91 requested a review from h-mayorquin April 22, 2026 12:41
@samuelgarcia samuelgarcia added this to the 0.14.5 milestone Apr 22, 2026

@chrishalcrow chrishalcrow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, and also allows the new NP2020 data to load successfully.
(I know my approval has little weight here - but I'm giving it anyway!!)

@alejoe91

alejoe91 commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

This looks good to me, and also allows the new NP2020 data to load successfully. (I know my approval has little weight here - but I'm giving it anyway!!)

I'll take it!

@h-mayorquin h-mayorquin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chrishalcrow for testing this and sorry for taking so long @alejoe91. Actually, I was not sure if it was ready so I delayed it, sorry for assuming wrong. I have some requests regarding the handling of warnings vs error but otherwise LGTM.

Metacommentary:

After #1839 and #1842 we have our own copy of the json of the probe library. This is fine as long as both releases stay in lockstep with billkarsh's ProbeTable, but the cadence is controlled by two independent actions and two independent release cycles. A user with neo==X and probeinterface==Y where X and Y bracket a ProbeTable update might see diferences depending on versios. Honestly, it would be been simpler to just use probeinterface here rather than python-neo carrying its own copy. I do understand the French reason you probably decided against it though.

Comment thread neo/rawio/spikeglxrawio.py Outdated
Comment thread neo/rawio/spikeglxrawio.py Outdated
@alejoe91

alejoe91 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

TODO: find a more robust way to assess probe technology from probe features (maybe crossing description/databus/datasheet)

@alejoe91

alejoe91 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@h-mayorquin I think this is ready now: I improved the logic to spot 1.0 probes and in case of fixed gain we use the probe features gain as fallback in case the gain is not in the meta file

Comment thread neo/rawio/spikeglxrawio.py Outdated

@h-mayorquin h-mayorquin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I would prefer the helper method to be private to keep the API clean. Specially that method as maybe a better way might come alone.

@alejoe91

Copy link
Copy Markdown
Contributor Author

This looks good. I would prefer the helper method to be private to keep the API clean. Specially that method as maybe a better way might come alone.

private now! I'll merge as soon as tests are done

@h-mayorquin h-mayorquin merged commit 7581f98 into NeuralEnsemble:master Jun 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants