Repository navigation
Conversation
added 2 commits
November 27, 2026 15:55
SpikeConfiguration device="neuropixelsNRIC" recordings (SpikeGadgets
Pixie384 headstage) share the Neuropixels hwChan-ascending ephys
layout: byte pair i of each packet holds the sample of hwChan i.
Verified bit-exact against the Trodes export of a real 384-channel
recording (deviceSubType "10").
Route the device through the existing hwChan-ascending branch via a
shared `_HWCHAN_ASCENDING_DEVICES` tuple used by both the binary-order
dispatch and the channel naming (id="hwChan{i}",
name="probe{spikeSortingGroup}_chan{i}"). The `neuropixels_LFP` Device
present in NRIC packets contributes `numBytes` to the packet size only
and is not decoded.
Two dedicated tests on a cropped 384-channel recording: one asserts
the Neuropixels id/name/gain semantics (ids "hwChan{i}", names
"probe{spikeSortingGroup}_chan{i}", gain from spikeScalingToUv), the
other cross-checks the decoded ephys region bit-exactly against the
Trodes export of the same recording, pinning the hwChan-ascending
layout of the NRIC device to an independent decoder.
The cropped .rec is also listed in entities_to_test so the generic
compliance suite covers it. The Trodes-exported .dat is ground truth
for the bit-exact comparison and is deliberately not listed there:
SpikeGadgetsRawIO cannot open it. Both fixtures must be added to
ephy_testing_data under spikegadgets/ (the upload has to land before
these tests can run in CI).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SpikeGadgetsRawIOcurrently rejects recordings from the SpikeGadgetsPixie384 headstage, whose
amplifier chip (NRIC is same generation as Neuropixels) is declared in the
header as
SpikeConfiguration device="neuropixelsNRIC":This PR adds that branch. The NRIC chip turns out to share the Neuropixels
hwChan-ascending ephys layout, so the device routes through the existing
Neuropixels code path - users no longer need the Trodes export detour
(and its full-size
.datduplicate) to read these recordings.What changed
_HWCHAN_ASCENDING_DEVICES = ("neuropixels1", "neuropixels2", "neuropixelsNRIC"), replacing the two previouslyduplicated tuples. It gates both the binary-order dispatch and the
channel naming (
id="hwChan{i}",name="probe{spikeSortingGroup}_chan{i}"),so there is a single place to extend for future hwChan-ascending devices.
neuropixels_LFPdevice bytes are packet-size-accounted but not decoded) and a note in
__init__.against Trodes' own export; the fixture
.recis added toentities_to_test.Verification
Against a real 384-channel recording (17,356,773 packets, ~579 s, Trodes
2.8.2,
deviceSubType="10"):0x55(1) +Controller_DIO(1) +Multiplexed(8) +
neuropixels_LFP(66) + timestampuint32(4) + 384 ×int16ephys.against Trodes' export of the same recording on windows spread across
the file.
spikeScalingToUvin the XML, so uV scaling works as forNeuropixels.
Test data (action needed)
Two small fixtures must be added to
ephy_testing_dataunderspikegadgets/(please find them here and upload to gin):SpikeGadgets_test_data_Pixie384_20261104_cropped.rec(1.1 MB:XML header + 1000 packets)
SpikeGadgets_test_data_Pixie384_20261104_trodes_raw_cropped.dat(769 KB: Trodes' export of the same range, ground truth for the
bit-exact test)
The
.recis listed inentities_to_test, so CI needs the upload beforethis can pass; the
.datis deliberately not listed, as it is ground truthfor the dedicated test, not a
.recthe RawIO can open.Notes / limitations
deviceSubType="10"has been verified against hardware; other NRICsubtypes route the same way.
neuropixels_LFPdevice present in NRIC packets contributesnumBytesto the packet size only. Its rotating subsampled LFP samples(
lfpSubsamplingInterval) are not decoded: there is no channel metadatafor that block, and Trodes exports the LFP band separately.