-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathNeuropixelsV1DataFrame.cs
62 lines (58 loc) · 2.65 KB
/
NeuropixelsV1DataFrame.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using OpenCV.Net;
namespace OpenEphys.Onix1
{
/// <summary>
/// Buffered data from a NeuropixelsV1 probe.
/// </summary>
public class NeuropixelsV1DataFrame : BufferedDataFrame
{
/// <summary>
/// Initializes a new instance of the <see cref="NeuropixelsV1DataFrame"/> class.
/// </summary>
/// <param name="clock">An array of <see cref="DataFrame.Clock"/> values.</param>
/// <param name="hubClock">An array of hub clock counter values.</param>
/// <param name="frameCount">An array of frame count values.</param>
/// <param name="spikeData">An array of multi-channel spike data as a <see cref="Mat"/> object.</param>
/// <param name="lfpData">An array of multi-channel LFP data as a <see cref="Mat"/> object.</param>
public NeuropixelsV1DataFrame(ulong[] clock, ulong[] hubClock, int[] frameCount, Mat spikeData, Mat lfpData)
: base(clock, hubClock)
{
FrameCount = frameCount;
SpikeData = spikeData;
LfpData = lfpData;
}
/// <summary>
/// Gets the frame count value array.
/// </summary>
/// <remarks>
/// A 20-bit counter on the probe that increments its value for every frame produced.
/// The value ranges from 0 to 1048575 (2^20-1), and should always increment by 1 until it wraps around back to 0.
/// This can be used to detect dropped frames.
/// </remarks>
public int[] FrameCount { get; }
/// <summary>
/// Gets the spike-band data as a <see cref="Mat"/> object.
/// </summary>
/// <remarks>
/// Spike-band data has 384 electrodes (rows) with columns representing the samples acquired at 30 kHz.
/// Each sample is a 10-bit, offset binary value encoded as a <see cref="ushort"/>. To convert to
/// microvolts, the following equation can be used:
/// <code>
/// V_electrode (uV) = 1171.875 uV / AP Gain × (ADC result – 512)
/// </code>
/// </remarks>
public Mat SpikeData { get; }
/// <summary>
/// Gets the LFP band data as a <see cref="Mat"/> object.
/// </summary>
/// <remarks>
/// LFP-band data has 384 electrodes (rows) with columns representing the samples acquired at 2.5 kHz.
/// Each sample is a 10-bit, offset binary value encoded as a <see cref="ushort"/>. To convert to
/// microvolts, the following equation can be used:
/// <code>
/// V_electrode (uV) = 1171.875 uV / LFP Gain × (ADC result – 512)
/// </code>
/// </remarks>
public Mat LfpData { get; }
}
}