Skip to content

Commit 39f632c

Browse files
committed
Distinguish between aggregate & device properties
- This is done on the OpenEphys.Onix1 overview page - "Aggregate", "Multi-Device" -> "Device Group" - Add css classes for badges - Define what devices are on the configuration operator pages - I wanted to link to properties in the tables which motivated me to fix the xref issue #70. This fix seems to work well enough for now. That's what the changes are related to in the .js files are concerning. - Reduce excessive formatting (specifically hyperlinks don't need to be wrapped in back ticks) - Remove comments that appear in HTML inspector
1 parent 0566958 commit 39f632c

File tree

12 files changed

+198
-107
lines changed

12 files changed

+198
-107
lines changed

api/configure.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
uid: configure
3-
title: Configuration Operators
3+
title: Device Group Configuration Operators
44
---
55

6-
Aggregate configuration operators belong in a top-level chain of operators between
7-
[`CreateContext`](xref:OpenEphys.Onix1.CreateContext) and [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) to
8-
configure ONIX hardware hubs. These are known as aggregate configuration operators because they configure an aggregation
9-
of devices (also referred to as a hub) on a given headstage, miniscope, breakout board, etc..
6+
Device Group configuration operators belong in a top-level configuration chain between
7+
[CreateContext](xref:OpenEphys.Onix1.CreateContext) and
8+
[StartAcquisition](xref:OpenEphys.Onix1.StartAcquisition) to configure ONIX hardware. These are
9+
known as Device Group configuration operators because they configure a group of devices on a given
10+
headstage, miniscope, breakout board, etc. [!INCLUDE [device
11+
description](<./../includes/device-description.md>)]

api/device-configure.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ title: Device Configuration Operators
44
---
55

66
> [!TIP]
7-
> 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:
8-
> - The `address` and `name` properties of aggregate configuration operators undergo automatic configuration which reduces the risk of erroneous configuration.
9-
> - 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.
7+
> Device configuration operators are not recommended for using off-the-shelf Open Ephys hardware.
8+
> Use [Device Group configuration operators](xref:configure) instead. They confer the following
9+
> benefits:
10+
> - The `address` and `name` properties of Device Group configuration operators undergo automatic
11+
> configuration which reduces the risk of erroneous configuration.
12+
> - The workflow is less cluttered with configuration operators as one Device Group configuration
13+
> operator corresponds to multiple device operators. This improves workflow legibility and
14+
> expedites the workflow scripting process.
1015
11-
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.
16+
Device configuration operators belong in a top-level configuration chain between
17+
[CreateContext](xref:OpenEphys.Onix1.CreateContext) and
18+
[StartAcquisition](xref:OpenEphys.Onix1.StartAcquisition) to configure devices that can be found on
19+
ONIX hardware. [!INCLUDE [device description](<./../includes/device-description.md>)]

api/overview.md

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,57 @@ title: OpenEphys.Onix1
77
> Quickly access these pages in Bonsai by pressing <kbd>F1</kbd> while an OpenEphys.Onix1 operator
88
> is selected in the workflow or Toolbox.
99
10-
OpenEphys.Onix1 is a Bonsai package for control of and data acquisition from ONIX hardware. This
11-
section of the docs is dedicated to facilitate construction of workflows using OpenEphys.Onix1. It
12-
contains helpful information about OpenEphys.Onix1 operators and the data elements they produce.
13-
such as in-depth descriptions of their properties and their data types. The data elements produced
14-
by OpenEphys.Onix1 operators where you can find information such as equations for converting
15-
electrophysiology signals from the DAC step-size to volts. Take the
16-
<xref:OpenEphys.Onix1.Rhs2116DataFrame> for example.
10+
OpenEphys.Onix1 is a Bonsai package for control of and data acquisition from
11+
ONIX hardware. This section of the docs is dedicated to facilitate construction
12+
of workflows using OpenEphys.Onix1. It contains helpful information about
13+
OpenEphys.Onix1 operators and the data elements they produce. The
14+
<xref:OpenEphys.Onix1.Rhs2116DataFrame> page exemplifies this. It contains
15+
information to interpret data such as equations for converting electrophysiology
16+
signals from the raw ADC values to volts.
1717

1818
## Property Categories
1919

20-
In the OpenEphys.Onix1 package, properties belong to specific categories that define when the
21-
property effects the hardware.
20+
### Configuration properties vs Acquisition properties
2221

23-
<span class="badge bg-warning-subtle border border-warning-subtle text-warning-emphasis rounded-pill"
24-
id="configuration">configuration</span> properties have an effect on hardware when a workflow is started and are used to
25-
initialize the hardware state. Even if they are changed while a workflow is running, they will not have an effect until
26-
the workflow is restarted.
22+
In the OpenEphys.Onix1 package, properties belong to specific categories that
23+
define when the property effects the hardware.
2724

28-
<span class="badge bg-primary-subtle border border-primary-subtle text-primary-emphasis rounded-pill"
29-
id="acquisition">acquisition</span> properties have an immediate effect on hardware when the workflow is running. For
30-
instance, stimulus waveform properties can be dynamically modified according to parameters in your workflow.
25+
<span class="badge oe-badge-border oe-badge-yellow"
26+
id="configuration">Configuration</span> properties have an effect on hardware
27+
when a workflow is started and are used to initialize the hardware state. If
28+
they are changed while a workflow is running, they will not have an effect until
29+
the workflow is restarted. For example, CreateContext's
30+
<xref:OpenEphys.Onix1.CreateContext.Index> Configuration property is used to
31+
specify the hardware prior to starting a recording, and editing this property
32+
has no effect until the workflow is started or restarted.
3133

32-
`Devices` properties refer to the individual devices available within a particular aggregate operator. Aggregate
33-
operators include <xref:OpenEphys.Onix1.ConfigureHeadstage64>, <xref:OpenEphys.Onix1.ConfigureBreakoutBoard>, and more.
34-
Explore other available options under the [aggregate configuration operators](xref:configure) page.
34+
<span class="badge oe-badge-border oe-badge-blue"
35+
id="acquisition">Acquisition</span> properties have an immediate effect on
36+
hardware when the workflow is running. For example,
37+
Headstage64ElectricalStimulatorTrigger's
38+
<xref:OpenEphys.Onix1.Headstage64ElectricalStimulatorTrigger.InterPulseInterval>
39+
property allows dynamically configuring the duration between electrical
40+
stimulation pulses. Along with its other Acquisition properties, the entire
41+
electrical stimulation pattern can be modulated in real-time while the workflow
42+
is running.
43+
44+
### Device Group properties vs Device properties
45+
46+
Properties are additionally categorized by whether they effect a group of devices
47+
or a single device.
48+
49+
<span class="badge oe-badge-border oe-badge-green" id="device-group">Device
50+
Group</span> properties are only available through [Device Group configuration
51+
operators](xref:configure). These properties are used to configure a group of
52+
devices. For example, ConfigureNeuropixelsV2eHeadstage's
53+
<xref:OpenEphys.Onix1.ConfigureNeuropixelsV2eHeadstage.Port> property
54+
configures the port name for all devices on the NeuropixelsV2e Headstage (which
55+
in turn automatically configures each device's address).
56+
57+
<span class="badge oe-badge-border oe-badge-purple" id="device">Device</span>
58+
properties are available through [Device configuration
59+
operators](xref:device-configure) and Device Group configuration operators which
60+
typically combine multiple individual devices. These properties are used to
61+
configure a single device. For example, ConfigureBreakoutBoard's
62+
<xref:OpenEphys.Onix1.ConfigureBreakoutBoard.AnalogIO> properties configure the
63+
Breakout Board's Analog I/O device.

articles/getting-started/onix-configuration.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,11 @@ element](xref:data-elements) named <xref:OpenEphys.Onix1.ContextTask>.
3838

3939
Hardware configuration is performed when `ContextTask` passes through a [configuration
4040
operator](xref:configure). A configuration operator allows the user to configure hardware by editing
41-
its properties. There are two types of configuration operators: [device configuration
42-
operators](xref:device-configure) and [device group configuration operators](xref:configure).
41+
its properties. There are two types of configuration operators: [Device configuration
42+
operators](xref:device-configure) and [Device Group configuration operators](xref:configure).
4343
Device configuration operators allow configuration of a single device contained by a headstage,
44-
miniscope, or breakout board whereas device group configuration operators allow configuration of all
44+
miniscope, or breakout board whereas Device Group configuration operators allow configuration of all
4545
devices contained by a headstage, miniscope, or breakout board.
46-
<!--We recommend using device group configuration operators for concision and
47-
ease-of-use, though device operators can be helpful in more advanced workflows that require writing
48-
to hardware while the workflow is running.
49-
50-
Any number of configuration operators can be chained following a CreateContext operator. If you use
51-
only device group configuration operators, you'll have between one and three total
52-
configuration operators: one for the breakout board and one for each port that is connected to a
53-
headstage or miniscope. -->
5446

5547
::: workflow
5648
![/workflows/getting-started/configure.bonsai workflow](../../workflows/getting-started/configure.bonsai)
@@ -64,8 +56,6 @@ related to data acquisition such as ReadSize and WriteSize. Setting the ReadSize
6456
particular workflow is a balancing act of minimizing latency of data data transfers from the ONIX
6557
system and avoiding data accumulation in the ONIX system's hardware buffer.
6658

67-
<!-- TODO: Need a separate tutorial or guide on this -->
68-
6959
::: workflow
7060
![/workflows/getting-started/start-acquisition.bonsai workflow](../../workflows/getting-started/start-acquisition.bonsai)
7161
:::

includes/device-description.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Devices represent physical element interfacing with the environment (e.g., an external
2+
sensor with a digital communication interface like the BNO055, Neuropixels probes, or RHS2116
3+
stimulus trigger) or internal data sources (e.g., a controller based digital logic module
4+
that generates system status reports like the port status controller).

template/ManagedReference.extension.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ function extractEnumData(model) {
1313
.map(child => ({
1414
'field&value': child.syntax.content[0].value,
1515
'description': [child.summary, child.remarks].join(''),
16+
'id': child.uid.replaceAll('.', '_'),
1617
}));
1718
}
1819

@@ -40,7 +41,8 @@ function processChildProperty(child, sharedModel) {
4041
'enum': enumFields,
4142
},
4243
'configuration': configuration,
43-
'acquisition': acquisition
44+
'acquisition': acquisition,
45+
'id': child.uid.replaceAll('.', '_'),
4446
}
4547
}
4648

@@ -80,6 +82,7 @@ function extractConstituentOperatorsData(model) {
8082
'constituentOperator': true,
8183
'hasProperties': properties === undefined || properties.length === 0 ? false : true,
8284
'properties': properties,
85+
'id': child.uid.replaceAll('.', '_'),
8386
};
8487
}
8588
);
@@ -121,7 +124,7 @@ exports.preTransform = function (model) {
121124
if (operator.hub) {
122125
properties = extractConstituentOperatorsData(model);
123126
properties.unshift({
124-
'object': 'Configuration',
127+
'object': model.name[0].value.replace('Configure', ''),
125128
'constituentOperator': false,
126129
'hasProperties': true,
127130
'properties': sortPropertiesData([
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
var common = require('./ManagedReference.common.js');
2+
13
exports.getOptions = function (model) {
4+
var ignoreChildrenBookmarks = model._splitReference && model.type && common.getCategory(model.type) === 'ns';
5+
26
return {
3-
isShared: true
7+
isShared: true,
8+
bookmarks: common.getBookmarks(model, ignoreChildrenBookmarks)
49
};
510
}

template/partials/class.tmpl.partial

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<div class="Important alert alert-info">
33
<h5>TIP</h5>
44
<p>
5-
This is a device configuration operator. <a class="xref" href="configure.html">Aggregate configuration operators</a> are recommended in lieu of <a class="xref" href="device-configure.html">device configuration operators</a> for interfacing with Open Ephys Onix hardware.
5+
This is a <a class="xref" href="device-configure.html">Device configuration operator</a>. <a class="xref" href="configure.html">Device Group configuration operators</a> are recommended instead of Device configuration operators for interfacing with Open Ephys Onix hardware.
66
</p>
77
</div>
88
{{/oe.operator.configureDevice}}
99

1010
<div>
11-
<h1 id="{{id}}" data-uid="{{oe.uid}}" class="text-break" style="display: inline-block;">
11+
<h1 class="text-break" style="display: inline-block;">
1212
{{oe.name}}
1313
{{#sourceurl}}<a class="header-action link-secondary" title="View source" href="{{sourceurl}}"><i class="bi bi-code-slash"></i></a>{{/sourceurl}}
1414
</h1>
@@ -31,41 +31,33 @@
3131

3232
{{#oe.operator.hub}}
3333

34-
<h3>Configuration</h3>
35-
3634
{{#oe.properties}}
37-
{{^constituentOperator}}
3835

39-
<p>These are properties of the aggregate operator:</p>
36+
<h3 class="text-break" style="display: inline-block;" id="{{{id}}}">{{{object}}}</h3>
4037

41-
{{#hasProperties}}
42-
{{>partials/propertyTable}}
43-
{{/hasProperties}}
44-
{{^hasProperties}}
45-
<p>This operator does not have any configuration options.</p>
46-
{{/hasProperties}}
38+
{{^constituentOperator}}
39+
<a class="xref" href="~/api/OpenEphys.Onix1.html#device-group">
40+
<button class="badge oe-badge-border oe-badge-green">Device Group</button>
41+
</a>
42+
<p>These are properties of the {{{oe.name}}} <a class="xref" href="~/api/configure.html">Device Group configuration operator</a>:</p>
4743
{{/constituentOperator}}
48-
{{/oe.properties}}
4944

50-
<h3>Devices</h3>
51-
52-
{{#oe.properties}}
5345
{{#constituentOperator}}
54-
55-
<h4>{{{object}}}</h4>
56-
57-
<p>{{{object}}} is a {{{type}}} operator encapsulated by the {{oe.name}} operator with the following properties:</p>
46+
<a class="xref" href="~/api/OpenEphys.Onix1.html#device">
47+
<button class="badge oe-badge-border oe-badge-purple">Device</button>
48+
</a>
49+
<p>{{{object}}} is a {{{type}}} device operator contained by the {{{oe.name}}} operator with the following properties:</p>
50+
{{/constituentOperator}}
5851

5952
{{#hasProperties}}
6053
{{>partials/propertyTable}}
6154
{{/hasProperties}}
62-
6355
{{^hasProperties}}
64-
<p>This operator does not have any configuration options.</p>
56+
<p>This operator does not have any properties to set.</p>
6557
{{/hasProperties}}
6658

67-
{{/constituentOperator}}
6859
{{/oe.properties}}
60+
6961
{{/oe.operator.hub}}
7062

7163
{{#oe}}

template/partials/enum.tmpl.partial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{{#oe.enum}}
1616
<tr>
1717
<td style="white-space: no-wrap">
18-
<code>
18+
<code id={{{id}}}>
1919
{{{field&value}}}
2020
</code>
2121
</td>

template/partials/hardware/configuration.tmpl.partial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
in Bonsai. This process comprises of the following steps:
66
<ul>
77
<li>
8-
Create an ONIX acquisition context using <Sa class="xref"
8+
Create an ONIX acquisition context using <a class="xref"
99
href="~/api/OpenEphys.Onix1.CreateContext.html">CreateContext</a>
1010
</li>
1111
<li>

0 commit comments

Comments
 (0)