Skip to content

Commit

Permalink
Fix broken reference after merging the tutorial in
Browse files Browse the repository at this point in the history
- Also, add references to the GUI in the template
- This is WIP, but I want to get something out so that users have
  tutorial content for np2 headstages
  • Loading branch information
cjsha committed Aug 28, 2024
1 parent 238a01e commit 76c200f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 8 deletions.
27 changes: 24 additions & 3 deletions template/partials/tutorials/main.tmpl.partial
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<h2> Configuring the {{{hub}}} </h2>

<p>We start by configuring the hardware using a configuration chain. This chain creates a hardware context using <a class="xref" href="../api/OpenEphys.Onix1.CreateContext.html">CreateContext</a>, adds a {{{hub}}} configuration using <a class="xref" href="../api/OpenEphys.Onix1.Configure{{{configureOperator}}}.html">{{{configureOperator}}}</a>, and then starts acquisition using <a class="xref" href="../api/OpenEphys.Onix1.StartAcquisition.html">StartAcquisition</a>. Here we break down each of these operators. </p>
<p>We start by configuring the hardware using a configuration chain. This chain creates a hardware context using <a class="xref" href="../api/OpenEphys.Onix1.CreateContext.html">CreateContext</a>, adds a {{{hub}}} configuration using <a class="xref" href="../api/OpenEphys.Onix1.Configure{{{configureOperator}}}.html">{{{configureOperator}}}</a>, and then starts acquisition using <a class="xref" href="../api/OpenEphys.Onix1.StartAcquisition.html">StartAcquisition</a>. Here we break down each of these operators.</p>

<div class="workflow">
<p><img src="../workflows/examples/{{{configureOperator}}}.bonsai" alt="{{{configureOperator}}} Workflow"></p>
Expand All @@ -37,7 +37,10 @@

<h3> {{{configureOperator}}} </h3>

<p>The <a class="xref" href="../api/OpenEphys.Onix1.Configure{{{configureOperator}}}.html">{{{configureOperator}}}</a> operator is used to configure the {{hub}}. Configuration settings for the {{hub}} can be examined and edited by clicking on the operator to open its property pane to the right of the editor. Expanding the members of the property pane allows you to configure each of the devices contained by the {{hub}}. {{^nonDefaultProperties}}In this demo, the {{hub}} properties are set to their default values.{{/nonDefaultProperties}}{{#nonDefaultProperties}}In this demo, the {{hub}} properties are set to their default values, except:{{/nonDefaultProperties}}</p>
<p>The <a class="xref" href="../api/OpenEphys.Onix1.Configure{{{configureOperator}}}.html">{{{configureOperator}}}</a> operator is used to configure the {{hub}}. Configuration settings for the {{hub}} can be examined and edited by clicking on the operator to open its property pane to the right of the editor. Expanding the members of the property pane allows you to configure each of the devices contained by the {{hub}}.
{{#gui}}This {{hub}} has a configuration GUI that can be accessed by following the <a class="xref" href="./{{hubSnakeCase}}-gui-tut.html">{{hub}} GUI Tutorial</a>.{{/gui}}
{{^nonDefaultProperties}}In this demo, the {{hub}} properties are set to their default values.{{/nonDefaultProperties}}
{{#nonDefaultProperties}}In this demo, the {{hub}} properties are set to their default values, except:{{/nonDefaultProperties}}</p>

<ul>
{{#nonDefaultProperties}}<li>{{{.}}}</li>{{/nonDefaultProperties}}
Expand All @@ -51,7 +54,7 @@

{{/configure}}

<h2> Streaming Data </h2>
<h2> Streaming data </h2>

<p>The rest of the workflow concerns capturing data to and from the {{{hub}}}, using a set of discrete "processing graphs" that either produce data from hardware (inputs/sources) or accept data produced by software (outputs/sinks). We describe these graphs in the following sections.</p>

Expand All @@ -61,3 +64,21 @@
</div>

{{#dataIOOperators}}{{>partials/tutorials/device}}{{/dataIOOperators}}

<!---
<h2>Loading data</h2>
<p>The following python script can be used to load and plot the data produced by the workflow described in this tutorial.</p>

[!code-python[](../workflows/examples/load-breakoutboard.py)]

<div class="NOTE alert alert-info">
<h5>NOTE</h5>
<p>This script will attempt to load entire files into arrays. For long recordings, data will need to be split into more manageable chunks by:</p>
<ul>
<li>Modifying this script to partially load files</li>
<li>Modifying the workflow to cyclically creating new files after a certain duration</li>
</ul>
</div>
--->


11 changes: 10 additions & 1 deletion tutorials/neuropixelsv1e-tut.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ overview:
- Streams Neuropixels 1.0 and BNO055 data.
- Commutates the tether automatically if there is a proper commutator connection.
configure:
nonDefaultProperties:
gui: false
nonDefaultProperties:
dataIOOperators:
- operator: PortStatus
data: Port Status
Expand All @@ -24,3 +25,11 @@ dataIOOperators:
data: BNO055
graphDescription: This processing graph generates data from the headstage's BNO055, writes it to a .csv file, and selects <code>Quaternion</code> data to send to a node that commutates the tether automatically if there is a proper commutator connection. Because <code>CsvWriter</code> is a <code>Sink</code> operator, it emits the same item downstream as it receives from upstream. Therefore, Bno55DataFrame members can by selected by hovering over <code>Output</code> in the context menu that appears by right-clicking the <code>CsvWriter</code> node.
---
<!---
[!code-python[](../workflows/examples/load-np1.py)]
> [!NOTE]
> This script will attempt to load entire files into arrays. For long recordings, data will need to be split into more manageable chunks by:
> - Modifying this script to partially load files
> - Modifying the workflow to cyclically creating new files after a certain duration
--->
2 changes: 1 addition & 1 deletion tutorials/neuropixelsv2e-gui-tut.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NeuropixelsV2e GUI

In addition to the capabilities described in <xref:NeuropixelsV2eTutorial>, the `NeuropixelsV2e` headstage has a graphical user interface when the `OpenEphys.Onix1.Design` package is downloaded. For more information on how to install that library, check out the <xref:BonsaiInstallationAndConfiguration> page.
In addition to the capabilities described in <xref:np2e-tut>, the `NeuropixelsV2e` headstage has a graphical user interface when the `OpenEphys.Onix1.Design` package is downloaded. For more information on how to install that library, check out the <xref:BonsaiInstallationAndConfiguration> page.

## Overview

Expand Down
13 changes: 10 additions & 3 deletions tutorials/neuropixelsv2e-tut.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ overview:
- Streams Neuropixels 2.0 and BNO055 data.
- Commutates the tether automatically if there is a proper commutator connection.
configure:
nonDefaultProperties:
gui: true
nonDefaultProperties:
dataIOOperators:
- operator: PortStatus
data: Port Status
Expand All @@ -23,6 +24,12 @@ dataIOOperators:
- operator: NeuropixelsV2eBno055Data
data: BNO055
graphDescription: This processing graph generates data from the headstage's BNO055, writes it to a .csv file, and selects <code>Quaternion</code> data to send to a node that commutates the tether automatically if there is a proper commutator connection. Because <code>CsvWriter</code> is a <code>Sink</code> operator, it emits the same item downstream as it receives from upstream. Therefore, Bno55DataFrame members can by selected by hovering over <code>Output</code> in the context menu that appears by right-clicking the <code>CsvWriter</code> node.


---
<!---
[!code-python[](../workflows/examples/load-np2.py)]
> [!NOTE]
> This script will attempt to load entire files into arrays. For long recordings, data will need to be split into more manageable chunks by:
> - Modifying this script to partially load files
> - Modifying the workflow to cyclically creating new files after a certain duration
--->

0 comments on commit 76c200f

Please sign in to comment.