Fix neuropixelsGLX for NIDQ streams, scaling, and digital channels#97
Merged
stevevanhooser merged 5 commits intomainfrom Apr 7, 2026
Merged
Conversation
filenamefromepochfiles was hardcoded to match *.ap.meta, rejecting .nidq.meta and .lf.meta files. Now matches any *.meta file. https://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1
Contributor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #97 +/- ##
==========================================
+ Coverage 31.91% 32.03% +0.11%
==========================================
Files 92 92
Lines 4646 4660 +14
==========================================
+ Hits 1483 1493 +10
- Misses 3163 3167 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
When multiple .meta files are present in the epoch (e.g., for cross-device synchronization), derive the correct .meta file from the .bin file's base name instead of erroring on multiple matches. https://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1
readchannels_epochsamples and underlying_datatype crashed with "SWITCH expression must be a scalar or a character vector" when channeltype was passed as a cell array from the NDI call chain. Extract the first element when channeltype is a cell, matching the convention used by axon_abf and bjg readers. https://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1
The analog_in case called ndr.format.neuropixelsGLX.read with (-Inf, Inf) reading the entire file into memory, then immediately discarded the result and re-read using read_samples with the actual s0:s1 range. Removed the redundant full-file read. https://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1
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
mustBePositiveerror:numChans/SRdefault to0as a sentinel for "read from .meta file" butmustBePositiverejected0. Changed tomustBeNonnegative.'scale'option toread()(defaulttrue): Converts raw int16 data to volts viasamples2volts(). Pass'scale', falsefor raw int16.header()now parsesniAiRangeMax/Min,niMaxInt,niMNGain,niMAGain, and per-type channel counts (MN/MA/XA/DW).samples2volts()applies correct per-channel-type gains for NIDQ streams.double(raw)with no gain/range scaling..metafile in reader:filenamefromepochfileswas hardcoded to*.ap.meta, rejecting.nidq.metaand.lf.metafiles. Now matches any*.meta.Test plan
TestNeuropixelsGLXtests pass (updated for'scale'default)testFormatReadScaled/testFormatReadScaleDefaultverify scaled outputTestNeuropixelsGLX_nidqcovers NIDQ header parsing, MN/MA/mixed voltage scaling, digital channel pass-through, and scaled/unscaled readhttps://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1