Skip to content

Commit

Permalink
Hyphenate URLs & update the "install bonsai" page for Onix1 (#13)
Browse files Browse the repository at this point in the history
Hyphenate URLs & Update installation steps Onix1

- Underscores in file names replaced with hyphens
- Update screenshots and rewrite some steps for installing Bonsai &
  OpenEphys.Onix1 package
- New directory for putting editable screenshots to improve ease of
  maintaining edited screenshots used for docs
- Rename workflows to avoid broken references
  • Loading branch information
cjsha committed Aug 9, 2024
1 parent c2e0bd4 commit 4001458
Show file tree
Hide file tree
Showing 39 changed files with 190 additions and 134 deletions.
2 changes: 1 addition & 1 deletion apidoc/OpenEphys.Onix.ConfigureBreakoutBoard.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
uid: OpenEphys.Onix1.ConfigureBreakoutBoard
---

[!INCLUDE [Hub Template](hub_template.md)]
[!INCLUDE [Hub Template](hub-template.md)]
2 changes: 1 addition & 1 deletion apidoc/OpenEphys.Onix.ConfigureHeadstage64.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
uid: OpenEphys.Onix1.ConfigureHeadstage64
---

[!INCLUDE [Hub Template](hub_template.md)]
[!INCLUDE [Hub Template](hub-template.md)]
2 changes: 1 addition & 1 deletion apidoc/OpenEphys.Onix.ConfigureNeuropixelsV1eHeadstage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
uid: OpenEphys.Onix1.ConfigureNeuropixelsV1eHeadstage
---

[!INCLUDE [Hub Template](hub_template.md)]
[!INCLUDE [Hub Template](hub-template.md)]
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
uid: OpenEphys.Onix1.ConfigureNeuropixelsV2eBetaHeadstage
---

[!INCLUDE [Hub Template](hub_template.md)]
[!INCLUDE [Hub Template](hub-template.md)]
2 changes: 1 addition & 1 deletion apidoc/OpenEphys.Onix.ConfigureNeuropixelsV2eHeadstage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
uid: OpenEphys.Onix1.ConfigureNeuropixelsV2eHeadstage
---

[!INCLUDE [Hub Template](hub_template.md)]
[!INCLUDE [Hub Template](hub-template.md)]
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
uid: device-bno055_neuropixelsv1e
uid: device-bno055-neuropixelsv1e
title: NeuropixelsV1eBno055
isGuide: true
isDevice: true
device: BNO055
headstage: NeuropixelsV1e
workflow: true
workflow_file: ~/workflows/devices/Bno055_NeuropixelsV1e.bonsai
workflow_file: ~/workflows/devices/Bno055-Neuropixelsv1e.bonsai
visualize: true
visualize_timeseries: true
---
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
uid: device-bno055_neuropixelsv2e
uid: device-bno055-neuropixelsv2e
title: NeuropixelsV2eBno055
isGuide: true
isDevice: true
device: BNO055
headstage: NeuropixelsV2e
workflow: true
workflow_file: ~/workflows/devices/Bno055_NeuropixelsV2e.bonsai
workflow_file: ~/workflows/devices/Bno055-Neuropixelsv2e.bonsai
visualize: true
visualize_timeseries: true
---
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ To begin, the first thing to do is to open up the Bonsai editor. This can be don

![Open a new file in Bonsai](../../images/bonsai-splash-page-new-file.png){width=650px}

From the editor, nodes can be selected on the left side and placed into the workspace. Before going into details on how to place nodes, we will instead go over the different types of nodes, some examples of ONIX-specific nodes in each category, and some common categories of properties that can be modified across nodes.
From the editor, operators can be selected on the left side and placed into the workspace. Before going into details on how to place operators, we will instead go over the different types of operators, some examples of ONIX-specific operators in each category, and some common categories of properties that can be modified across operators.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uid: GettingStarted
title: Getting Started
---

Welcome to the user guide! The next few pages are dedicated to users who are unfamiliar with ONIX and Bonsai, and will teach them what ONIX is, how to download and install Bonsai, open a new file, place nodes (and understand what a node is), reorder a workflow, run a workflow, and finally visualize data.
Welcome to the user guide! The next few pages are dedicated to users who are unfamiliar with ONIX and Bonsai, and will teach them what ONIX is, how to download and install Bonsai, open a new file, place operators (and understand what an operator is), reorder a workflow, run a workflow, and finally visualize data.

For those who are already familiar with Bonsai and are looking for a particular device or headstage to learn more about the hardware and how to utilize it, the table of contents on the left contains entries for each available device and headstage. Choose a page to learn more about the hardware and view a fully complete workflow that can be copied directly into Bonsai to aid in quickly setting up and collecting data from a system.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ uid: InitializeOniContext
title: Initialize the ONI Context
---

The [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) operator initializes the acquisition context, and it should be the first node 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 node and add it to the workflow:
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 node can then be added by either double-clicking it, or dragging and dropping the node into 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.

![Search for CreateContext node manually](../../images/bonsai-editor-place-create-context-manually.png){width=700px}
![Search for CreateContext operator manually](../../images/bonsai-editor-place-create-context-manually.png){width=700px}

2. Click on the textbox at the top of the toolbox on the left, or from Ctrl + E to focus on the textbox, and type `CreateContext` to search for the node. Same as (1), the node can be placed by double-clicking or dragging and dropping; additionally, if the `CreateContext` string is highlighted Enter can be pressed to place the node immediately.
2. Click on the textbox at the top of the toolbox on the left, or from Ctrl + E to focus on the textbox, and type `CreateContext` to search for the operator. Same as (1), the operator can be placed by double-clicking or dragging and dropping; additionally, if the `CreateContext` string is highlighted Enter can be pressed to place the operator immediately.

![Search for CreateContext node from textbox](../../images/bonsai-editor-place-create-context-search.png){width=700px}
![Search for CreateContext operator from textbox](../../images/bonsai-editor-place-create-context-search.png){width=700px}

3. Hover over the image of the [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) workflow below, and click on the clipboard icon in the top-right corner of the workflow image to copy the workflow to the clipboard. Navigate back to Bonsai, and paste the copied workflow into the active editor. Pasting can be done via Ctrl + V, or right-clicking in the editor and choosing **Paste**.

## CreateContext Workflow

This is a nominally functional workflow that provides access to the ONI context, from which all nodes can then be linked to and configured, while also demonstrating how a Breakout Board can be configured before finishing the configuration chain by placing a [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) node:
This is a nominally functional workflow that provides access to the ONI context, from which all operators can then be linked to and configured, while also demonstrating how a Breakout Board can be configured before finishing the configuration chain by placing a [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) operator:

:::workflow
![CreateContext](../../workflows/operators/ConfigureBreakoutBoard.bonsai)
Expand Down
84 changes: 84 additions & 0 deletions articles/getting-started/install-configure-bonsai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
uid: BonsaiInstallationAndConfiguration
title: Bonsai Installation and Configuration
---

## Install Bonsai

To download Bonsai, select between the portable download and the installer download [here](https://bonsai-rx.org/docs/articles/installation.html).

* The **Portable** download installs a sandboxed version of Bonsai. Portable environments enable users to switch between different environments to prevent package conflicts or confusion between similar packages.

* To install from the **Portable** download, extract the downloaded file. You can start the portable Bonsai by running the `Bonsai.exe` that is inside the extracted folder.

* The **Installer** download installs Bonsai and all its dependencies globally.

* To install from the **Installer** download, run the downloaded `Bonsai-X.X.X.exe` file and agree to the involved licenses. You can start the globally installed Bonsai by launching it from the `Bonsai Setup` window after installing or searching for it in your OS's search function, for example. You can create a shortcut such that the portable Bonsai environment is easy and name it such that it is easy to differentiate between different environments.

To use Bonsai for interfacing with Open Ephys hardware in a meaningful way, additional packages are required.

## Open Bonsai Package Manager

The Bonsai package manager can be accessed from Bonsai's landing window or its workflow editor:

![Package manager from splash page](../../images/bonsai-splash-page-package-manager-highlight.png){width=350px} or ![Package manager from editor](../../images/bonsai-editor-package-manager-highlight.png){width=425px}

## Install Packages in Bonsai

The two required packages to run the workflows in this documentation are:

* `Bonsai.StarterPack`

* `OpenEphys.Onix1`

Additional packages may be required if you wish to use Bonsai in ways that extend beyond the scope of this documentation.

### Bonsai.StarterPack

Install the `Bonsai.StarterPack` package. [Open the package manager](#open-bonsai-package-manager) and:

1. Click the `Browse` tab.

1. Set `Package source` to `Bonsai Packages`.

1. Search for `Bonsai.StarterPack`.

1. Click `Install`.

![Bonsai Bonsai.StarterPack Install Screenshot](../../images/bonsai-install-Bonsai.StarterPack.webp){width=650px}

### OpenEphys.Onix1

Install the `OpenEphys.Onix1` package. [Open the package manager](#open-bonsai-package-manager) and:

1. Click the `Browse` tab.

1. Set `Package source` to `All` or `NuGet`.

1. Search `OpenEphys.Onix1`.

1. Click `Install`.

1. Click `I Accept` when the license agreement window appears.

![Bonsai OpenEphys.Onix1 Install Screenshot](../../images/bonsai-install-OpenEphys.Onix1.webp){width=650px}

## Update Packages in Bonsai

It is good practice to periodically check for package updates. [Open the package manager](#open-bonsai-package-manager) and:

1. Click the `Update` tab.

1. Set `Package source` to `All`.

1. Leave the search bar blank if you want to check for updates for all packages.\
Alternatively, if you want to check for an update for a particular package, you may type that package's name in the search bar to expedite the update retrieval process.

1. Click `Update All` if you want to perform all available updates.\
Alternatively, click on a package and click `Update` if you want to perform a subset of the available updates.

![Bonsai Update All or Just One Screenshot](../../images/bonsai-update.webp){width=650px}

## Next Steps

Now that Bonsai has been installed and configured, it is time to start placing operators and configuring those. If you are new to Bonsai, the following sections give a high-level understanding of how Bonsai is organized, and some of the ONIX-specific concepts that will be useful for learning how to work with the operators.
28 changes: 0 additions & 28 deletions articles/getting-started/install_and_download.md

This file was deleted.

10 changes: 10 additions & 0 deletions articles/getting-started/next-steps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
uid: NextSteps
title: Next Steps
---

Continue browsing <xref:GettingStarted> and check out specific operators on the left to see how to configure each operator, as well as some ways to visualize data. Each page will have a fully functional workflow that can be copied into Bonsai to provide an easy starting point for generating data.

For more technical information on each operator, head to the <xref:OpenEphys.Onix1> to see a more developer-focused view of each operator.

More complex and in-depth tutorials for placing multiple operators and moving towards generating data in an experimental setting can be found in the <xref:TutorialsLandingPage>.
10 changes: 0 additions & 10 deletions articles/getting-started/next_steps.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
uid: NodeTypes
title: Node Types
uid: OperatorTypes
title: Operator Types
---

In Bonsai, all objects are called "nodes", and have a specific function associated with them depending on what they do; this can be `Source`, `Sink`, `Combinator`, `Transform`, or `Condition`. For ONIX nodes, they are all classified as either `Source`, `Sink`, or `Combinator`.
In Bonsai, all objects are called "operators", and have a specific function associated with them depending on what they do; this can be `Source`, `Sink`, `Combinator`, `Transform`, or `Condition`. For ONIX operators, they are all classified as either `Source`, `Sink`, or `Combinator`.

| Node Type | Description | Example ONIX nodes |
| Operator Type | Description | Example ONIX operators |
| --------- | ----------- | ------------------ |
| Source | Generate event streams from devices or files | [`CreateContext`](xref:OpenEphys.Onix1.CreateContext), [`Bno055Data`](xref:OpenEphys.Onix1.Bno055Data), [`NeuropixelsV1eData`](xref:OpenEphys.Onix1.NeuropixelsV1eData) |
| Sink | Save data or trigger external outputs | [`ConfigureHeadstage64`](xref:OpenEphys.Onix1.ConfigureHeadstage64), [`ConfigureNeuropixelsV1eHeadstage`](xref:OpenEphys.Onix1.ConfigureNeuropixelsV1eHeadstage) |
| Combinator | Manage control flow or synchronize parallel inputs | [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) |

Nodes are placed in the Bonsai editor and can be saved into a "workflow", which is a grouping of nodes and saved settings. This workflow can then be run to perform some task, depending on what nodes are placed.
Operators are placed in the Bonsai editor and can be saved into a "workflow", which is a grouping of operators and saved settings. This workflow can then be run to perform some task, depending on what operators are placed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uid: PropertyCategories
title: Property Categories
---

There are specific categories of properties that define when a node's properties can be modified.
There are specific categories of properties that define when an operator's properties can be modified.

`Configuration` properties are only settable when the workflow is not running, and for ONIX devices define how to initialize the device. Examples would be setting the number of channels to record from, the frame rate of a camera, or defining filters to apply to recording channels.

Expand Down
10 changes: 0 additions & 10 deletions articles/getting-started/running_a_workflow.md

This file was deleted.

10 changes: 10 additions & 0 deletions articles/getting-started/start-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
uid: StartAWorkflow
title: Start a Workflow
---

Once all operators have been placed and linked correctly, and all **Configuration** properties have been set, it is now possible to run a workflow. Note that some aspects of Bonsai are only available in specific contexts; for instance, the GUIs mentioned above can only be opened when a workflow is not running. Once a workflow is running, these GUIs are not accessible, but visualizers for certain operators can be opened to view the streaming data.

Running a workflow can be done in one of two ways: (1) Press the **Start** button at the top of the Bonsai editor, and (2) Press F5. Upon starting a workflow, a context will be created, and all devices will be configured based on the **Configuration** properties. Any `*Data` operators will then begin streaming data, and can be visualized.

![Start button in Bonsai editor](../../images/bonsai-editor-start-button.png){width=700px}
Loading

0 comments on commit 4001458

Please sign in to comment.