You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Construct an ONIX [hardware configuration chain](xref:onix-configuration):
79
+
Construct an ONIX [hardware configuration chain](xref:onix-configuration):
65
80
66
-
::: workflow
67
-

81
+
::: workflow
82
+

68
83
:::
69
84
70
-
1. Place the [configuration operators](xref:configure) that correspond to the hardware you intend to
71
-
use between <xref:OpenEphys.Onix1.CreateContext> and <xref:OpenEphys.Onix1.StartAcquisition>. In
72
-
this example, these are <xref:OpenEphys.Onix1.ConfigureNeuropixelsV1eHeadstage> and
85
+
1. Place the [configuration operators](xref:configure) that correspond to the
86
+
hardware you intend to use between <xref:OpenEphys.Onix1.CreateContext> and
87
+
<xref:OpenEphys.Onix1.StartAcquisition>. In this example, these are
88
+
<xref:OpenEphys.Onix1.ConfigureNeuropixelsV1eHeadstage> and
73
89
<xref:OpenEphys.Onix1.ConfigureBreakoutBoard>.
74
-
1. Confirm that the device that streams electrophysiology data is enabled. In this example, we will
75
-
stream data from the NeuropixelsV1e device which can be found in the properties panel by
76
-
clicking the NeuropixelsV1eHeadstage node.
77
-
1. In the case of NeuropixelsV1e Headstage, you must provide gain and calibration files and can
78
-
perform other configurations as explained in the [NeuropixelsV1e Headstage
79
-
Configuration](xref:np1e_configuration) and [NeuropixelsV1e GUI](xref:np1e_configuration) pages.
80
-
In this example, we used an AP Gain value of 1000 and LFP Gain value of 50.
90
+
1. Confirm that the device that streams electrophysiology data is enabled. In
91
+
this example, we will stream data from the NeuropixelsV1e device which can
92
+
be found in the properties panel by clicking the NeuropixelsV1eHeadstage
93
+
node.
94
+
1. In the case of NeuropixelsV1e Headstage, you must provide gain and
95
+
calibration files and can perform other configurations as explained in the
96
+
[NeuropixelsV1e Headstage Configuration](xref:np1e_configuration) and
97
+
[NeuropixelsV1e GUI](xref:np1e_configuration) pages. In this example, we
98
+
used an AP Gain value of 1000 and LFP Gain value of 50.
81
99
82
100
### Stream Ephys Data
83
101
84
-
Place the relevant [data I/O operators](xref:dataio) to stream electrophysiology data from your
85
-
headstage:
102
+
Place the relevant [data I/O operators](xref:dataio) to stream electrophysiology
103
+
data from your headstage:
86
104
87
-
::: workflow
105
+
::: workflow
88
106

89
107
:::
90
108
91
-
1. Place the <xref:OpenEphys.Onix1.NeuropixelsV1eData> node into the workflow, since the device on
92
-
NeuropixelsV1e Headstage that streams electrophysiology data is the Neuropixels 1.0 probe.
93
-
1. Select the relevant members from the data frames that `NeuropixelsV1eData` produces. In this
94
-
example, the relevant members are "SpikeData" and "LfpData". To do this, right-click
95
-
`NeuropixelsV1eData`, hover over the output option in the context menu, and select "SpikeData"
96
-
from the list. Repeat for "LfpData".
109
+
1. Place the <xref:OpenEphys.Onix1.NeuropixelsV1eData> node into the workflow,
110
+
since the device on NeuropixelsV1e Headstage that streams electrophysiology
111
+
data is the Neuropixels 1.0 probe.
112
+
1. Select the relevant members from the data frames that `NeuropixelsV1eData`
113
+
produces. In this example, the relevant members are "SpikeData" and
114
+
"LfpData". To do this, right-click `NeuropixelsV1eData`, hover over the
115
+
output option in the context menu, and select "SpikeData" from the list.
116
+
Repeat for "LfpData".
97
117
98
-
Visualize the raw data to confirm that the ephys data operator is streaming data.
118
+
Visualize the raw data to confirm that the ephys data operator is streaming
119
+
data.
99
120
100
121
### Transmit Data to Socket
101
122
102
-
Connect a `SendMatOverSocket` operator to each of the electrophysiology data streams. This operator
103
-
comes from the OpenEphys.Sockets Bonsai package.
123
+
Connect a `SendMatOverSocket` operator to each of the electrophysiology data
124
+
streams. This operator comes from the OpenEphys.Sockets Bonsai package.
104
125
105
-
::: workflow
106
-

126
+
::: workflow
127
+

107
128
:::
108
129
109
-
Configure the "Connection" property of each `SendMatOverSocket` operator to each of the TCP Socket names
110
-
configured earlier. In this example, we used "SpikeSocket" for "SpikeData" and "LfpSocket" for "LfPData".
130
+
Configure the "Connection" property of each `SendMatOverSocket` operator to each
131
+
of the TCP Socket names configured earlier. In this example, we used
132
+
"SpikeServer" for "SpikeData" and "LfpServer" for "LfPData".
111
133
112
134
> [!TIP]
113
-
> Although the Open Ephys GUI has recording functionality, data acquired using the Bonsai.Onix1
114
-
> package should be written to file in Bonsai. You can learn to do this by following the [Hardware
115
-
> Guides](xref:hardware) for your particular hardware. For this example, if you are using the
116
-
> NeuropixelsV1e Headstage like the example, follow the [NeuropixelsV1e Headstage Hardware
135
+
> Although the Open Ephys GUI has recording functionality, data acquired using
136
+
> the Bonsai.Onix1 package should be written to disk in Bonsai because it is
137
+
> possible for data to be lost if e.g. the TCP Buffer overflows. You can learn
138
+
> to do this by following the [Hardware Guides](xref:hardware) for your
139
+
> particular hardware. For this example, if you are using the NeuropixelsV1e
140
+
> Headstage like the example, follow the [NeuropixelsV1e Headstage Hardware
117
141
> Guide](xref:np1e).
118
142
119
143
## Receive ONIX Data from Socket in Open Ephys GUI
@@ -134,19 +158,26 @@ get familiarized with the Open Ephys GUI. In particular:
134
158
135
159
### Configure processors to visualize spike data
136
160
137
-
Drag the source processor `Ephys Socket` from the Processor list and drop it onto the Signal Chain
138
-
area, followed by the sink processor `Probe Viewer`.
161
+
Drag the source processor `Ephys Socket` from the Processor list and drop it
162
+
onto the Signal Chain area, followed by the sink processor `Probe Viewer`.
163
+
164
+
Ephys data in the Open Ephys GUI is represented using floating point values in units
165
+
of microvolts. Data coming from Bonsai will need to be converted to microvolts in
166
+
order to plot properly within the GUI. To do this, the `Ephys Socket` processor
167
+
provides the "Scale" and "Offset" values.:
139
168
140
-
Configure the Scale and Offset properties of the `Ephys Socket` processor:
169
+
$Output\, (uV)= Scale * (Input - Offset)$
141
170
142
-
- Edit its "Scale" property to multiply the signal by a scalar in order to get microvolt values.
143
-
This scalar is determined by the gain of the amplifier and resolution the ADC contained in the
144
-
amplifier device. In this example, we "Scale" by 1.171875 because the NeuropixelsV1e device on
145
-
NeuropixelsV1e headstage has a step size of 1.2e6/1024/_gain_ μV/bit and the AP Gain was
171
+
In this tutorial we used the following values:
172
+
173
+
-**Scale**: 1.171875.The NeuropixelsV1e device on NeuropixelsV1e
174
+
headstage has a step size of 1.2e6/1024/_gain_ μV/bit and the AP Gain was
146
175
configured at 1000.
147
-
- Edit its "Offset" property to subtract 2^bit depth - 1^ from the signal. In this example, we
148
-
"Offset" 512 because the NeuropixelsV1e device outputs unsigned 10-bit data.
149
-
- Press the "Connect" button on the `Ephys Socket`.
176
+
-**Offset**: 512. The NeuropixelsV1e device outputs offset-binary
177
+
encoded signed 10-bit data, so 512 corresponds to 0 volts.
178
+
179
+
After configuring `Ephys Socket` processor, press the "Connect" button to
180
+
establish a connection with the `LfpServer` running in Bonsai.
150
181
151
182

0 commit comments