Skip to content

Commit

Permalink
Update Neuropixels tutorials pages
Browse files Browse the repository at this point in the history
- Modify to have a consistent voice
- Verified that Bonsai files are accurate for the different pages
  • Loading branch information
bparks13 committed Sep 26, 2024
1 parent dcdef36 commit 6bb1272
Show file tree
Hide file tree
Showing 24 changed files with 181 additions and 164 deletions.
2 changes: 1 addition & 1 deletion articles/getting-started/initialize-oni-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uid: initialize-onicontext
title: Initialize the ONI Context
---

The [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) operator initializes the acquisition context, and it should be the first operator you add to your workflow as it provides access to the hardware device table for all other configuration operators. There are several different ways to find this operator and add it to the deviceDirectory:
The [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) operator initializes the acquisition context, and it should be the first operator you add to your workflow as it provides access to the hardware device table for all other configuration operators. There are several different ways to find this operator and add it to the workflow:

1. From the Bonsai editor, navigate to the toolbox on the left side of the screen and expand the **Source** section. Next, expand the **OpenEphys.Onix1** section, and find the `CreateContext` line. The operator can then be added by either double-clicking it, or dragging and dropping the operator into the workflow.

Expand Down
6 changes: 3 additions & 3 deletions articles/hardware/np1e/bno055.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
uid: np1e_bno055
title: Neuropixels V1e Headstage Bno055
hardware: Neuropixels V1e Headstage
title: NeuropixelsV1e Bno055
hardware: NeuropixelsV1e Headstage
device: true
bno055: true
hardwareOperator: NeuropixelsV1eHeadstage
bno055Operator: NeuropixelsV1eBno055Data
bno055Operator: PolledBno055Data
---
19 changes: 15 additions & 4 deletions articles/hardware/np1e/configuration.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
uid: np1e_configuration
title: Neuropixels 1.0 Headstage Configuration
configuration: true
hardware: NeuropixelsV1e Headstage
configuration: true
operator: ConfigureNeuropixelsV1eHeadstage
dataRate: 20.6
timeUntilFullBuffer: 200 μs
Expand All @@ -11,7 +11,18 @@ workflowLocation: overview
---

## Configuring the NeuropixelsV1e headstage
The `NeuropixelsV1eHeadstage` operator is set to configure the Neuropixels V1e Headstage to enable streaming electrophysiology data from a Neuropixels 1.0 probe and orientation data from a Bno055 IMU. This is accomplished in the Neuropixels V1e Headstage example workflow by leaving all of the `NeuropixelsV1eHeadstage` properties set to their default values.
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:
- Enabling the first 384 electrodes for streaming (electrodes 0 through 383)
- This is also known as the **Bank A** `Channel Preset`
- Setting `AP Gain` to 1000x
- Setting `LFP gain` to 50x
- Enabling the `Spike Filter`
- Setting the `Reference` to *External*

> [!WARNING]
> While the settings are left at the default values, the workflow will not run unless the gain calibration file and ADC calibration file are provided to the `NeuropixelsV1e`. To select these files, click on the `NeuropixelsV1eHeadstage` operator, expand the `NeuropixelsV1e` menu in the property pane on the right, then choose the appropriate file by selecting either `GainCalibrationFile` or `AdcCalibrationFile` and clicking the <kbd>...</kbd> button.
> [!TODO]
> Add content about GUI
> [!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.
19 changes: 0 additions & 19 deletions articles/hardware/np1e/np1.md

This file was deleted.

22 changes: 22 additions & 0 deletions articles/hardware/np1e/npv1e.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
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.

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

The <xref:OpenEphys.Onix1.NeuropixelsV1eData> operator generates a sequence of <xref:OpenEphys.Onix1.NeuropixelsV1eDataFrame>s using the following settings:
- `BufferSize` is set to 36.
- The `NeuropixelsV1eData`'s `DeviceName` property is set to "NeuropixelsV1eHeadstage/NeuropixelsV1e". This links the <xref:OpenEphys.Onix1.NeuropixelsV1eData> operator to the corresponding configuration operator.

Given the settings above, each frame will contain a [1 x 36 sample] `Clock` vector, a [384 channel x
36 sample] `SpikeData` matrix, and a [384 channel x 3 sample] `LfpData` matrix. This corresponds to 1.2 ms of data per data frame.
`LfpData` has less samples than `Clock` and `SpikeData` because `LfpData` is sampled at a lower rate; AP data is sampled at 30 kHz while LFP data is sampled at 2.5 kHz.

The relevant properties are extracted from the <xref:OpenEphys.Onix1.NeuropixelsV1eDataFrame> by right-clicking the <xref:OpenEphys.Onix1.NeuropixelsV1eData> operator, and choosing the following **Output** members: `Clock`, `SpikeData`, and `LfpData`. The [`MatrixWriter`](https://bonsai-rx.org/docs/api/Bonsai.Dsp.MatrixWriter.html) operators saves the selected members to files with the following format: `np1-clock_<timestamp>.raw`, `np1-spike_<timestamp>.raw`, and `np1-lfp_<timestamp>.raw`, respectively.
18 changes: 9 additions & 9 deletions articles/hardware/np1e/overview.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
---
uid: np1e
title: Neuropixels V1e Headstage
uid: np1e_npv1e-headstage
title: NeuropixelsV1e Headstage
---

These are the devices available on the Neuropixels V1e Headstage:
These are the devices available on the NeuropixelsV1e Headstage:

- Supports one [IMEC Neuropixels 1.0 probe](xref:np1e_np1):
- One [NeuropixelsV1e](xref:np1e_npv1e):
- A single 1cm long shank probe with a 70 x 24 µm shank cross-section.
- 960-electrode low-impedance TiN electrodes total.
- 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, and easy automated commutation with Open Ephys commutators.

> [!TIP]
> Visit the [Neuropixels V1e 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.
> 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 Neuropixels 1.0 probe and streams it to disk.
- Monitors the the Neuropixels V1e Headstage port status.
- Captures data from the Bno055 IMU and NeuropixelsV1e probe, saving all data to disk.
- Monitors the 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<!-- and a Python script for loading data-->.
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,7 +1,7 @@
---
uid: np1e_port-status
title: Neuropixels V1e Headstage Port Status
hardware: Neuropixels V1e Headstage
title: Port Status
hardware: NeuropixelsV1e Headstage
device: true
portStatus: true
hardwareOperator: NeuropixelsV1eHeadstage
Expand Down
9 changes: 3 additions & 6 deletions articles/hardware/np2e/bno055.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
---
uid: np2e_bno055
title: Neuropixels V2e Headstage Bno055
hardware: Neuropixels V2e Headstage
title: NeuropixelsV2e Bno055
hardware: NeuropixelsV2e Headstage
device: true
bno055: true
hardwareOperator: NeuropixelsV2eHeadstage
bno055Operator: NeuropixelsV2eBno055Data
bno055Operator: PolledBno055Data
---

> [!NOTE]
> The Neuropixels V2e Beta Headstage functions nearly identically to the Neuropixels V2e Headstage. Simply replace `NeuropixelsV2eBno055Data` with `NeuropixelsV2eBetaBno055Data` and set its `DeviceName` property to "NeuropixelsV2eBetaHeadstage/NeuropixelsV2eBno055Data".
20 changes: 14 additions & 6 deletions articles/hardware/np2e/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
uid: np2e_configuration
title: Neuropixels 2.0 Headstage Configuration
title: NeuropixelsV2e Headstage Configuration
hardware: NeuropixelsV2e Headstage
configuration: true
operator: ConfigureNeuropixelsV2eHeadstage
Expand All @@ -10,11 +10,19 @@ blockReadSize: 4096
workflowLocation: overview
---

> [!NOTE]
> The NeuropixelsV2eBeta Headstage functions nearly identically to the NeuropixelsV2e Headstage. Simply replace `ConfigureNeuropixelsV2eHeadstage` with `ConfigureNeuropixelsV2eBetaHeadstage`.
## Configuring the NeuropixelsV2e headstage
The `NeuropixelsV2eHeadstage` operator is set to configure the Neuropixels V2e Headstage to enable streaming electrophysiology data from a Neuropixels 2.0 probe and orientation data from a Bno055 IMU. This is accomplished in the Neuropixels V2e Headstage example workflow by leaving all of the `NeuropixelsV2eHeadstage` properties set to their default values.
The `NeuropixelsV2eHeadstage` operator is set to configure the NeuropixelsV2e Headstage; this can enable streaming of electrophysiology data from a Neuropixels 2.0 probe and orientation data from a Bno055 IMU. This is accomplished in the NeuropixelsV2e Headstage example workflow by leaving all of the `NeuropixelsV2eHeadstage` properties set to their default values.

> [!TODO]
> Add content about GUI
Default values for the headstage are:
- Enabling the first 384 electrodes of the first shank for streaming (shank 0, electrodes 0 through 383)
- This is also known as the **Shank 0 Bank A** `Channel Preset`
- Setting the `Reference` to *External*

> [!NOTE]
> The Neuropixels V2e Beta Headstage functions nearly identically to the Neuropixels V2e Headstage. Simply replace `ConfigureNeuropixelsV2eHeadstage` with `ConfigureNeuropixelsV2eBetaHeadstage`.
> [!WARNING]
> While the settings are left at the default values, the workflow will not run unless the gain correction files are provided to the `NeuropixelsV2e`. To select these files, click on the `NeuropixelsV2eHeadstage` operator, expand the `NeuropixelsV2e` menu in the property pane on the right, then choose the appropriate file by selecting `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.
26 changes: 0 additions & 26 deletions articles/hardware/np2e/np2.md

This file was deleted.

24 changes: 24 additions & 0 deletions articles/hardware/np2e/npv2e.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
uid: np2e_np2ve
title: NeuropixelsV2e
hardware: NeuropixelsV2e Headstage
device: true
---

> [!NOTE]
> The NeuropixelsV2eBeta Headstage functions nearly identically to the NeuropixelsV2e Headstage. Simply replace `NeuropixelsV2eData` with `NeuropixelsV2eBetaData` and set its `DeviceName` property to "NeuropixelsV2eBetaHeadstage/NeuropixelsV2eBeta".
The following excerpt from the NeuropixelsV2e Headstage [example workflow](xref:np2e) demonstrates Neuropixels 2.0 probe functionality by streaming data and saves Neuropixels 2.0 probe data. The second chain is disabled by default, assuming that only one probe is connected to the headstage. If two probes are connected, the second `NeuropixelsV2eData` chain can be enabled to stream data from both probes simultaneously. To enable, select all nodes in the disabled chain and press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd>, or click `Enable` right-clicking the selected nodes.

::: workflow
![/workflows/hardware/breakout/np2.bonsai workflow](../../../workflows/hardware/np2e/np2.bonsai)
:::

The <xref:OpenEphys.Onix1.NeuropixelsV2eData> operator generates a sequence of <xref:OpenEphys.Onix1.NeuropixelsV2eDataFrame>s. In the NeuropixelsV2e Headstage example workflow,
- `BufferSize` is set to 30. Therefore, each frame will contain a [1 x 30 sample] `Clock` vector and a [384 channel x
30 sample] `AmplifierData` matrix. The Neuropixels 2.0 probe samples at 30 kHz per channel so this
corresponds to 1 ms of data.
- `DeviceName` property is set to "NeuropixelsV2eHeadstage/NeuropixelsV2e". This links the `NeuropixelsV2eData` operator to the corresponding configuration operator.
- `ProbeIndex` property is set to "ProbeA". This links the data generated by this probe to the probe in port A of the headstage.

The relevant properties are extracted from the <xref:OpenEphys.Onix1.NeuropixelsV1eDataFrame> by right-clicking the <xref:OpenEphys.Onix1.NeuropixelsV1eData> operator, and choosing the following **Output** members: `Clock`, and `AmplifierData`. The [`MatrixWriter`](https://bonsai-rx.org/docs/api/Bonsai.Dsp.MatrixWriter.html) operators saves the selected members to files with the following format: `np2-a-clock_<timestamp>.raw` and `np2-a-amp<timestamp>.raw`, respectively.
Loading

0 comments on commit 6bb1272

Please sign in to comment.