Skip to content

Commit 8fef247

Browse files
committed
Neuropixels 2.0 beta probes cannot use ground reference
- Fixed an error where ProbeA metadata was being checked when setting ProbeB configurations
1 parent 325e66c commit 8fef247

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

OpenEphys.Onix1/ConfigureNeuropixelsV2eBeta.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,12 @@ public override IObservable<ContextTask> Process(IObservable<ContextTask> source
200200
// configure probe A streaming
201201
if (probeAMetadata.ProbeSerialNumber != null)
202202
{
203+
if (ProbeConfigurationA.Reference == NeuropixelsV2QuadShankReference.Ground)
204+
{
205+
throw new InvalidOperationException($"Neuropixels 2.0-Beta probes do not provide a Ground reference selection. Please select a different reference" +
206+
$" for {NeuropixelsV2Probe.ProbeA}.");
207+
}
208+
203209
var gainCorrection = NeuropixelsV2Helper.TryParseGainCalibrationFile(GainCalibrationFileA);
204210

205211
if (!gainCorrection.HasValue)
@@ -221,8 +227,14 @@ public override IObservable<ContextTask> Process(IObservable<ContextTask> source
221227
}
222228

223229
// configure probe B streaming
224-
if (probeAMetadata.ProbeSerialNumber != null)
230+
if (probeBMetadata.ProbeSerialNumber != null)
225231
{
232+
if (ProbeConfigurationB.Reference == NeuropixelsV2QuadShankReference.Ground)
233+
{
234+
throw new InvalidOperationException($"Neuropixels 2.0-Beta probes do not provide a Ground reference selection. Please select a different reference" +
235+
$" for {NeuropixelsV2Probe.ProbeB}.");
236+
}
237+
226238
var gainCorrection = NeuropixelsV2Helper.TryParseGainCalibrationFile(GainCalibrationFileB);
227239

228240
if (!gainCorrection.HasValue)

0 commit comments

Comments
 (0)