Skip to content

Fix voltage scaling for digital channels in neuropixelsGLX#96

Merged
stevevanhooser merged 2 commits intomainfrom
claude/fix-neuropixels-numchans-KYDyN
Apr 7, 2026
Merged

Fix voltage scaling for digital channels in neuropixelsGLX#96
stevevanhooser merged 2 commits intomainfrom
claude/fix-neuropixels-numchans-KYDyN

Conversation

@stevevanhooser
Copy link
Copy Markdown
Contributor

Summary

  • Do not voltage-scale digital channels: DW channels (NIDQ) and sync channels (imec) contain raw bit patterns, not ADC values. The voltage conversion formula was producing nonsensical values (e.g. 1.52e-4 instead of 1 for a set bit). Digital channels now pass through as double(raw) with no gain/range scaling.
  • Both NIDQ (build_nidq_gains) and imec (imroTbl) code paths now track which channels are digital and skip voltage scaling for those columns.

Test plan

  • Existing TestNeuropixelsGLX tests pass
  • testDigitalChannelNotVoltageScaled — verifies DW channel returns double(raw) unchanged
  • testMixedAnalogDigitalScaling — verifies analog columns are voltage-scaled while digital columns are not
  • testReadNidqScaledMatchesManual — verifies end-to-end scaled read matches manual samples2volts

https://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1

Digital word channels (DW in NIDQ, sync in imec) contain raw bit patterns,
not ADC values. Applying the voltage conversion formula produced nonsensical
values (e.g. 1.52e-4 instead of 1 for a set bit). Now digital channels pass
through as double(raw) with no gain/range scaling applied.

https://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Test Results

123 tests  +2   123 ✅ +2   5s ⏱️ ±0s
 14 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit b3e4e84. ± Comparison against base commit 61de157.

@stevevanhooser stevevanhooser merged commit 38219df into main Apr 7, 2026
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.

2 participants