Add Neuropixels 2.0 support to read_spikegadgets_neuropixels#441
Add Neuropixels 2.0 support to read_spikegadgets_neuropixels#441h-mayorquin wants to merge 12 commits into
read_spikegadgets_neuropixels#441Conversation
for more information, see https://pre-commit.ci
…s_20' into support_spikegadgets_20
|
Regarding channel ordering NPX 2 Mattias Karlsson (SpikeGadget):" I have a file (not so small unfortunately, 1GB) here https://www.dropbox.com/t/nnkTRfC0JB7hdVj2 NPX 2 4 shanks with Bennu. |
Mattias Karlsson, the Trodes author, confirmed the channelsOn layout empirically derived in SpikeInterface#441 on the PR thread. Quote the relevant description directly in the docstring so the formula has a primary-source citation next to it, not just the fixture-based verification. Co-Authored-By: Roberto <37729096+RobertoDF@users.noreply.github.com>
|
Thanks @RobertoDF, that confirmation from Mattias is exactly what we needed for the 4-shank case. I added the quote to the docstring of the channel remap function in #441 so it's on record next to the formula itself. You are also credit here and will be marked as contributor of this PR as you started the work on #439 I also tried your @alejoe91 I think this is ready to unless I am getting something wrong. |
|
thanks, amazing job! |
|
@RobertoDF did I get it right that you can talk directly Mattias? would you be open to relaying two short links his way? Both are related to what we discussed above:
The Bitbucket one in particular is something Mattias would be the right person to look at. No urgency, just whenever you happen to be in touch with him. Thanks! |
I'll forward this in the slack channel and report back. |

This PR adds Neuropixels 2.0 single-shank and 4-shank support to
read_spikegadgets_neuropixels, completing the follow-up flagged in #418 for the SpikeGadgets Bennu datalogger. The reader now dispatches on the(device, deviceSubType)pair from<SpikeConfiguration>and supports three entries: NP1.0 standard (unchanged behavior, plus a fallback for older recordings that predate thedeviceSubTypeattribute), NP2.0 single-shank, and NP2.0 4-shank. As with NP1.0 in #418, the geometry-equivalence argument lets us hardcode a single catalogue part number per family (NP2014for 4-shank,NP2000for single-shank) while clearingmodel_nameanddescriptionon the sliced probe. For the 4-shank path, the contact-ordering remap is verified against a header-only fixture provided by Alessio from (the full recording is on gin underspikegadgets/neuropixels2_4shank/).We don't have test data for the single-shank path. The catalogue pick (
NP2000) is on as solid ground as the other two formats since all NP2.0 single-shank SKUs (NP2000, NP2003, NP2004) share identical 2D geometry by the same equivalence argument used for NP1.0 in #418 and NP2.0 4-shank here. The only unverified piece is the channel-index remap: I am relying on an agent reading the Trodes source code, with an agent cross-checking the relevant sections ofconfiguration.cppfor provenance, to infer that Trodes'channelsOnbitmask for the single-shank case is the same row-major pattern as 4-shank collapsed to two columns. When test data for a single-shank.recbecomes available the only thing the test needs to confirm is the within-row column direction; the cautionary docstring can then be removed. The same approach (catalogue geometry plus Trodes source) could extend to the remaining variants Trodes can emit (NP1.0 HD, NP1.0 NHP short/medium/long, NRIC) but I can add that in another PR as there is already a PR open for spikegadgets 2.0 and this indicates is a user request at the moment.