From 97496842ca42c0c112c4d7f63f239ff74fac63b5 Mon Sep 17 00:00:00 2001 From: cjsha Date: Mon, 30 Dec 2024 15:31:19 -0500 Subject: [PATCH 1/4] Distinguish between aggregate & device properties --- .../getting-started/property-categories.md | 25 ++++++++++--- template/ManagedReference.extension.js | 2 +- template/partials/class.tmpl.partial | 36 ++++++++----------- 3 files changed, 36 insertions(+), 27 deletions(-) diff --git a/articles/getting-started/property-categories.md b/articles/getting-started/property-categories.md index b8193650..3592b6e3 100644 --- a/articles/getting-started/property-categories.md +++ b/articles/getting-started/property-categories.md @@ -3,7 +3,9 @@ uid: property-categories title: Property Categories --- -There are specific categories of properties that define when an operator's properties can be modified. +There are specific categories of properties that define when and how an operator's properties can be modified. + +## Configuration & Acquisition Properties configuration properties have an effect on hardware when a workflow is started and are used to @@ -14,6 +16,21 @@ the workflow is restarted. id="acquisition">acquisition properties have an immediate effect on hardware when the workflow is running. For instance, stimulus waveform properties can be dynamically modified according to parameters in your workflow. -`Devices` properties refer to the individual devices available within a particular aggregate operator. Aggregate -operators include , , and more. -Explore other available options under the [aggregate configuration operators](xref:configure) page. \ No newline at end of file +## Aggregate & Device Properties + +aggregate properties belong to [aggregate configuration operators](xref:configure). They are +simply referred to as "Configuration Operators" in the [Reference](xref:OpenEphys.Onix1) TOC for concision and +simplicity as they are recommended default operators for configuring Open Ephys ONIX hardware. + +device properties belong to [device configuration operators](xref:device-configure) though aggregate +operators can derive these properties from device operators. All properties in device configuration operators are device +properties. Aggregate operators often derive device properties from device configuration operators. For example, the + operator derives properties from the +operator. + +## Writing Acquisition Properties to Hardware Dynamically + +Writing acquisition properties to hardware dynamically (e.g. while the the workflow is running) requires using +device operators because externalizing device properties from an aggregate operator in Bonsai is currently not possible. \ No newline at end of file diff --git a/template/ManagedReference.extension.js b/template/ManagedReference.extension.js index a0aafa64..dc73c8f7 100644 --- a/template/ManagedReference.extension.js +++ b/template/ManagedReference.extension.js @@ -121,7 +121,7 @@ exports.preTransform = function (model) { if (operator.hub) { properties = extractConstituentOperatorsData(model); properties.unshift({ - 'object': 'Configuration', + 'object': model.name[0].value.replace('Configure', ''), 'constituentOperator': false, 'hasProperties': true, 'properties': sortPropertiesData([ diff --git a/template/partials/class.tmpl.partial b/template/partials/class.tmpl.partial index 37bba200..3a01d8a4 100644 --- a/template/partials/class.tmpl.partial +++ b/template/partials/class.tmpl.partial @@ -2,7 +2,7 @@
TIP

- This is a device configuration operator. Aggregate configuration operators are recommended in lieu of device configuration operators for interfacing with Open Ephys Onix hardware. + This is a device configuration operator. Aggregate configuration operators are recommended instead of device configuration operators for interfacing with Open Ephys Onix hardware.

{{/oe.operator.configureDevice}} @@ -31,41 +31,33 @@ {{#oe.operator.hub}} -

Configuration

- {{#oe.properties}} -{{^constituentOperator}} -

These are properties of the aggregate operator:

+

{{{object}}}

-{{#hasProperties}} -{{>partials/propertyTable}} -{{/hasProperties}} -{{^hasProperties}} -

This operator does not have any configuration options.

-{{/hasProperties}} +{{^constituentOperator}} + + + +

These are properties of the {{{oe.name}}} aggregate operator:

{{/constituentOperator}} -{{/oe.properties}} -

Devices

- -{{#oe.properties}} {{#constituentOperator}} - -

{{{object}}}

- -

{{{object}}} is a {{{type}}} operator encapsulated by the {{oe.name}} operator with the following properties:

+ + + +

{{{object}}} is a {{{type}}} device operator contained by the {{{oe.name}}} operator with the following properties:

+{{/constituentOperator}} {{#hasProperties}} {{>partials/propertyTable}} {{/hasProperties}} - {{^hasProperties}} -

This operator does not have any configuration options.

+

This operator does not have any properties to set.

{{/hasProperties}} -{{/constituentOperator}} {{/oe.properties}} + {{/oe.operator.hub}} {{#oe}} From 734eb505711520a2a76efd75da9ab8af0a1b365f Mon Sep 17 00:00:00 2001 From: cjsha Date: Tue, 31 Dec 2024 15:11:27 -0500 Subject: [PATCH 2/4] Add css classes for badges - Add content to configure.md - Edit content on property-categories.md --- api/configure.md | 8 +- .../getting-started/property-categories.md | 35 ++--- template/partials/class.tmpl.partial | 4 +- template/partials/propertyTable.tmpl.partial | 4 +- template/public/main.css | 122 +++++++++++++----- 5 files changed, 114 insertions(+), 59 deletions(-) diff --git a/api/configure.md b/api/configure.md index 57f20ff0..a7df9f1b 100644 --- a/api/configure.md +++ b/api/configure.md @@ -1,9 +1,13 @@ --- uid: configure -title: Configuration Operators +title: Aggregate Configuration Operators --- Aggregate configuration operators belong in a top-level chain of operators between [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) and [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) to configure ONIX hardware hubs. These are known as aggregate configuration operators because they configure an aggregation -of devices (also referred to as a hub) on a given headstage, miniscope, breakout board, etc.. \ No newline at end of file +of devices (also referred to as a hub) on a given headstage, miniscope, breakout board, etc.. + +Aggregate configuration operators are simply referred to as "Configuration Operators" in the +[Reference](xref:OpenEphys.Onix1) TOC for concision and simplicity as they are recommended starting-point operators for +configuring Open Ephys ONIX hardware. There are also . \ No newline at end of file diff --git a/articles/getting-started/property-categories.md b/articles/getting-started/property-categories.md index 3592b6e3..a8bddf7e 100644 --- a/articles/getting-started/property-categories.md +++ b/articles/getting-started/property-categories.md @@ -7,30 +7,23 @@ There are specific categories of properties that define when and how an operator ## Configuration & Acquisition Properties -configuration properties have an effect on hardware when a workflow is started and are used to -initialize the hardware state. Even if they are changed while a workflow is running, they will not have an effect until -the workflow is restarted. +configuration properties have an effect on +hardware when a workflow is started and are used to initialize the hardware state. Even if they are changed while a +workflow is running, they will not have an effect until the workflow is restarted. -acquisition properties have an immediate effect on hardware when the workflow is running. For -instance, stimulus waveform properties can be dynamically modified according to parameters in your workflow. +acquisition properties have an immediate +effect on hardware when the workflow is running. For instance, stimulus waveform properties can be dynamically modified +according to parameters in your workflow. ## Aggregate & Device Properties -aggregate properties belong to [aggregate configuration operators](xref:configure). They are -simply referred to as "Configuration Operators" in the [Reference](xref:OpenEphys.Onix1) TOC for concision and -simplicity as they are recommended default operators for configuring Open Ephys ONIX hardware. +aggregate properties are only available through +[aggregate configuration operators](xref:configure). -device properties belong to [device configuration operators](xref:device-configure) though aggregate -operators can derive these properties from device operators. All properties in device configuration operators are device -properties. Aggregate operators often derive device properties from device configuration operators. For example, the - operator derives properties from the -operator. +device properties are available through +[device configuration operators](xref:device-configure) and aggregate configuration operators that derive them from +device configuration operators. For example, derives properties from +. -## Writing Acquisition Properties to Hardware Dynamically - -Writing acquisition properties to hardware dynamically (e.g. while the the workflow is running) requires using -device operators because externalizing device properties from an aggregate operator in Bonsai is currently not possible. \ No newline at end of file +Writing acquisition device properties to hardware dynamically (e.g. while the the workflow is running) requires using +device configuration operators because externalizing device properties from an aggregate operator in Bonsai is currently not possible. \ No newline at end of file diff --git a/template/partials/class.tmpl.partial b/template/partials/class.tmpl.partial index 3a01d8a4..a78fa74b 100644 --- a/template/partials/class.tmpl.partial +++ b/template/partials/class.tmpl.partial @@ -37,14 +37,14 @@ {{^constituentOperator}} - +

These are properties of the {{{oe.name}}} aggregate operator:

{{/constituentOperator}} {{#constituentOperator}} - +

{{{object}}} is a {{{type}}} device operator contained by the {{{oe.name}}} operator with the following properties:

{{/constituentOperator}} diff --git a/template/partials/propertyTable.tmpl.partial b/template/partials/propertyTable.tmpl.partial index ea1db383..07864c57 100644 --- a/template/partials/propertyTable.tmpl.partial +++ b/template/partials/propertyTable.tmpl.partial @@ -13,7 +13,7 @@ {{#acquisition}}
- @@ -22,7 +22,7 @@ {{#configuration}}
- diff --git a/template/public/main.css b/template/public/main.css index cfe41e88..1efc8367 100644 --- a/template/public/main.css +++ b/template/public/main.css @@ -54,43 +54,12 @@ } */ figcaption { - /* font-size: calc(var(--bs-body-font-size) * 0.9); */ font-style: italic; border: solid 1px var(--bs-border-color); padding: 0.25rem; } -/* h1 { - font-weight: 500; - font-size: calc(2.2rem + 0.8vw); -} - -h2 { - font-weight: 480; - font-size: calc(2.0rem + 0.6vw); -} - -h3 { - font-weight: 460; - font-size: calc(1.8rem + 0.4vw); -} - -h4 { - font-weight: 440; - font-size: calc(1.6rem + 0.2vw); -} - -h5 { - font-weight: 420; - font-size: 1.4rem; -} - -h6 { - font-weight: 400; - font-size: 1.2rem; -} */ - -/* This is for formatting markdown files specifically */ +/* Format markdown files */ ol ol, ol ul { margin-bottom: 1rem @@ -106,4 +75,93 @@ ol li div { [data-bs-theme=light] #logo { content:url("../logo-light-mode.svg"); +} + +/* Create color palette for badges */ + +:root, [data-bs-theme=light] { + --oe-red-text: color-mix(in srgb, var(--bs-red), black 60%); + --oe-red-background: color-mix(in srgb, var(--bs-red), white 80%); + --oe-red-border: color-mix(in srgb, var(--bs-red), white 60%); + --oe-orange-text: color-mix(in srgb, var(--bs-orange), black 60%); + --oe-orange-background: color-mix(in srgb, var(--bs-orange), white 80%); + --oe-orange-border: color-mix(in srgb, var(--bs-orange), white 60%); + --oe-yellow-text: color-mix(in srgb, var(--bs-yellow), black 60%); + --oe-yellow-background: color-mix(in srgb, var(--bs-yellow), white 80%); + --oe-yellow-border: color-mix(in srgb, var(--bs-yellow), white 60%); + --oe-green-text: color-mix(in srgb, var(--bs-green), black 60%); + --oe-green-background: color-mix(in srgb, var(--bs-green), white 80%); + --oe-green-border: color-mix(in srgb, var(--bs-green), white 60%); + --oe-blue-text: color-mix(in srgb, var(--bs-blue), black 60%); + --oe-blue-background: color-mix(in srgb, var(--bs-blue), white 80%); + --oe-blue-border: color-mix(in srgb, var(--bs-blue), white 60%); + --oe-purple-text: color-mix(in srgb, var(--bs-purple), black 60%); + --oe-purple-background: color-mix(in srgb, var(--bs-purple), white 80%); + --oe-purple-border: color-mix(in srgb, var(--bs-purple), white 60%); +} + +[data-bs-theme=dark] { + color-scheme: dark; + --oe-red-text: color-mix(in srgb, var(--bs-red), white 40%); + --oe-red-background: color-mix(in srgb, var(--bs-red), black 80%); + --oe-red-border: color-mix(in srgb, var(--bs-red), black 40%); + --oe-orange-text: color-mix(in srgb, var(--bs-orange), white 40%); + --oe-orange-background: color-mix(in srgb, var(--bs-orange), black 80%); + --oe-orange-border: color-mix(in srgb, var(--bs-orange), black 40%); + --oe-yellow-text: color-mix(in srgb, var(--bs-yellow), white 40%); + --oe-yellow-background: color-mix(in srgb, var(--bs-yellow), black 80%); + --oe-yellow-border: color-mix(in srgb, var(--bs-yellow), black 40%); + --oe-green-text: color-mix(in srgb, var(--bs-green), white 40%); + --oe-green-background: color-mix(in srgb, var(--bs-green), black 80%); + --oe-green-border: color-mix(in srgb, var(--bs-green), black 40%); + --oe-blue-text: color-mix(in srgb, var(--bs-blue), white 40%); + --oe-blue-background: color-mix(in srgb, var(--bs-blue), black 80%); + --oe-blue-border: color-mix(in srgb, var(--bs-blue), black 40%); + --oe-purple-text: color-mix(in srgb, var(--bs-purple), white 40%); + --oe-purple-background: color-mix(in srgb, var(--bs-purple), black 80%); + --oe-purple-border: color-mix(in srgb, var(--bs-purple), black 40%); +} + +/* Create classes for badges */ + +.oe-badge-border { + border-radius: var(--bs-border-radius-pill); + border-width: var(--bs-border-width); + border-style: var(--bs-border-style); +} + +.oe-badge-red { + color: var(--oe-red-text); + background-color: var(--oe-red-background); + border-color: var(--oe-red-border); +} + +.oe-badge-orange { + color: var(--oe-orange-text); + background-color: var(--oe-orange-background); + border-color: var(--oe-orange-border); +} + +.oe-badge-yellow { + color: var(--oe-yellow-text); + background-color: var(--oe-yellow-background); + border-color: var(--oe-yellow-border); +} + +.oe-badge-green { + color: var(--oe-green-text); + background-color: var(--oe-green-background); + border-color: var(--oe-green-border); +} + +.oe-badge-blue { + color: var(--oe-blue-text); + background-color: var(--oe-blue-background); + border-color: var(--oe-blue-border); +} + +.oe-badge-purple { + color: var(--oe-purple-text); + background-color: var(--oe-purple-background); + border-color: var(--oe-purple-border); } \ No newline at end of file From 2e0d5d9f16c2220faf07865ddbb9f42d0852c5b6 Mon Sep 17 00:00:00 2001 From: cjsha Date: Thu, 2 Jan 2025 00:02:44 -0500 Subject: [PATCH 3/4] PR 174 feedback - capitalize badges - "Aggregate" -> "Device Group" - hard wrap 100 characters instead of 120 --- api/configure.md | 6 +-- api/device-configure.md | 7 +-- .../getting-started/property-categories.md | 49 +++++++++++++------ template/partials/class.tmpl.partial | 8 +-- template/partials/propertyTable.tmpl.partial | 6 +-- 5 files changed, 49 insertions(+), 27 deletions(-) diff --git a/api/configure.md b/api/configure.md index a7df9f1b..8c29a48f 100644 --- a/api/configure.md +++ b/api/configure.md @@ -1,12 +1,12 @@ --- uid: configure -title: Aggregate Configuration Operators +title: Device Group Configuration Operators --- Aggregate configuration operators belong in a top-level chain of operators between [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) and [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) to -configure ONIX hardware hubs. These are known as aggregate configuration operators because they configure an aggregation -of devices (also referred to as a hub) on a given headstage, miniscope, breakout board, etc.. +configure ONIX hardware hubs. These are known as device group configuration operators because they configure an aggregation +of devices (also referred to as a hardware hub) on a given headstage, miniscope, breakout board, etc.. Aggregate configuration operators are simply referred to as "Configuration Operators" in the [Reference](xref:OpenEphys.Onix1) TOC for concision and simplicity as they are recommended starting-point operators for diff --git a/api/device-configure.md b/api/device-configure.md index 9e138c30..8a4d7f3b 100644 --- a/api/device-configure.md +++ b/api/device-configure.md @@ -4,8 +4,9 @@ title: Device Configuration Operators --- > [!TIP] -> 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: -> - The `address` and `name` properties of aggregate configuration operators undergo automatic configuration which reduces the risk of erroneous configuration. -> - 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. +> Device configuration operators are not recommended for using off-the-shelf Open Ephys hardware. +> Use [device group configuration operators](xref:configure) instead. They confer the following benefits: +> - The `address` and `name` properties of device group configuration operators undergo automatic configuration which reduces the risk of erroneous configuration. +> - The workflow is less cluttered with configuration operators as one device group configuration operator corresponds to multiple device operators. This improves workflow legibility and expedites the workflow scripting process. 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. \ No newline at end of file diff --git a/articles/getting-started/property-categories.md b/articles/getting-started/property-categories.md index a8bddf7e..d3ad50c1 100644 --- a/articles/getting-started/property-categories.md +++ b/articles/getting-started/property-categories.md @@ -3,27 +3,48 @@ uid: property-categories title: Property Categories --- -There are specific categories of properties that define when and how an operator's properties can be modified. +There are specific categories of properties that define when and how an operator's properties can be +modified. ## Configuration & Acquisition Properties -configuration properties have an effect on -hardware when a workflow is started and are used to initialize the hardware state. Even if they are changed while a -workflow is running, they will not have an effect until the workflow is restarted. +Configuration +properties have an effect on hardware when a workflow is started and are used to initialize the +hardware state. Even if they are changed while a workflow is running, they will not have an effect +until the workflow is restarted. -acquisition properties have an immediate -effect on hardware when the workflow is running. For instance, stimulus waveform properties can be dynamically modified -according to parameters in your workflow. +Acquisition properties +have an immediate effect on hardware when the workflow is running. For instance, stimulus waveform +properties can be dynamically modified according to parameters in your workflow. ## Aggregate & Device Properties -aggregate properties are only available through -[aggregate configuration operators](xref:configure). +Device Group properties are +only available through [device group configuration operators](xref:configure). -device properties are available through -[device configuration operators](xref:device-configure) and aggregate configuration operators that derive them from -device configuration operators. For example, derives properties from +Device properties are available +through [device configuration operators](xref:device-configure) and device group configuration +operators that derive them from device configuration operators. For example, + derives properties from . -Writing acquisition device properties to hardware dynamically (e.g. while the the workflow is running) requires using -device configuration operators because externalizing device properties from an aggregate operator in Bonsai is currently not possible. \ No newline at end of file +Writing Acquisition Device properties to hardware +dynamically (e.g. while the the workflow is running) requires using device configuration operators +because externalizing device properties from a device group configuration operator in Bonsai is +currently not possible. + + \ No newline at end of file diff --git a/template/partials/class.tmpl.partial b/template/partials/class.tmpl.partial index a78fa74b..12b8e3ee 100644 --- a/template/partials/class.tmpl.partial +++ b/template/partials/class.tmpl.partial @@ -36,15 +36,15 @@

{{{object}}}

{{^constituentOperator}} - - + + -

These are properties of the {{{oe.name}}} aggregate operator:

+

These are properties of the {{{oe.name}}} device group configuration operator:

{{/constituentOperator}} {{#constituentOperator}} - +

{{{object}}} is a {{{type}}} device operator contained by the {{{oe.name}}} operator with the following properties:

{{/constituentOperator}} diff --git a/template/partials/propertyTable.tmpl.partial b/template/partials/propertyTable.tmpl.partial index 07864c57..9520037a 100644 --- a/template/partials/propertyTable.tmpl.partial +++ b/template/partials/propertyTable.tmpl.partial @@ -14,7 +14,7 @@ @@ -22,8 +22,8 @@ {{#configuration}} From e44f8c503d9206a60f144247b89b76830e451c9e Mon Sep 17 00:00:00 2001 From: jonnew Date: Wed, 15 Jan 2025 16:54:40 -0500 Subject: [PATCH 4/4] Review of property-categories.md --- .../getting-started/property-categories.md | 76 +++++++++---------- 1 file changed, 35 insertions(+), 41 deletions(-) diff --git a/articles/getting-started/property-categories.md b/articles/getting-started/property-categories.md index d3ad50c1..4281d8da 100644 --- a/articles/getting-started/property-categories.md +++ b/articles/getting-started/property-categories.md @@ -3,48 +3,42 @@ uid: property-categories title: Property Categories --- -There are specific categories of properties that define when and how an operator's properties can be -modified. - -## Configuration & Acquisition Properties - -Configuration -properties have an effect on hardware when a workflow is started and are used to initialize the -hardware state. Even if they are changed while a workflow is running, they will not have an effect -until the workflow is restarted. - -Acquisition properties -have an immediate effect on hardware when the workflow is running. For instance, stimulus waveform -properties can be dynamically modified according to parameters in your workflow. - -## Aggregate & Device Properties - -Device Group properties are -only available through [device group configuration operators](xref:configure). - -Device properties are available -through [device configuration operators](xref:device-configure) and device group configuration -operators that derive them from device configuration operators. For example, - derives properties from -. - -Writing Acquisition Configuration properties have an effect on hardware +when a workflow is started and are used to initialize the hardware state. If +they are changed while a workflow is running, they will not have an effect until +the workflow is restarted. For example, the `Driver` and `Index` properties of + are used to specify the hardware +prior to starting a recording. + +Acquisition properties have an immediate effect on +hardware when the workflow is running. For example, the stimulus properties of + can be dynamically +configured while a workflow is running to shape stimulus patterns in real-time. + +Device +Group properties are only available through [Device Group configuration +operators](xref:configure) that are used for globally configuring groups of +devices. For example, + property can be used +to provide a unique name to different Breakout boards if multiple are used on a +single host computer. + +Device +properties are available through [Device configuration +operators](xref:device-configure) and device group configuration operators that +combine multiple individual devices. For example, the + property can be used to +configure the Analog IO device on a breakout board. + + + - \ No newline at end of file