Skip to content

Commit 1f15122

Browse files
authored
Merge pull request #367 from open-ephys/issue-358
Add voltage conversion equations to Neuropixels DataFrame docs
2 parents bdafa9b + 8a14da4 commit 1f15122

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

OpenEphys.Onix1/NeuropixelsV1DataFrame.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,25 @@ public NeuropixelsV1DataFrame(ulong[] clock, ulong[] hubClock, int[] frameCount,
3737
/// Gets the spike-band data as a <see cref="Mat"/> object.
3838
/// </summary>
3939
/// <remarks>
40-
/// Spike-band data has 384 rows (channels) with columns representing the samples acquired at 30 kHz. Each sample is a
41-
/// 10-bit, offset binary value encoded as a <see cref="ushort"/>.
40+
/// Spike-band data has 384 electrodes (rows) with columns representing the samples acquired at 30 kHz.
41+
/// Each sample is a 10-bit, offset binary value encoded as a <see cref="ushort"/>. To convert to
42+
/// microvolts, the following equation can be used:
43+
/// <code>
44+
/// V_electrode (uV) = 1171.875 uV / AP Gain × (ADC result – 512)
45+
/// </code>
4246
/// </remarks>
4347
public Mat SpikeData { get; }
4448

4549
/// <summary>
4650
/// Gets the LFP band data as a <see cref="Mat"/> object.
4751
/// </summary>
4852
/// <remarks>
49-
/// LFP data has 32 rows (channels) with columns representing the samples acquired at 2.5 kHz. Each sample is a
50-
/// 10-bit, offset binary value encoded as a <see cref="ushort"/>.
53+
/// LFP-band data has 384 electrodes (rows) with columns representing the samples acquired at 2.5 kHz.
54+
/// Each sample is a 10-bit, offset binary value encoded as a <see cref="ushort"/>. To convert to
55+
/// microvolts, the following equation can be used:
56+
/// <code>
57+
/// V_electrode (uV) = 1171.875 uV / LFP Gain × (ADC result – 512)
58+
/// </code>
5159
/// </remarks>
5260
public Mat LfpData { get; }
5361
}

OpenEphys.Onix1/NeuropixelsV2eBetaDataFrame.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ public NeuropixelsV2eBetaDataFrame(ulong[] clock, ulong[] hubClock, Mat amplifie
2525
/// <summary>
2626
/// Gets the amplifier data array.
2727
/// </summary>
28+
/// <remarks>
29+
/// Wide band (0.5 Hz - 10 kHz) electrophysiology data array. Each element is an amplified sample from
30+
/// 384 electrodes (rows) acquired at 30 kHz (columns). Each sample is a 14-bit, offset binary value
31+
/// encoded as a <see cref="ushort"/>. To convert to microvolts, the following equation can be used:
32+
/// <code>
33+
/// V_electrode (µV) = 0.76294 µV/bit × (ADC result – 8192) bits
34+
/// </code>
35+
/// </remarks>
2836
public Mat AmplifierData { get; }
2937

3038
/// <summary>

OpenEphys.Onix1/NeuropixelsV2eDataFrame.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ public NeuropixelsV2eDataFrame(ulong[] clock, ulong[] hubClock, Mat amplifierDat
2323
/// <summary>
2424
/// Gets the amplifier data array.
2525
/// </summary>
26+
/// <remarks>
27+
/// Wide band (0.5 Hz - 10 kHz) electrophysiology data array. Each element is an amplified sample from
28+
/// 384 electrodes (rows) acquired at 30 kHz (columns). Each sample is a 12-bit, offset binary value
29+
/// encoded as a <see cref="ushort"/>. To convert to microvolts, the following equation can be used:
30+
/// <code>
31+
/// V_electrode (µV) = 3.05176 µV/bit × (ADC result – 2048) bits
32+
/// </code>
33+
/// </remarks>
2634
public Mat AmplifierData { get; }
2735

2836
internal static unsafe ushort GetProbeIndex(oni.Frame frame)
@@ -94,7 +102,7 @@ internal static unsafe void CopyAmplifierBuffer(ushort* amplifierData, ushort[,]
94102
{ 225, 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255 }, // Data Index 38, ADC 15
95103
{ 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, 383 }, // Data Index 39, ADC 23
96104

97-
};
105+
};
98106
}
99107

100108
[StructLayout(LayoutKind.Sequential, Pack = 1)]

0 commit comments

Comments
 (0)