Skip to content

Commit

Permalink
Headstage-64 Content and Various Minor Edits (#86)
Browse files Browse the repository at this point in the history
* Update Admonitions
- No more red admonitions
- Only four admonitions: NOTE, TIP, IMPORTANT, WARNING

* Fix PortStatus Note

* Headstage Content and Various Minor Changes
- Requires ts4231, estim, & ostim pages and loading python script
  • Loading branch information
cjsha authored Oct 3, 2024
1 parent 60e6d68 commit 2e74b86
Show file tree
Hide file tree
Showing 40 changed files with 951 additions and 82 deletions.
2 changes: 1 addition & 1 deletion api/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ uid: configure
title: Configuration Operators
---

Configuration operators belong in a top-level chain of operators between [core operators](xref:core) ([`CreateContext`](xref:OpenEphys.Onix1.CreateContext) and [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition)) to configure ONIX hardware.
Device configuration operators belong in a top-level chain of operators between [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) and [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) to configure devices contained by ONIX hardware hubs.
6 changes: 3 additions & 3 deletions api/device-configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ uid: device-configure
title: Device Configuration Operators
---

> [!CAUTION]
> Device configuration operators are not recommended for using off-the-shelf Open Ephys hardware. Use [aggregate configuration operators](xref:configure) instead. [Aggregate configuration operators](xref:configure) confer the following benefits:
> [!IMPORTANT]
> Device configuration operators are not recommended for using off-the-shelf Open Ephys hardware. Use aggregate [configuration operators](xref:configure) instead. Aggregate [configuration operators](xref:configure) confer the following benefits:
> - The `address` and `name` properties of aggregate configuration operators undergo automatic configuration which reduces the risk of erroneous configuration.
> - The workflow is less cluttered with configuration operators as one aggregate configuration operator corresponds to multiple device operators. This improves workflow legibility and expedites the workflow scripting process.
Device configuration operators belong in a top-level chain of operators between [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) and [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) to configure devices contained by ONIX hardware.
Device configuration operators belong in a top-level chain of operators between [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) and [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) to configure devices contained by ONIX hardware hubs.
6 changes: 4 additions & 2 deletions articles/hardware/breakout/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ videoCaption:
workflowLocation: workflow
---

## Configuring the breakout board
## Configuring the Breakout Board
The `ConfigureBreakoutBoard` operator groups the properties
for all the devices that the breakout board supports. Each device in the
property pane can be expanded to expose individual properties that govern their
Expand Down Expand Up @@ -44,4 +44,6 @@ breakout board example workflow:

- The `BreakoutBoard`'s `AnalogIO Direction0` property is set to `Output`.
- The `BreakoutBoard`'s `MemoryMonitor Enable` property is set to `True`.
- The `BreakoutBoard`'s `OutputClock Gate` property is set to `True`.
- The `BreakoutBoard`'s `OutputClock Gate` property is set to `True`.

[!INCLUDE [timestamp-info](../../../includes/configuration-timestamp.md)]
1 change: 0 additions & 1 deletion articles/hardware/breakout/memory-monitor.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
uid: breakout_memory-monitor
title: Breakout Board Memory Monitor
hardware: true
device: memory monitor
---

Expand Down
8 changes: 8 additions & 0 deletions articles/hardware/hs64/bno055.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
uid: hs64_bno055
title: Headstage 64 Bno055
hardware: Headstage 64
bno055: true
bnoOperator: Bno055Data
hardwareOperator: Headstage 64
---
19 changes: 19 additions & 0 deletions articles/hardware/hs64/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
uid: hs64_configuration
title: Headstage64 Configuration
hardware: Headstage64
configuration: true
operator: ConfigureHeadstage64
dataRate: 4.1
timeUntilFullBuffer: 500 μs
blockReadSize: 2048
workflowLocation: workflow
---

## Configuring the Breakout Board and Headstage64

The `ConfigureBreakoutBoard` operator configures the Onix Breakout Board. In the Headstage64 example tutorial, it is configured to enable digital inputs to serve as a trigger for the Headstage64's electrical and optical stimulation and to enable monitoring of the percentage of memory occupied. This is accomplished by leaving all of the `ConfigureBreakoutBoard` properties set to their default values except its `Memory Monitor` `Enable` property is set to `True`.

The `ConfigureHeadstage64` operator is used to configure the Headstage64. In the Headstage64 example tutorial, it is configured to enable streaming of electrophysiology data from a Rhd2164 amplifier, orientation data from the on-board Bno055 IMU, and position data from the Ts4231. This is accomplished in the Headstage64 example workflow by leaving all of the `ConfigureHeadstage64` properties set to their default values.

[!INCLUDE [timestamp-info](../../../includes/configuration-timestamp.md)]
10 changes: 10 additions & 0 deletions articles/hardware/hs64/estim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
uid: hs64_estim
title: Headstage 64 Electrical Stimulation
---

The following excerpt from the Headstage64 [example workflow](xref:hs64_hs64) demonstrates electrical stimulation.

::: workflow
![/workflows/hardware/hs64/estim.bonsai workflow](../../../workflows/hardware/hs64/estim.bonsai)
:::
29 changes: 29 additions & 0 deletions articles/hardware/hs64/memory-monitor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
uid: hs64_memory-monitor
title: Headstage64 Memory Monitor
---

The following excerpt from the Breakout Board [example workflow](xref:breakout_workflow) demonstrates memory monitor functionality and saves memory monitor data.

::: workflow
![/workflows/hardware/breakout/memory-monitor.bonsai workflow](../../../workflows/hardware/breakout/memory-monitor.bonsai)
:::

The <xref:OpenEphys.Onix1.MemoryMonitorData> operator generates a sequence of <xref:OpenEphys.Onix1.MemoryMonitorDataFrame>s. `MemoryMonitorData` emits `MemoryMonitorDataFrame`s at a regular interval defined during <xref:breakout_configuration> using the <xref:OpenEphys.Onix1.ConfigureBreakoutBoard>'s `MemoryMonitor SamplesPerSecond` property (in our case 10 Hz). In the Breakout Board example workflow, the `MemoryMonitorData`'s `DeviceName` property is set to "BreakoutBoard/MemoryMonitor". This links the `MemoryMonitorData` operator to the corresponding configuration operator. The [CsvWriter](https://bonsai-rx.org/docs/api/Bonsai.IO.CsvWriter.html) operator saves the `Clock`, `BytesUsed`, and `PercentUsed` members to a file with the following format: `memory-use_<timestamp>.csv`. Because `CsvWriter` is a _sink_ operator, its output sequence is equivalent to its input sequence. In other words, its output is equivalent to `MemoryMonitorData`'s output. Therefore, it's possible to use a [MemberSelector](https://bonsai-rx.org/docs/api/Bonsai.Expressions.MemberSelectorBuilder.html) operator on the `CsvWriter` to select members from the `MemoryMonitorDataFrame`. The `MemberSelector` operator selects the `PercentUsed` member from the `MemoryMonitorDataFrame` so the user can visualize `PercentUsed` data from the `MemoryMonitorDataFrame`.

> [!NOTE]
> The `MemoryMonitorDataFrame` operator generates a
> data stream that is most useful in the context of closed-loop performance. It tells the user if data
> is being consumed rapidly enough by the host PC to keep up with data production by the hardware. The
> hardware FIFO is a buffer that is required to deal with the fact that computers with normal
> operating systems cannot perform operations with strict regularity. When there are hiccups in
> acquisition, the hardware FIFO picks up the slack, but should then be cleared immediately. To get
> the lowest latencies, the `BlockReadSize` should be as small as possible *while the memory use
> percentage remains around 0%*.
> [!WARNING]
> If the hardware FIFO's `PercentUsed` is non-zero for long time periods, or is increasing, the
> `StartAcquisition`'s `BlockReadSize` setting is too small (see the [breakout board configuration](xref:breakout_configuration)). A small
> `BlockReadSize` will mean that the host computer does not have to wait long for enough data to
> become available to propagate it forward, but will reduce overall bandwidth by increasing the
> frequency at which the host computer checks if data is available and performs hardware reads.
11 changes: 11 additions & 0 deletions articles/hardware/hs64/ostim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
uid: hs64_ostim
title: Headstage 64 Optical Stimulation
---

The following excerpt from the Headstage64 [example workflow](xref:hs64_hs64) demonstrates optical stimulation.

::: workflow
![/workflows/hardware/hs64/ostim.bonsai workflow](../../../workflows/hardware/hs64/ostim.bonsai)
:::

29 changes: 29 additions & 0 deletions articles/hardware/hs64/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
uid: hs64_hs64
title: Headstage 64
---

These are the devices available on the Headstage64:

- [Rhd2164](xref:hs64_rhd2164):
- 64 electrophysiology channels for passive probes (e.g. tetrode, silicon probe, etc.) sampled at 30 kHz with 16 bit depth
- Adjustable analog band-pass filter:
- Lower cutoff configurable from 0.1 Hz to 500 Hz
- Upper cutoff configurable from 100 Hz to 20 kHz
- Optional adjustable digital high-pass filter with cutoff configurable from 0.146 Hz to 3309 Hz
- Three auxiliary ADC channels sampled at 30 kHz with 16 bit depth
- [Bno055](xref:hs64_bno055): 9-axis IMU for real-time, 3D orientation tracking sampled up to ~100 Hz for easy automated commutation with Open Ephys commutators
- [Ts4231](xref:hs64_ts4231): For compatibility with HTC Vive Lighthouses for real-time, 3D position tracking
- [Electrical Stimulation](xref:hs64_estim): Single current source with ±15V compliance voltage and automatic electrode discharge
- The stimulation waveform is highly configurable via the <xref:OpenEphys.Onix1.Headstage64ElectricalStimulatorTrigger>'s properties.
- [Optical Stimulation](xref:hs64_ostim): Two current sources with 800mA upper limit
- The stimulation waveform is highly configurable via the <xref:OpenEphys.Onix1.Headstage64OpticalStimulatorTrigger>'s properties.

> [!TIP]
> For a detailed explanation of the Rhd2164 amplifier's properties, read the [datasheet](https://intantech.com/files/Intan_RHD2164_datasheet.pdf).
> [!TIP]
> Visit the [Headstage64 Hardware Guide](https://open-ephys.github.io/onix-docs/Hardware%20Guide/Headstages/headstage-64/index.html) to learn more about the hardware such as weight, dimensions, and proper power voltages.
The following pages in the Headstage64 Guide provide an example workflow and a
breakdown of its components.
9 changes: 9 additions & 0 deletions articles/hardware/hs64/port-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
uid: hs64_port-status
title: Headstage 64 Port Status
hardware: Headstage 64
portStatus: true
configureHardwareOperator: ConfigureHeadstage64
hardwareOperator: Headstage64
---

16 changes: 16 additions & 0 deletions articles/hardware/hs64/rhd2164.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
uid: hs64_rhd2164
title: Headstage64 Rhd2164
---

The following excerpt from the Headstage64 [example workflow](xref:hs64_hs64) demonstrates the Rhd2164 functionality by streaming and saving data from the Rhd2164 device.

::: workflow
![/workflows/hardware/hs64/rhd2164.bonsai workflow](../../../workflows/hardware/hs64/rhd2164.bonsai)
:::

The <xref:OpenEphys.Onix1.Rhd2164Data> operator generates a sequence of <xref:OpenEphys.Onix1.Rhd2164DataFrame>s using the following settings:
- `BufferSize` is set to 30. Each `Rhd2164DataFrame` will contain a [1 x 30 sample] `Clock` vector, a [64 channel x 30 sample] `AmplifierData` matrix, and a [3 channel x 30 sample] `AuxData` matrix. This corresponds to 1.2 ms of data per data frame.
- The `Headstage64Data`'s `DeviceName` property is set to "Headstage64/Rhd2164". This links the `Rhd2164Data` operator to the corresponding configuration operator.

The relevant properties are extracted from the `Rhd2164DataFrame` by right-clicking the `Rhd2164Data` operator, and choosing the following **Output** members: `Clock`, `AmplifierData`, and `AuxData`. The [`MatrixWriter`](https://bonsai-rx.org/docs/api/Bonsai.Dsp.MatrixWriter.html) operators saves the selected members to files with the following format: `rhd2164-clock_<timestamp>.raw`, `rhd2164-amplifier_<timestamp>.raw`, and `rhd2164-aux_<timestamp>.raw`, respectively.
12 changes: 12 additions & 0 deletions articles/hardware/hs64/ts4231.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
uid: hs64_ts4231
title: Headstage64 Position Data
---

The following excerpt from the Headstage64 [example workflow](xref:hs64_hs64) demonstrates electrical stimulation.

::: workflow
![/workflows/hardware/hs64/ts4231.bonsai workflow](../../../workflows/hardware/hs64/ts4231.bonsai)
:::

The <xref:OpenEphys.Onix1.TS4231V1PositionData> operator generates a sequence of <xref:OpenEphys.Onix1.TS4231V1PositionDataFrame>s.
17 changes: 17 additions & 0 deletions articles/hardware/hs64/workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
uid: hs64_workflow
title: Headstage64 Example Workflow
---

The example workflow below can by copy/pasted into the Bonsai editor using the clipboard icon in the top right. This workflow:
- Captures electrophysiology data from passive probes via the RHD2164 amplifier and saves it to disk.
- Captures orientation data from the Bno055 IMU and saves it to disk.
- Monitors the Headstage64 port status.
- Automatically commutates the tether if there is a proper commutator connection.
- Applies electrical stimulation triggered by pressing the breakout board's ☾ key.
- Applies optical stimulation triggered by pressing the breakout board's △ key.
- Monitors memory usage data.

::: workflow
![/workflows/hardware/hs64/hs64.bonsai workflow](../../../workflows/hardware/hs64/hs64.bonsai)
:::
2 changes: 1 addition & 1 deletion articles/hardware/np1e/bno055.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
uid: np1e_bno055
title: NeuropixelsV1e Bno055
hardware: NeuropixelsV1e Headstage
device: true
bno055: true
bnoOperator: PolledBno055Data
hardwareOperator: NeuropixelsV1eHeadstage
---
8 changes: 5 additions & 3 deletions articles/hardware/np1e/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
uid: np1e_configuration
title: Neuropixels 1.0 Headstage Configuration
title: NeuropixelsV1e Headstage Configuration
hardware: NeuropixelsV1e Headstage
configuration: true
operator: ConfigureNeuropixelsV1eHeadstage
Expand All @@ -10,7 +10,7 @@ blockReadSize: 4096
workflowLocation: overview
---

## Configuring the NeuropixelsV1e headstage
## Configuring the NeuropixelsV1e Headstage
The `NeuropixelsV1eHeadstage` operator is used to configure the Neuropixels V1e Headstage; this can enable streaming of electrophysiology data from a Neuropixels 1.0 probe and orientation data from a Bno055 IMU. This is accomplished in the example workflow by leaving all of the `NeuropixelsV1eHeadstage` properties set to their default values.

Default values for the headstage are:
Expand All @@ -21,8 +21,10 @@ Default values for the headstage are:
- Enabling the `Spike Filter`
- Setting the `Reference` to *External*

> [!WARNING]
> [!IMPORTANT]
> The workflow will not run unless gain calibration and ADC calibration files are provided. Click the `NeuropixelsV1eHeadstage` operator, expand `NeuropixelsV1e` in the properties pane, then choose the appropriate files by selecting either `GainCalibrationFile` or `AdcCalibrationFile` and clicking the <kbd>...</kbd> button.
> [!TIP]
> For additional details on how to manually configure the headstage, such as enabling specific electrodes for recording, or modify AP / LFP gain, check out the <xref:np1e_gui> page.
[!INCLUDE [timestamp-info](../../../includes/configuration-timestamp.md)]
1 change: 0 additions & 1 deletion articles/hardware/np1e/npv1e.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
uid: np1e_npv1e
title: NeuropixelsV1e
hardware: NeuropixelsV1e Headstage
device: true
---

The following excerpt from the NeuropixelsV1e Headstage [example workflow](xref:np1e_npv1e-headstage) demonstrates NeuropixelsV1e functionality by streaming and saving probe data.
Expand Down
10 changes: 4 additions & 6 deletions articles/hardware/np1e/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,19 @@ These are the devices available on the NeuropixelsV1e Headstage:
- 384 parallel, dual-band (AP, LFP), low-noise recording channels.
- AP band at 0.3-10 kHz, sampled at 30 kHz
- LFP band at 0.5-500 Hz, sampled at 2.5 kHz
- [Bno055](xref:np1e_bno055): 9-axis IMU for real-time, 3D orientation tracking, and easy automated commutation with Open Ephys commutators.
- [Bno055](xref:np1e_bno055): 9-axis IMU for real-time, 3D orientation tracking sampled up to ~100 Hz for easy automated commutation with Open Ephys commutators.

> [!TIP]
> Visit the [NeuropixelsV1e Headstage Hardware Guide](https://open-ephys.github.io/onix-docs/Hardware%20Guide/Headstages/headstage-neuropix-1e.html) to learn more about the hardware such as weight, dimensions, and proper power voltages.
The example workflow below can by copy/pasted into the Bonsai editor using the clipboard icon in the top right. This workflow:
- Captures data from the Bno055 IMU and NeuropixelsV1e probe, saving all data to disk.
- Monitors the the NeuropixelsV1e Headstage port status.
- Captures electrophysiology data from the Neuropixels 1.0 probe and saves it to disk.
- Captures orientation data from the Bno055 IMU and saves it to disk.
- Monitors the NeuropixelsV1e Headstage port status.
- Automatically commutates the tether if there is a proper commutator connection.

::: workflow
![/workflows/hardware/np1e/np1e.bonsai workflow](../../../workflows/hardware/np1e/np1e.bonsai)
:::

The following pages in the Neuropixels V1e Headstage Guide provide a breakdown of the above example workflow.

> [!TIP]
> Visit the <xref:getting-started> pages if you are unfamiliar with Bonsai.
4 changes: 2 additions & 2 deletions articles/hardware/np1e/port-status.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
uid: np1e_port-status
title: Port Status
title: NeuropixelsV1e Headstage Port Status
hardware: NeuropixelsV1e Headstage
device: true
portStatus: true
configureHardwareOperator: ConfigureNeuropixelsV1eHeadstage
hardwareOperator: NeuropixelsV1eHeadstage
---
2 changes: 1 addition & 1 deletion articles/hardware/np2e/bno055.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
uid: np2e_bno055
title: NeuropixelsV2e Bno055
hardware: NeuropixelsV2e Headstage
device: true
bno055: true
bnoOperator: PolledBno055Data
hardwareOperator: NeuropixelsV2eHeadstage
---
4 changes: 3 additions & 1 deletion articles/hardware/np2e/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ Default values for the headstage are:
- This is also known as the **Shank 0 Bank A** `Channel Preset`
- Setting the `Reference` to *External*

> [!WARNING]
> [!IMPORTANT]
> The workflow will not run unless gain correction files are provided. Click the `NeuropixelsV2eHeadstage` operator, expand `NeuropixelsV2e` in the property pane, then choose the appropriate files by selecting either `GainCalibrationFileA` or `GainCalibrationFileB` and clicking the <kbd>...</kbd> button. If only one probe is plugged in, only one file is required.
> [!TIP]
> For additional details on how to manually configure the headstage, such as enabling specific electrodes for recording, or modify AP / LFP gain, check out the <xref:np2e_gui> page.
[!INCLUDE [timestamp-info](../../../includes/configuration-timestamp.md)]
1 change: 0 additions & 1 deletion articles/hardware/np2e/npv2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
uid: np2e_npv2e
title: NeuropixelsV2e
hardware: NeuropixelsV2e Headstage
device: true
---

> [!NOTE]
Expand Down
10 changes: 4 additions & 6 deletions articles/hardware/np2e/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ These are the devices available on the NeuropixelsV2e Headstage:
- 1280 electrodes low-impedance TiN electrodes per shank (5120 total for quad-shank probes).
- 384 parallel, full-band (AP, LFP), low-noise recording channels.
- Bandwidth of 0.3-10 kHz, sampled at 30 kHz
- [Bno055](xref:np2e_bno055): 9-axis IMU for real-time, 3D orientation tracking and easy automated commutation with Open Ephys commutators.
- [Bno055](xref:np2e_bno055): 9-axis IMU for real-time, 3D orientation tracking sampled up to ~100 Hz for easy automated commutation with Open Ephys commutators.

> [!TIP]
> Visit the [NeuropixelsV2e Headstage Hardware Guide](https://open-ephys.github.io/onix-docs/Hardware%20Guide/Headstages/headstage-neuropix-2e.html) to learn more about the hardware such as weight, dimensions, and proper power voltages.
The example workflow below can by copy/pasted into the Bonsai editor using the clipboard icon in the top right. This workflow:
- Captures data from the Bno055 IMU and Neuropixels 2.0 probe(s) and streams it to disk.
- Monitors the the NeuropixelsV2e Headstage port status
- Captures electrophysiology data from the Neuropixels 2.0 probe(s) and saves it to disk.
- Captures orientation data from the Bno055 IMU and saves it to disk.
- Monitors the NeuropixelsV2e Headstage port status
- Automatically commutates the tether if there is a proper commutator connection.

::: workflow
Expand All @@ -28,6 +29,3 @@ The following pages in the NeuropixelsV2e Headstage Guide provide a breakdown of

> [!NOTE]
> The NeuropixelsV2eBeta Headstage example workflow (<a href="~/workflows/hardware/np2ebeta.bonsai" download>download here</a>) is nearly identical to the NeuropixelsV2e Headstage example workflow. Follow the pages in the NeuropixelsV2e Headstage Guide to learn how it works.
> [!TIP]
> Visit the <xref:getting-started> pages if you are unfamiliar with using ONIX hardware in Bonsai.
Loading

0 comments on commit 2e74b86

Please sign in to comment.