Skip to content

Commit 6883d39

Browse files
committed
Remove unsigned integer offset in Neuropixels 2.0 probes
1 parent d5ed1fc commit 6883d39

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Source/Devices/Neuropixels2e.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ void Neuropixels2e::processFrames()
549549
const size_t channelIndex = rawToChannel[j][i];
550550

551551
samples[probeIndex][channelIndex * numFrames + frameCount[probeIndex]] =
552-
(float)(*(amplifierData + adcIndices[j] + adcDataOffset)) * gainCorrection[probeIndex];
552+
(float)(*(amplifierData + adcIndices[j] + adcDataOffset)) * gainCorrection[probeIndex] + DataMidpoint;
553553
}
554554
}
555555

Source/Devices/Neuropixels2e.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ namespace OnixSourcePlugin
9595

9696
static constexpr int NumberOfProbes = 2;
9797

98+
static constexpr uint16_t NumberOfAdcBins = 4096;
99+
static constexpr float DataMidpoint = NumberOfAdcBins / 2;
100+
98101
DataBuffer* amplifierBuffer[NumberOfProbes];
99102

100103
std::array<uint64_t, NumberOfProbes> probeSN;

0 commit comments

Comments
 (0)