Skip to content

Commit

Permalink
Node -> Operator
Browse files Browse the repository at this point in the history
  • Loading branch information
cjsha committed Aug 9, 2024
1 parent 5907117 commit 7996a2f
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion articles/devices/bno055-neuropixelsv2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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
---
2 changes: 1 addition & 1 deletion articles/getting-started/bonsai-usage.md
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.
2 changes: 1 addition & 1 deletion articles/getting-started/getting-started.md
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
12 changes: 6 additions & 6 deletions articles/getting-started/initialize-oni-context.md
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
2 changes: 1 addition & 1 deletion articles/getting-started/install-configure-bonsai.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ It is good practice to periodically check for package updates. [Open the package

## Next Steps

Now that Bonsai has been installed and configured, it is time to start placing nodes 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 nodes.
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.
6 changes: 3 additions & 3 deletions articles/getting-started/next-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ uid: NextSteps
title: Next Steps
---

Continue browsing <xref:GettingStarted> and check out specific nodes on the left to see how to configure each node, 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.
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 node, head to the <xref:OpenEphys.Onix1> to see a more developer-focused view of each node.
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 nodes and moving towards generating data in an experimental setting can be found in the <xref:TutorialsLandingPage>.
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: 5 additions & 5 deletions articles/getting-started/node-types.md
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.
2 changes: 1 addition & 1 deletion articles/getting-started/property-categories.md
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
4 changes: 2 additions & 2 deletions articles/getting-started/start-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ uid: StartAWorkflow
title: Start a Workflow
---

Once all nodes 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 nodes can be opened to view the streaming data.
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` nodes will then begin streaming data, and can be visualized.
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 7996a2f

Please sign in to comment.