From f705f6e9ec5289795f168aded85c28aa1b633b90 Mon Sep 17 00:00:00 2001 From: cjsha <36574350+cjsha@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:03:30 -0500 Subject: [PATCH 1/3] ucla miniscope v4 content (#148) UCLA miniscope v4 content - In creating this page, I found some formatting fixes I wanted to implement in other files as well: - do not double format link (i.e. hyperlinks don't need to be wrapped in `` - do not repeat hyperlinks within the same page - not important to say "the `DeviceName` property is set to". just say "`DeviceName` is set to" - use xref instead of hyperlink to bonsai classes - unify templates to use workflowLocation instead of workflowDirectory - hard-wrap some files - remove bold format around "Output" - Change some readsizes to read every ~1ms --- .../getting-started/initialize-oni-context.md | 6 +- articles/getting-started/operator-types.md | 6 +- articles/getting-started/tips-tricks.md | 2 +- articles/hardware/breakout/analog-io.md | 20 +- articles/hardware/breakout/configuration.md | 1 - articles/hardware/breakout/digital-inputs.md | 22 +- articles/hardware/breakout/digital-outputs.md | 6 +- articles/hardware/breakout/heartbeat.md | 2 +- articles/hardware/breakout/memory-monitor.md | 3 +- articles/hardware/hs64/bno055.md | 2 +- articles/hardware/hs64/configuration.md | 4 +- articles/hardware/hs64/memory-monitor.md | 3 +- articles/hardware/hs64/port-status.md | 2 +- articles/hardware/hs64/rhd2164.md | 16 +- articles/hardware/hs64/ts4231.md | 4 +- articles/hardware/np1e/bno055.md | 2 +- articles/hardware/np1e/configuration.md | 4 +- articles/hardware/np1e/memory-monitor.md | 3 +- articles/hardware/np1e/np1.md | 26 +- articles/hardware/np1e/port-status.md | 2 +- articles/hardware/np2e/bno055.md | 2 +- articles/hardware/np2e/configuration.md | 4 +- articles/hardware/np2e/memory-monitor.md | 3 +- articles/hardware/np2e/np2.md | 31 ++- articles/hardware/np2e/port-status.md | 2 +- articles/hardware/ucla-miniscope-v4/bno055.md | 9 + articles/hardware/ucla-miniscope-v4/camera.md | 29 +++ .../ucla-miniscope-v4/configuration.md | 18 ++ .../ucla-miniscope-v4/memory-monitor.md | 8 + .../hardware/ucla-miniscope-v4/overview.md | 30 +++ .../hardware/ucla-miniscope-v4/port-status.md | 9 + articles/toc.yml | 12 + includes/configuration-timestamp.md | 2 +- src/onix-bonsai-onix1 | 2 +- .../partials/hardware/bno055.tmpl.partial | 4 +- .../hardware/memoryMonitor.tmpl.partial | 2 +- .../partials/hardware/portStatus.tmpl.partial | 2 +- workflows/hardware/np1e/configuration.bonsai | 2 +- workflows/hardware/np1e/np1e.bonsai | 2 +- workflows/hardware/np2e/configuration.bonsai | 2 +- workflows/hardware/np2e/np2e.bonsai | 2 +- .../hardware/ucla-miniscope-v4/bno055.bonsai | 44 ++++ .../hardware/ucla-miniscope-v4/camera.bonsai | 53 ++++ .../ucla-miniscope-v4/configuration.bonsai | 131 ++++++++++ .../ucla-miniscope-v4/memory-monitor.bonsai | 19 ++ .../ucla-miniscope-v4/port-status.bonsai | 32 +++ .../ucla-miniscope-v4.bonsai | 230 ++++++++++++++++++ 47 files changed, 742 insertions(+), 80 deletions(-) create mode 100644 articles/hardware/ucla-miniscope-v4/bno055.md create mode 100644 articles/hardware/ucla-miniscope-v4/camera.md create mode 100644 articles/hardware/ucla-miniscope-v4/configuration.md create mode 100644 articles/hardware/ucla-miniscope-v4/memory-monitor.md create mode 100644 articles/hardware/ucla-miniscope-v4/overview.md create mode 100644 articles/hardware/ucla-miniscope-v4/port-status.md create mode 100644 workflows/hardware/ucla-miniscope-v4/bno055.bonsai create mode 100644 workflows/hardware/ucla-miniscope-v4/camera.bonsai create mode 100644 workflows/hardware/ucla-miniscope-v4/configuration.bonsai create mode 100644 workflows/hardware/ucla-miniscope-v4/memory-monitor.bonsai create mode 100644 workflows/hardware/ucla-miniscope-v4/port-status.bonsai create mode 100644 workflows/hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai diff --git a/articles/getting-started/initialize-oni-context.md b/articles/getting-started/initialize-oni-context.md index 12755699..6ea327bb 100644 --- a/articles/getting-started/initialize-oni-context.md +++ b/articles/getting-started/initialize-oni-context.md @@ -3,7 +3,7 @@ uid: initialize-onicontext title: Initialize the ONI Context --- -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: +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 operator can then be added by either double-clicking it, or dragging and dropping the operator into the workflow. @@ -13,11 +13,11 @@ The [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) operator initializes t ![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**. +3. Hover over the image of the `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 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: +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) diff --git a/articles/getting-started/operator-types.md b/articles/getting-started/operator-types.md index c3c9e32c..fd5437b7 100644 --- a/articles/getting-started/operator-types.md +++ b/articles/getting-started/operator-types.md @@ -7,6 +7,6 @@ In Bonsai, a "workflow" is composed of ["operators"](https://bonsai-rx.org/docs/ | Operator Type | Description | Example ONIX operators | | --------- | ----------- | ------------------ | -| Source | Generate acquisition state or hardware data | [`CreateContext`](xref:OpenEphys.Onix1.CreateContext), [`Bno055Data`](xref:OpenEphys.Onix1.Bno055Data), [`NeuropixelsV1eData`](xref:OpenEphys.Onix1.NeuropixelsV1eData) | -| Sink | Configure and send data to hardware | [`ConfigureHeadstage64`](xref:OpenEphys.Onix1.ConfigureHeadstage64), [`ConfigureNeuropixelsV1eHeadstage`](xref:OpenEphys.Onix1.ConfigureNeuropixelsV1eHeadstage) | -| Combinator | Manage control flow | [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) | +| Source | Generate acquisition state or hardware data | [CreateContext](xref:OpenEphys.Onix1.CreateContext), [Bno055Data](xref:OpenEphys.Onix1.Bno055Data), [NeuropixelsV1eData](xref:OpenEphys.Onix1.NeuropixelsV1eData) | +| Sink | Configure and send data to hardware | [ConfigureHeadstage64](xref:OpenEphys.Onix1.ConfigureHeadstage64), [ConfigureNeuropixelsV1eHeadstage](xref:OpenEphys.Onix1.ConfigureNeuropixelsV1eHeadstage) | +| Combinator | Manage control flow | [StartAcquisition](xref:OpenEphys.Onix1.StartAcquisition) | diff --git a/articles/getting-started/tips-tricks.md b/articles/getting-started/tips-tricks.md index f08117f0..2ea672b9 100644 --- a/articles/getting-started/tips-tricks.md +++ b/articles/getting-started/tips-tricks.md @@ -20,7 +20,7 @@ Aside from determining the order of execution, the order of operators within a w | Change order of operators in a row | Hold **Ctrl**, click and hold the first operator, drag to the right to the second operator, and release | This action does not require that the operator be selected prior to performing the action. This can change the order of any two operators that are a part of the same row; it is not constrained to adjacent operators. Note that if the new placement of the operators is not valid (such as giving a `Source` operator an input), it will knock the operator of the current row and remove any connections | > [!Note] -> In the context of `OpenEphys.Onix1`, all workflows start with (top line) a [`CreateContext`](xref:OpenEphys.Onix1.CreateContext) operator connected to an arbitrary number of `Configure*` operators, finished with a [`StartAcquisition`](xref:OpenEphys.Onix1.StartAcquisition) operator. Subsequent rows will contain the corresponding `*Data` operators for capturing data from the hardware has been configured above. +> In the context of `OpenEphys.Onix1`, all workflows start with (top line) a [CreateContext](xref:OpenEphys.Onix1.CreateContext) operator connected to an arbitrary number of `Configure*` operators, finished with a [StartAcquisition](xref:OpenEphys.Onix1.StartAcquisition) operator. Subsequent rows will contain the corresponding `*Data` operators for capturing data from the hardware has been configured above.
diff --git a/articles/hardware/breakout/analog-io.md b/articles/hardware/breakout/analog-io.md index b73cb24b..6356c230 100644 --- a/articles/hardware/breakout/analog-io.md +++ b/articles/hardware/breakout/analog-io.md @@ -73,32 +73,30 @@ does exactly this on analog IO channel 0. ::: The operator receives a sequence of -s. In the Breakout Board example workflow: +s with the following properties settings: -- The `AnalogInput`'s `DeviceName` is set to "BreakoutBoard/AnalogIO". This links the `AnalogInput` - operator to the corresponding configuration operator. -- The `AnalogInput`'s `BufferSize` is set to 50. Therefore, each frame will contain a 50-element +- `BufferSize` is set to 50. Therefore, each frame will contain a 50-element `Clock` vector and a 12-channel x 50-sample `AnalogData` matrix. The analog inputs are sampled at 100 kHz per channel so this corresponds to 500 µs of data. That's lower than the minimal latency introduced by the `BlockReadSize` setting. Therefore, the chosen value for `BufferSize` will not impose a significant effect on processing latency. The buffer will be filled essentially every time hardware is accessed and propagated instantly. -- The `AnalogInput`'s `DataType` is set to `Volts`. This means that samples will be represented as +- `DataType` is set to `Volts`. This means that samples will be represented as units of units of voltage in a single-precision floating point type. +- `DeviceName` is set to "BreakoutBoard/AnalogIO". This links the `AnalogInput` + operator to the corresponding configuration operator. -The [MemberSelector](https://bonsai-rx.org/docs/api/Bonsai.Expressions.MemberSelectorBuilder.html) +The [MemberSelector](xref:Bonsai.Expressions.MemberSelectorBuilder) operators each select a member from the `AnalogInputDataFrame`, `Clock` and `AnalogData` which contain the -based sample times and sample values, respectively. The -[MatrixWriter](https://bonsai-rx.org/docs/api/Bonsai.Dsp.MatrixWriter.html) operators saves the +[MatrixWriter](xref:Bonsai.Dsp.MatrixWriter) operators saves the selected members to files with the following format: `analog-clock_.raw` and `analog-data_.raw`, respectively. > [!Tip] -> The easiest way to add a -> [MemberSelector](https://bonsai-rx.org/docs/api/Bonsai.Expressions.MemberSelectorBuilder.html) to -> the output of an operator is to right-click the node and hover over `Output` in the resulting -> context menu to examine the output type. A MemberSelector can be added by +> The easiest way to add a `MemberSelector` to the output of an operator is to right-click the node and hover over +> `Output` in the resulting context menu to examine the output type. A MemberSelector can be added by > left-clicking the desired expanded property of the `Output` type. > > ![Add a MemberSelector](../../../images/hardware/breakout/add-member-selector.gif){width=600px,align=center} diff --git a/articles/hardware/breakout/configuration.md b/articles/hardware/breakout/configuration.md index 8c740806..11b0d276 100644 --- a/articles/hardware/breakout/configuration.md +++ b/articles/hardware/breakout/configuration.md @@ -7,7 +7,6 @@ operator: ConfigureBreakoutBoard dataRate: 2.5 timeUntilFullBuffer: 800 μs blockReadSize: 2048 -videoCaption: workflowLocation: workflow --- diff --git a/articles/hardware/breakout/digital-inputs.md b/articles/hardware/breakout/digital-inputs.md index 5f67cab1..cd7e0dfe 100644 --- a/articles/hardware/breakout/digital-inputs.md +++ b/articles/hardware/breakout/digital-inputs.md @@ -6,12 +6,28 @@ device: digital inputs videoCaption: This visualizes digital input data using Bonsai visualizers. The "Buttons" window shows which buttons are being pressed. The "HasFlags" window shows whether or not certain button are being pressed (in the case of the breakout board example workflow, "Triangle" or "X"). These visualizers correspond to actual button presses which are demonstrated by the bottom-right breakout board inset. --- -The following excerpt from the Breakout Board [example workflow](xref:breakout_workflow) demonstrates digital inputs functionality by responding to button presses and saves digital inputs data. +The following excerpt from the Breakout Board [example workflow](xref:breakout_workflow) demonstrates digital inputs +functionality by responding to button presses and saves digital inputs data. ::: workflow ![/workflows/hardware/breakout/digital-inputs.bonsai workflow](../../../workflows/hardware/breakout/digital-inputs.bonsai) ::: -The operator generates a sequence of s. Although the digital inputs are sampled at 4 Mhz, these data frames are only emitted when the port status changes (i.e., when a pin, button, or switch is toggled). The digital input ports on the Breakout Board operate at a 3.3V logic levels but are also 5V tolerant. In the Breakout Board example workflow, the `DigitalInput`'s `DeviceName` property is set to "BreakoutBoard/DigitalInput". This links the `DigitalInput` operator to the corresponding configuration operator. +The operator generates a sequence of s. +Although the digital inputs are sampled at 4 Mhz, these data frames are only emitted when the port status changes (i.e., +when a pin, button, or switch is toggled). The digital input ports on the Breakout Board operate at a 3.3V logic levels +but are also 5V tolerant. In the Breakout Board example workflow, the `DigitalInput`'s `DeviceName` property is set to +"BreakoutBoard/DigitalInput". This links the `DigitalInput` operator to the corresponding configuration operator. -The [CsvWriter](https://bonsai-rx.org/docs/api/Bonsai.IO.CsvWriter.html) operator writes the `Clock`, `DigitalInputs`, and `Buttons` members from the `DigitalInputDataFrame` to a file with the following name format: `digital-input_.csv`. Because `CsvWriter` is a _sink_ operator, its output sequence is equivalent to its input sequence. In other words, its output is equivalent to `DigitalInput`'s output. Therefore, it's possible to use [MemberSelector](https://bonsai-rx.org/docs/api/Bonsai.Expressions.MemberSelectorBuilder.html) operators on the `CsvWriter` to select members from `DigitalInputDataFrame`. This is most easily performed by clicking the relevant members that appear by hovering over the "Output" option that appears in the context menu that appears after right-clicking the `CsvWriter` node. The members selected in the workflow, and , are enumerators with values that correspond to bit positions of the breakout board's digital ports. When `DigitalPortState` or `OpenEphys.Onix1.BreakoutButtonState` is connected to a `HasFlags` operator, the names that appear in the `HasFlags`'s `Value` property's dropdown menu correspond to bit positions in the respective digital input port. In this workflow, the top `HasFlags` operator checks if `Triangle` or `X` are `True`. \ No newline at end of file +The [CsvWriter](xref:Bonsai.IO.CsvWriter) operator writes the `Clock`, `DigitalInputs`, and `Buttons` members from the +`DigitalInputDataFrame` to a file with the following name format: `digital-input_.csv`. Because `CsvWriter` +is a _sink_ operator, its output sequence is equivalent to its input sequence. In other words, its output is equivalent +to `DigitalInput`'s output. Therefore, it's possible to use +[MemberSelector](xref:Bonsai.Expressions.MemberSelectorBuilder) operators on the `CsvWriter` to select members from +`DigitalInputDataFrame`. This is most easily performed by clicking the relevant members that appear by hovering over the +"Output" option that appears in the context menu that appears after right-clicking the `CsvWriter` node. The members +selected in the workflow, and , are +enumerators with values that correspond to bit positions of the breakout board's digital ports. When `DigitalPortState` +or `OpenEphys.Onix1.BreakoutButtonState` is connected to a `HasFlags` operator, the names that appear in the +`HasFlags`'s `Value` property's dropdown menu correspond to bit positions in the respective digital input port. In this +workflow, the top `HasFlags` operator checks if `Triangle` or `X` are `True`. \ No newline at end of file diff --git a/articles/hardware/breakout/digital-outputs.md b/articles/hardware/breakout/digital-outputs.md index df00681c..29864b96 100644 --- a/articles/hardware/breakout/digital-outputs.md +++ b/articles/hardware/breakout/digital-outputs.md @@ -20,11 +20,11 @@ outputting that counter to the digital output port. ![/workflows/hardware/breakout/digital-outputs.bonsai workflow](../../../workflows/hardware/breakout/digital-outputs.bonsai) ::: -The [Timer](https://bonsai-rx.org/docs/api/Bonsai.Shaders.Timer.html) operator generates a sequence +The [Timer](xref:Bonsai.Shaders.Timer) operator generates a sequence of [64-bit signed integer](https://learn.microsoft.com/en-us/dotnet/api/system.int64?view=net-8.0)s -in ~100ms intervals. The [Int](https://bonsai-rx.org/docs/api/Bonsai.Expressions.IntProperty.html) +in ~100ms intervals. The [Int](xref:Bonsai.Expressions.IntProperty) operator emits an integer (with a value of 1 in our case) when an item is received from the upstream -sequence. The [Accumulate](https://bonsai-rx.org/docs/api/Bonsai.Reactive.Accumulate.html) operator +sequence. The [Accumulate](xref:Bonsai.Reactive.Accumulate) operator increments a value by the values of items in its upstream sequence. The `Accumulate` operator emits this value when an item is received from the upstream sequence. diff --git a/articles/hardware/breakout/heartbeat.md b/articles/hardware/breakout/heartbeat.md index cc7b8609..b89d4d58 100644 --- a/articles/hardware/breakout/heartbeat.md +++ b/articles/hardware/breakout/heartbeat.md @@ -21,6 +21,6 @@ The operator generates a sequence of interval defined during using the 's `Heartbeat BeatsPerSecond` property (in our case 10 Hz). The `HeartbeatData`'s `DeviceName` property is set to "BreakoutBoard/Heartbeat". This links the `HeartbeatData` operator to the corresponding configuration operator. The -[MemberSelector](https://bonsai-rx.org/docs/api/Bonsai.Expressions.MemberSelectorBuilder.html) operator selects the +[MemberSelector](xref:Bonsai.Expressions.MemberSelectorBuilder) operator selects the `Clock` member from the `HeartbeatDataFrame` so the user can visualize the number of clock cycles that have passed for a given heartbeat pulse if they double-click the `Clock` node. \ No newline at end of file diff --git a/articles/hardware/breakout/memory-monitor.md b/articles/hardware/breakout/memory-monitor.md index b48e2956..5529d4f4 100644 --- a/articles/hardware/breakout/memory-monitor.md +++ b/articles/hardware/breakout/memory-monitor.md @@ -3,6 +3,5 @@ uid: breakout_memory-monitor title: Memory Monitor memoryMonitor: true hardware: Breakout Board -hardwareOperator: BreakoutBoard -workflowDirectory: breakout/workflow +workflowLocation: workflow --- diff --git a/articles/hardware/hs64/bno055.md b/articles/hardware/hs64/bno055.md index 18070825..fa72cb9e 100644 --- a/articles/hardware/hs64/bno055.md +++ b/articles/hardware/hs64/bno055.md @@ -5,5 +5,5 @@ bno055: true hardware: Headstage 64 bnoOperator: Bno055Data hardwareOperator: Headstage64 -workflowDirectory: hs64/workflow +workflowLocation: workflow --- diff --git a/articles/hardware/hs64/configuration.md b/articles/hardware/hs64/configuration.md index 41fbb505..71b41f95 100644 --- a/articles/hardware/hs64/configuration.md +++ b/articles/hardware/hs64/configuration.md @@ -5,8 +5,8 @@ hardware: Headstage64 configuration: true operator: ConfigureHeadstage64 dataRate: 4.1 -timeUntilFullBuffer: 500 μs -blockReadSize: 2048 +timeUntilFullBuffer: 1000 μs +blockReadSize: 4096 workflowLocation: workflow --- diff --git a/articles/hardware/hs64/memory-monitor.md b/articles/hardware/hs64/memory-monitor.md index 9daf24be..feb1f191 100644 --- a/articles/hardware/hs64/memory-monitor.md +++ b/articles/hardware/hs64/memory-monitor.md @@ -3,6 +3,5 @@ uid: hs64_memory-monitor title: Memory Monitor memoryMonitor: true hardware: Headstage 64 -hardwareOperator: Headstage64 -workflowDirectory: hs64/workflow +workflowLocation: workflow --- diff --git a/articles/hardware/hs64/port-status.md b/articles/hardware/hs64/port-status.md index 64c20c5b..c73a2f08 100644 --- a/articles/hardware/hs64/port-status.md +++ b/articles/hardware/hs64/port-status.md @@ -5,6 +5,6 @@ hardware: Headstage 64 portStatus: true configureHardwareOperator: ConfigureHeadstage64 hardwareOperator: Headstage64 -workflowDirectory: hs64/workflow +workflowLocation: workflow --- diff --git a/articles/hardware/hs64/rhd2164.md b/articles/hardware/hs64/rhd2164.md index 96d18e16..4d7d3c6f 100644 --- a/articles/hardware/hs64/rhd2164.md +++ b/articles/hardware/hs64/rhd2164.md @@ -9,8 +9,16 @@ The following excerpt from the Headstage64 [example workflow](xref:hs64_hs64) de ![/workflows/hardware/hs64/rhd2164.bonsai workflow](../../../workflows/hardware/hs64/rhd2164.bonsai) ::: -The operator generates a sequence of s using the following settings: -- `BufferSize` is set to 30. Each `Rhd2164DataFrame` will contain a [1 x 30 sample] `Clock` vector, a [64 channel x 30 sample] `AmplifierData` matrix, and a [3 channel x 30 sample] `AuxData` matrix. This corresponds to 1.2 ms of data per data frame. -- The `Headstage64Data`'s `DeviceName` property is set to "Headstage64/Rhd2164". This links the `Rhd2164Data` operator to the corresponding configuration operator. +The operator generates a sequence of s using +the following properties settings: +- `BufferSize` is set to 30. Each `Rhd2164DataFrame` will contain a [1 x 30 sample] `Clock` vector, a [64 channel x 30 + sample] `AmplifierData` matrix, and a [3 channel x 30 sample] `AuxData` matrix. This corresponds to 1 ms of data per + data frame. +- `DeviceName` is set to "Headstage64/Rhd2164". This links the `Rhd2164Data` operator + to the corresponding configuration operator. -The relevant properties are extracted from the `Rhd2164DataFrame` by right-clicking the `Rhd2164Data` operator, and choosing the following **Output** members: `Clock`, `AmplifierData`, and `AuxData`. The [`MatrixWriter`](https://bonsai-rx.org/docs/api/Bonsai.Dsp.MatrixWriter.html) operators saves the selected members to files with the following format: `rhd2164-clock_.raw`, `rhd2164-amplifier_.raw`, and `rhd2164-aux_.raw`, respectively. \ No newline at end of file +The relevant members are selected from the `Rhd2164DataFrame` by right-clicking the `Rhd2164Data` operator and +choosing the following Output members: `Clock`, `AmplifierData`, and `AuxData`. The +[MatrixWriter](xref:Bonsai.Dsp.MatrixWriter) operators saves the selected members to +files with the following format: `rhd2164-clock_.raw`, `rhd2164-amplifier_.raw`, and +`rhd2164-aux_.raw`, respectively. \ No newline at end of file diff --git a/articles/hardware/hs64/ts4231.md b/articles/hardware/hs64/ts4231.md index 92639d6a..2f9818e2 100644 --- a/articles/hardware/hs64/ts4231.md +++ b/articles/hardware/hs64/ts4231.md @@ -20,11 +20,11 @@ sampling cycle. Of course, if occlusions cause receivers to miss optical signals The `TS4231V1PositionData`'s `DeviceName` property is set to "Headstage64/TS4231V1". This links the `TS4231V1PositionData` operator to the corresponding configuration operator. -The [CsvWriter](https://bonsai-rx.org/docs/api/Bonsai.IO.CsvWriter.html) operator writes the `Clock`, and `Position` +The [CsvWriter](xref:Bonsai.IO.CsvWriter) operator writes the `Clock`, and `Position` members from the `TS4231V1PositionDataFrame` to a file with the following name format: `ts4231v1__.csv`. Because `CsvWriter` is a _sink_ operator, its output sequence is equivalent to its input sequence. In other words, its output is equivalent to `TS4231V1PositionData`'s output. Therefore, it's possible to use -[MemberSelector](https://bonsai-rx.org/docs/api/Bonsai.Expressions.MemberSelectorBuilder.html) operators on the +[MemberSelector](xref:Bonsai.Expressions.MemberSelectorBuilder) operators on the `CsvWriter` to select members from `TS4231V1PositionDataFrame`. This is most easily performed by clicking the relevant members that appear by hovering over the "Output" option that appears in the context menu that appears after right-clicking the `CsvWriter` node. The member is selected in diff --git a/articles/hardware/np1e/bno055.md b/articles/hardware/np1e/bno055.md index d3514932..bf2558c0 100644 --- a/articles/hardware/np1e/bno055.md +++ b/articles/hardware/np1e/bno055.md @@ -5,5 +5,5 @@ bno055: true hardware: NeuropixelsV1e Headstage bnoOperator: PolledBno055Data hardwareOperator: NeuropixelsV1eHeadstage -workflowDirectory: np1e/overview +workflowLocation: overview --- diff --git a/articles/hardware/np1e/configuration.md b/articles/hardware/np1e/configuration.md index d13fbc32..1df75508 100644 --- a/articles/hardware/np1e/configuration.md +++ b/articles/hardware/np1e/configuration.md @@ -5,8 +5,8 @@ hardware: NeuropixelsV1e Headstage configuration: true operator: ConfigureNeuropixelsV1eHeadstage dataRate: 20.6 -timeUntilFullBuffer: 200 μs -blockReadSize: 4096 +timeUntilFullBuffer: 400 μs +blockReadSize: 8192 workflowLocation: overview --- diff --git a/articles/hardware/np1e/memory-monitor.md b/articles/hardware/np1e/memory-monitor.md index 8d870a7a..075ef25e 100644 --- a/articles/hardware/np1e/memory-monitor.md +++ b/articles/hardware/np1e/memory-monitor.md @@ -3,6 +3,5 @@ uid: np1e_memory-monitor title: Memory Monitor memoryMonitor: true hardware: Neuropixels v1e Headstage -hardwareOperator: NeuropixelsV1eHeadstage -workflowDirectory: np1e/overview +workflowLocation: overview --- \ No newline at end of file diff --git a/articles/hardware/np1e/np1.md b/articles/hardware/np1e/np1.md index 06fa72ef..0a925862 100644 --- a/articles/hardware/np1e/np1.md +++ b/articles/hardware/np1e/np1.md @@ -4,18 +4,28 @@ title: NeuropixelsV1e Headstage Neuropixels 1.0 Probe hardware: NeuropixelsV1e Headstage --- -The following excerpt from the NeuropixelsV1e Headstage [example workflow](xref:np1e) demonstrates Neuropixels 1.0 probe functionality by streaming and saving probe data. +The following excerpt from the NeuropixelsV1e Headstage [example workflow](xref:np1e) demonstrates Neuropixels 1.0 probe +functionality by streaming and saving probe data. ::: workflow ![/workflows/hardware/np1e/np1.bonsai workflow](../../../workflows/hardware/np1e/np1.bonsai) ::: -The operator generates a sequence of s using the following settings: -- `BufferSize` is set to 36. -- The `NeuropixelsV1eData`'s `DeviceName` property is set to "NeuropixelsV1eHeadstage/NeuropixelsV1e". This links the operator to the corresponding configuration operator. +The operator generates a sequence of +s using the following properties settings: +- `BufferSize` is set to 36. Therefore, each frame will contain a [1 x 36 sample] `Clock` vector, a [384 + channel x 36 sample] `SpikeData` matrix, and a [384 channel x 3 sample] `LfpData` matrix. The Neuropixels 1.0 probe + samples AP data at 30 kHz per channel (LFP data is sampled at a rate of 1/12 of the rate AP data) so this corresponds + to 1.2 ms of data. +- `DeviceName` is set to "NeuropixelsV1eHeadstage/NeuropixelsV1e". This links the `NeuropixelsV1eData` operator to the + corresponding configuration operator. -Given the settings above, each frame will contain a [1 x 36 sample] `Clock` vector, a [384 channel x - 36 sample] `SpikeData` matrix, and a [384 channel x 3 sample] `LfpData` matrix. This corresponds to 1.2 ms of data per data frame. - `LfpData` has less samples than `Clock` and `SpikeData` because `LfpData` is sampled at a lower rate; AP data is sampled at 30 kHz while LFP data is sampled at 2.5 kHz. +Given the settings above, each frame will contain a [1 x 36 sample] `Clock` vector, a [384 channel x 36 sample] +`SpikeData` matrix, and a [384 channel x 3 sample] `LfpData` matrix. This corresponds to 1.2 ms of data per data +frame. `LfpData` has less samples than `Clock` and `SpikeData` because `LfpData` is sampled at a lower rate; AP data +is sampled at 30 kHz while LFP data is sampled at 2.5 kHz. -The relevant properties are extracted from the by right-clicking the operator, and choosing the following **Output** members: `Clock`, `SpikeData`, and `LfpData`. The [`MatrixWriter`](https://bonsai-rx.org/docs/api/Bonsai.Dsp.MatrixWriter.html) operators saves the selected members to files with the following format: `np1-clock_.raw`, `np1-spike_.raw`, and `np1-lfp_.raw`, respectively. +The relevant members are selected from the `NeuropixelsV1DataFrame` by right-clicking the `NeuropixelsV1eData` operator +and choosing the following Output members: `Clock`, `SpikeData`, and `LfpData`. The +[MatrixWriter](xref:Bonsai.Dsp.MatrixWriter) operators save the selected members to files with the following format: +`np1-clock_.raw`, `np1-spike_.raw`, and `np1-lfp_.raw`, respectively. diff --git a/articles/hardware/np1e/port-status.md b/articles/hardware/np1e/port-status.md index 4997424a..27ae492e 100644 --- a/articles/hardware/np1e/port-status.md +++ b/articles/hardware/np1e/port-status.md @@ -5,5 +5,5 @@ hardware: NeuropixelsV1e Headstage portStatus: true configureHardwareOperator: ConfigureNeuropixelsV1eHeadstage hardwareOperator: NeuropixelsV1eHeadstage -workflowDirectory: np1e/overview +workflowLocation: overview --- diff --git a/articles/hardware/np2e/bno055.md b/articles/hardware/np2e/bno055.md index 3f20dfb9..c38397ce 100644 --- a/articles/hardware/np2e/bno055.md +++ b/articles/hardware/np2e/bno055.md @@ -5,5 +5,5 @@ bno055: true hardware: NeuropixelsV2e Headstage bnoOperator: PolledBno055Data hardwareOperator: NeuropixelsV2eHeadstage -workflowDirectory: np2e/overview +workflowLocation: overview --- diff --git a/articles/hardware/np2e/configuration.md b/articles/hardware/np2e/configuration.md index 6aebeca7..76c273b8 100644 --- a/articles/hardware/np2e/configuration.md +++ b/articles/hardware/np2e/configuration.md @@ -5,8 +5,8 @@ hardware: NeuropixelsV2e Headstage configuration: true operator: ConfigureNeuropixelsV2eHeadstage dataRate: 18.1 -timeUntilFullBuffer: 220 μs -blockReadSize: 4096 +timeUntilFullBuffer: 440 μs +blockReadSize: 8192 workflowLocation: overview --- diff --git a/articles/hardware/np2e/memory-monitor.md b/articles/hardware/np2e/memory-monitor.md index 52a5f566..13d837e3 100644 --- a/articles/hardware/np2e/memory-monitor.md +++ b/articles/hardware/np2e/memory-monitor.md @@ -3,6 +3,5 @@ uid: np2e_memory-monitor title: Memory Monitor memoryMonitor: true hardware: Neuropixels V2e Headstage -hardwareOperator: NeuropixelsV2eHeadstage -workflowDirectory: np2e/overview +workflowLocation: overview --- \ No newline at end of file diff --git a/articles/hardware/np2e/np2.md b/articles/hardware/np2e/np2.md index f1a41a7f..417afd24 100644 --- a/articles/hardware/np2e/np2.md +++ b/articles/hardware/np2e/np2.md @@ -4,20 +4,31 @@ title: NeuropixelsV2e Headstage Neuropixels 2.0 Probe(s) hardware: NeuropixelsV2e Headstage --- -> [!NOTE] -> The NeuropixelsV2eBeta Headstage functions nearly identically to the NeuropixelsV2e Headstage. Simply replace `NeuropixelsV2eData` with `NeuropixelsV2eBetaData` and set its `DeviceName` property to "NeuropixelsV2eBetaHeadstage/NeuropixelsV2eBeta". +> [!NOTE] +> The NeuropixelsV2eBeta Headstage functions nearly identically to the NeuropixelsV2e Headstage. Simply replace +> `NeuropixelsV2eData` with `NeuropixelsV2eBetaData` and set its `DeviceName` property to +> "NeuropixelsV2eBetaHeadstage/NeuropixelsV2eBeta". -The following excerpt from the NeuropixelsV2e Headstage [example workflow](xref:np2e) demonstrates Neuropixels 2.0 probe functionality by streaming data and saves Neuropixels 2.0 probe data. The second chain is disabled by default, assuming that only one probe is connected to the headstage. If two probes are connected, the second `NeuropixelsV2eData` chain can be enabled to stream data from both probes simultaneously. To enable, select all nodes in the disabled chain and press Ctrl+Shift+D, or click `Enable` right-clicking the selected nodes. +The following excerpt from the NeuropixelsV2e Headstage [example workflow](xref:np2e) demonstrates Neuropixels 2.0 probe +functionality by streaming data and saves Neuropixels 2.0 probe data. The second chain is disabled by default, assuming +that only one probe is connected to the headstage. If two probes are connected, the second `NeuropixelsV2eData` chain +can be enabled to stream data from both probes simultaneously. To enable, select all nodes in the disabled chain and +press Ctrl+Shift+D, or click `Enable` right-clicking the selected nodes. ::: workflow ![/workflows/hardware/np2e/np2.bonsai workflow](../../../workflows/hardware/np2e/np2.bonsai) ::: -The operator generates a sequence of s. In the NeuropixelsV2e Headstage example workflow, -- `BufferSize` is set to 30. Therefore, each frame will contain a [1 x 30 sample] `Clock` vector and a [384 channel x - 30 sample] `AmplifierData` matrix. The Neuropixels 2.0 probe samples at 30 kHz per channel so this - corresponds to 1 ms of data. -- `DeviceName` property is set to "NeuropixelsV2eHeadstage/NeuropixelsV2e". This links the `NeuropixelsV2eData` operator to the corresponding configuration operator. -- `ProbeIndex` property is set to "ProbeA". This links the data generated by this probe to the probe in port A of the headstage. +The operator generates a sequence of +s using the following properties settings: +- `BufferSize` is set to 30. Therefore, each frame will contain a [1 x 30 sample] `Clock` vector and a [384 channel x 30 + sample] `AmplifierData` matrix. The Neuropixels 2.0 probe samples at 30 kHz per channel so this corresponds to 1 ms of + data. +- `DeviceName` is set to "NeuropixelsV2eHeadstage/NeuropixelsV2e". This links the `NeuropixelsV2eData` operator to the + corresponding configuration operator. +- `ProbeIndex` is set to "ProbeA". This links the data generated by this probe to the probe in port A of the headstage. -The relevant properties are extracted from the by right-clicking the operator, and choosing the following **Output** members: `Clock`, and `AmplifierData`. The [`MatrixWriter`](https://bonsai-rx.org/docs/api/Bonsai.Dsp.MatrixWriter.html) operators saves the selected members to files with the following format: `np2-a-clock_.raw` and `np2-a-amp.raw`, respectively. +The relevant properties are selected from the `NeuropixelsV2eDataFrame` by right-clicking the `NeuropixelsV2eData` +operator and choosing the following Output members: `Clock`, and `AmplifierData`. The +[MatrixWriter](xref:Bonsai.Dsp.MatrixWriter) operators save the selected members to +files with the following format: `np2-a-clock_.raw` and `np2-a-amp.raw`, respectively. diff --git a/articles/hardware/np2e/port-status.md b/articles/hardware/np2e/port-status.md index 1f141b7f..e04c088d 100644 --- a/articles/hardware/np2e/port-status.md +++ b/articles/hardware/np2e/port-status.md @@ -5,7 +5,7 @@ hardware: NeuropixelsV2e Headstage portStatus: true configureHardwareOperator: ConfigureNeuropixelsV2eHeadstage hardwareOperator: NeuropixelsV2eHeadstage -workflowDirectory: np2e/overview +workflowLocation: overview --- > [!NOTE] diff --git a/articles/hardware/ucla-miniscope-v4/bno055.md b/articles/hardware/ucla-miniscope-v4/bno055.md new file mode 100644 index 00000000..8f003aea --- /dev/null +++ b/articles/hardware/ucla-miniscope-v4/bno055.md @@ -0,0 +1,9 @@ +--- +uid: ucla-miniscope-v4_bno055 +title: UCLA Miniscope v4 Bno055 +bno055: true +hardware: UCLA Miniscope v4 +bnoOperator: PolledBno055Data +hardwareOperator: UclaMiniscopeV4 +workflowLocation: overview +--- diff --git a/articles/hardware/ucla-miniscope-v4/camera.md b/articles/hardware/ucla-miniscope-v4/camera.md new file mode 100644 index 00000000..bc0e6922 --- /dev/null +++ b/articles/hardware/ucla-miniscope-v4/camera.md @@ -0,0 +1,29 @@ +--- +uid: ucla-miniscope-v4_camera +title: UCLA Miniscope v4 Camera Data +--- + +The following excerpt from the UCLA Miniscope v4 [example workflow](xref:ucla-miniscope-v4) demonstrates the UCLA +Miniscope v4 camera-related functionality by streaming and saving data from the UCLA Miniscope v4 camera and allowing +the user to dynamically modifying camera parameters. + +::: workflow +![/workflows/hardware/ucla-miniscope-v4/camera.bonsai workflow](../../../workflows/hardware/ucla-miniscope-v4/camera.bonsai) +::: + +The operator generates a sequence of +s using the following properties settings: +- `DataType` is set to "U8". This sets the bit depth of each pixel in the image to eight (instead of ten if `DataType` + is set to "U10") +- `DeviceName` is set to "UclaMiniscopeV4/UclaMiniscopeV4". This links the `UclaMiniscopeV4CameraData` operator to the + corresponding configuration operator. + +The relevant members are selected from the `UclaMiniscopeV4CameraFrame` by right-clicking the +`UclaMiniscopeV4CameraData` operator and choosing the following Output members: `Camera`, and `Clock`. The +[VideoWriter](xref:Bonsai.Vision.VideoWriter) saves the `Camera` to a files with the following format: +`ucla-miniscope-v4-video_.avi` with "GREY" FourCC. The [MatrixWriter](xref:Bonsai.Dsp.MatrixWriter) saves the `Clock` to a +files with the following format: `ucla-miniscope-v4-clock_.raw`. + +Try adjusting the `FrameRate`, `SensorGain`, `LEDBrightness`, and `LiquidLensVoltage` properties while the workflow is +running and observing the camera data. Follow our guide if you are not sure how to observe the +camera data. \ No newline at end of file diff --git a/articles/hardware/ucla-miniscope-v4/configuration.md b/articles/hardware/ucla-miniscope-v4/configuration.md new file mode 100644 index 00000000..ae73b61c --- /dev/null +++ b/articles/hardware/ucla-miniscope-v4/configuration.md @@ -0,0 +1,18 @@ +--- +uid: ucla-miniscope-v4_configuration +title: UCLA Miniscope v4 Configuration +hardware: UCLA Miniscope v4 +configuration: true +operator: ConfigureUclaMiniscopeV4 +dataRate: 11.1 +timeUntilFullBuffer: 740 μs +blockReadSize: 8192 +workflowLocation: overview +--- + +## Configuring the UCLA Miniscope v4 +The `UclaMiniscopeV4` operator is set to configure the UCLA Miniscope v4; this can enable streaming of video data from a +Python480 sensor and orientation data from a Bno055 IMU. This is accomplished in the UCLA Miniscope v4 example workflow by +leaving all of the `UclaMiniscopeV4` properties set to their default values. + +[!INCLUDE [timestamp-info](../../../includes/configuration-timestamp.md)] \ No newline at end of file diff --git a/articles/hardware/ucla-miniscope-v4/memory-monitor.md b/articles/hardware/ucla-miniscope-v4/memory-monitor.md new file mode 100644 index 00000000..e16b378b --- /dev/null +++ b/articles/hardware/ucla-miniscope-v4/memory-monitor.md @@ -0,0 +1,8 @@ +--- +uid: ucla-miniscope-v4_memory-monitor +title: Memory Monitor +memoryMonitor: true +hardware: UCLA Miniscope v4 +workflowLocation: overview +--- + diff --git a/articles/hardware/ucla-miniscope-v4/overview.md b/articles/hardware/ucla-miniscope-v4/overview.md new file mode 100644 index 00000000..73273706 --- /dev/null +++ b/articles/hardware/ucla-miniscope-v4/overview.md @@ -0,0 +1,30 @@ +--- +uid: ucla-miniscope-v4 +title: UCLA Miniscope v4 +--- + +These are the devices available on the UCLA Miniscope v4: + +- [UCLA Miniscope v4 Camera System](xref:ucla-miniscope-v4_camera) camera sensor: + - 0.48 Megapixel CMOS 8-bit or 10-bit image sensor (608 x 608 pixels) data + - Python480 sensor for dynamic adjustment of frame rate in discrete increments: 10, 15, 20, 25 or 30 fps + - Python480 sensor for dynamic adjustment of exposure in three discrete levels + - ETL for dynamic and continuous ~500 µm adjustment of imaging depth with off-the-shelf lens configuration + - LED driver for dynamic and continuous adjustment of excitation light intensity +- [Bno055](xref:ucla-miniscope-v4_bno055): 9-axis IMU for real-time, 3D orientation tracking updated at the same frame + rate as the camera + +> [!TIP] +> Visit the [UCLA Miniscope v4 Hardware Guide](https://open-ephys.github.io/miniscope-docs/ucla-miniscope-v4/index.html) to learn more about the hardware such as weight, dimensions, and proper power voltages. + +The example workflow below can by copy/pasted into the Bonsai editor using the clipboard icon in the top right. This workflow: +- Captures image data from the UCLA Miniscope v4 Camera System and saves it to disk. +- Captures orientation data from the Bno055 IMU and saves it to disk. +- Monitors the UCLA Miniscope v4 port status. +- Automatically commutates the tether if there is a proper commutator connection. + +::: workflow +![/workflows/hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai workflow](../../../workflows/hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai) +::: + +The following pages in the UCLA Miniscope v4 Guide provide a breakdown of the above example workflow. \ No newline at end of file diff --git a/articles/hardware/ucla-miniscope-v4/port-status.md b/articles/hardware/ucla-miniscope-v4/port-status.md new file mode 100644 index 00000000..062ec0d2 --- /dev/null +++ b/articles/hardware/ucla-miniscope-v4/port-status.md @@ -0,0 +1,9 @@ +--- +uid: ucla-miniscope-v4_port-status +title: UCLA Miniscope v4 Port Status +hardware: UCLA Miniscope v4 +portStatus: true +configureHardwareOperator: ConfigureUclaMiniscopeV4 +hardwareOperator: UclaMiniscopeV4 +workflowLocation: overview +--- diff --git a/articles/toc.yml b/articles/toc.yml index b0bc80fe..cc38e2a9 100644 --- a/articles/toc.yml +++ b/articles/toc.yml @@ -82,3 +82,15 @@ - name: Memory Monitor href: hardware/hs64/memory-monitor.md - href: hardware/hs64/load-data.md + - href: hardware/ucla-miniscope-v4/overview.md + items: + - name: Configuration + href: hardware/ucla-miniscope-v4/configuration.md + - name: Port Status + href: hardware/ucla-miniscope-v4/port-status.md + - name: Camera Data + href: hardware/ucla-miniscope-v4/camera.md + - name: Orientation Data & Commutation + href: hardware/ucla-miniscope-v4/bno055.md + - name: Memory Monitor + href: hardware/ucla-miniscope-v4/memory-monitor.md \ No newline at end of file diff --git a/includes/configuration-timestamp.md b/includes/configuration-timestamp.md index eb7e2929..2e012baf 100644 --- a/includes/configuration-timestamp.md +++ b/includes/configuration-timestamp.md @@ -5,4 +5,4 @@ accomplished using a [TimeStamp](https://bonsai-rx.org/docs/api/Bonsai.Reactive. to capture the computer's wall clock time. This `Timestamp` is saved along with `ContextTask`'s properties (e.g., `AcquisitionClockHz`, `BlockReadSize`, `BlockWriteSize`) to a csv -file (`start-time_.csv`) when the the workflow is started. \ No newline at end of file +file (`start-time_.csv`) when the the workflow is started. \ No newline at end of file diff --git a/src/onix-bonsai-onix1 b/src/onix-bonsai-onix1 index 18dd66bc..a6c4f39f 160000 --- a/src/onix-bonsai-onix1 +++ b/src/onix-bonsai-onix1 @@ -1 +1 @@ -Subproject commit 18dd66bcf586edc00506209491035ecce7142739 +Subproject commit a6c4f39fd1e55f277ef2291a039914ff03c0aaf0 diff --git a/template/partials/hardware/bno055.tmpl.partial b/template/partials/hardware/bno055.tmpl.partial index 11f3078f..11579ff4 100644 --- a/template/partials/hardware/bno055.tmpl.partial +++ b/template/partials/hardware/bno055.tmpl.partial @@ -1,5 +1,5 @@

- The following excerpt from the {{{hardware}}} example workflow demonstrates Bno055 functionality, saves Bno055 data, and commutates the {{{hardware}}} if there is a proper commutator connection. + The following excerpt from the {{{hardware}}} example workflow demonstrates Bno055 functionality, saves Bno055 data, and commutates the {{{hardware}}} if there is a proper commutator connection.

@@ -20,5 +20,5 @@
NOTE
-

To remove automated commutation, simply delete the last node by selecting it and pressing Delete.

+

The AutoCommutator operator is included in the workflow by default because it is so commonly used with {{{hardware}}}. However, it is disabled for people without a commutator to be able to run the workflow. To enable it, select the node and press Ctrl + Shift + D or select "Enable" in the context menu that appears after right-clicking the node.

\ No newline at end of file diff --git a/template/partials/hardware/memoryMonitor.tmpl.partial b/template/partials/hardware/memoryMonitor.tmpl.partial index f91b1ee4..566fe9e8 100644 --- a/template/partials/hardware/memoryMonitor.tmpl.partial +++ b/template/partials/hardware/memoryMonitor.tmpl.partial @@ -1,5 +1,5 @@

- The following excerpt from the Breakout Board example workflow demonstrates + The following excerpt from the Breakout Board example workflow demonstrates memory monitor functionality.

diff --git a/template/partials/hardware/portStatus.tmpl.partial b/template/partials/hardware/portStatus.tmpl.partial index 2dfb1f3e..aa037613 100644 --- a/template/partials/hardware/portStatus.tmpl.partial +++ b/template/partials/hardware/portStatus.tmpl.partial @@ -2,7 +2,7 @@ The Onix system reports when a headstage port connection enters or leaves an aberrant state. Such aberrant states include loss of communication lock, detection of parity or CRC error, reception of a badly formatted packet, etc.. Knowing the time and type of a communication failure is a good first step to track down its cause. The following excerpt from the - {{{hardware}}} example + {{{hardware}}} example workflow demonstrates port status functionality and saves timestamped port status data.

diff --git a/workflows/hardware/np1e/configuration.bonsai b/workflows/hardware/np1e/configuration.bonsai index f466477d..11d9e7bc 100644 --- a/workflows/hardware/np1e/configuration.bonsai +++ b/workflows/hardware/np1e/configuration.bonsai @@ -109,7 +109,7 @@ - 4096 + 8192 2048 diff --git a/workflows/hardware/np1e/np1e.bonsai b/workflows/hardware/np1e/np1e.bonsai index 69ef5bf9..95e6602b 100644 --- a/workflows/hardware/np1e/np1e.bonsai +++ b/workflows/hardware/np1e/np1e.bonsai @@ -110,7 +110,7 @@ - 4096 + 8192 2048 diff --git a/workflows/hardware/np2e/configuration.bonsai b/workflows/hardware/np2e/configuration.bonsai index 3d03c92c..6acd4abc 100644 --- a/workflows/hardware/np2e/configuration.bonsai +++ b/workflows/hardware/np2e/configuration.bonsai @@ -110,7 +110,7 @@ - 4096 + 8192 2048 diff --git a/workflows/hardware/np2e/np2e.bonsai b/workflows/hardware/np2e/np2e.bonsai index efc5751b..5f4c8245 100644 --- a/workflows/hardware/np2e/np2e.bonsai +++ b/workflows/hardware/np2e/np2e.bonsai @@ -111,7 +111,7 @@ - 4096 + 8192 2048 diff --git a/workflows/hardware/ucla-miniscope-v4/bno055.bonsai b/workflows/hardware/ucla-miniscope-v4/bno055.bonsai new file mode 100644 index 00000000..1568dcb3 --- /dev/null +++ b/workflows/hardware/ucla-miniscope-v4/bno055.bonsai @@ -0,0 +1,44 @@ + + + + + + + UclaMiniscopeV4/PolledBno055 + All + + + + bno055_.csv + false + false + FileCount + false + Clock,EulerAngle,Quaternion,Acceleration,Gravity,Temperature + + + Quaternion + + + + + 0 + 0 + 1 + + true + COM4 + + + + + + + + + + \ No newline at end of file diff --git a/workflows/hardware/ucla-miniscope-v4/camera.bonsai b/workflows/hardware/ucla-miniscope-v4/camera.bonsai new file mode 100644 index 00000000..d8daf9e9 --- /dev/null +++ b/workflows/hardware/ucla-miniscope-v4/camera.bonsai @@ -0,0 +1,53 @@ + + + + + + + UclaMiniscopeV4/UclaMiniscopeV4 + U8 + + + + Image + + + + video_.avi + FileCount + true + false + GREY + 30 + + 0 + 0 + + NearestNeighbor + + + + Clock + + + + video-clock_.raw + FileCount + false + ColumnMajor + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/hardware/ucla-miniscope-v4/configuration.bonsai b/workflows/hardware/ucla-miniscope-v4/configuration.bonsai new file mode 100644 index 00000000..5e9df2ac --- /dev/null +++ b/workflows/hardware/ucla-miniscope-v4/configuration.bonsai @@ -0,0 +1,131 @@ + + + + + + + riffa + 0 + + + + + BreakoutBoard + + BreakoutBoard/Heartbeat + 0 + true + 10 + + + BreakoutBoard/AnalogIO + 6 + false + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + Input + Input + Input + Input + Input + Input + Input + Input + Input + Input + Input + Input + + + BreakoutBoard/DigitalIO + 7 + false + + + BreakoutBoard/OutputClock + 5 + false + 1000000 + 50 + 0 + + + BreakoutBoard/HarpSyncInput + 12 + false + Breakout + + + BreakoutBoard/MemoryMonitor + 10 + false + 10 + + + + + + UclaMiniscopeV4 + + UclaMiniscopeV4/UclaMiniscopeV4 + 256 + true + Fps30Hz + High + false + 30 + 50 + + + UclaMiniscopeV4/PolledBno055 + 257 + true + ZYX + MirrorZ MirrorY MirrorX + + PortA + 5.2 + + + + + 8192 + 2048 + + + + + + + start-time_.csv + false + false + FileCount + true + Timestamp,Value.AcquisitionClockHz,Value.BlockReadSize,Value.BlockWriteSize + + + + + + + + + + + \ No newline at end of file diff --git a/workflows/hardware/ucla-miniscope-v4/memory-monitor.bonsai b/workflows/hardware/ucla-miniscope-v4/memory-monitor.bonsai new file mode 100644 index 00000000..89e79b2c --- /dev/null +++ b/workflows/hardware/ucla-miniscope-v4/memory-monitor.bonsai @@ -0,0 +1,19 @@ + + + + + + + + + PercentUsed + + + + + + + \ No newline at end of file diff --git a/workflows/hardware/ucla-miniscope-v4/port-status.bonsai b/workflows/hardware/ucla-miniscope-v4/port-status.bonsai new file mode 100644 index 00000000..50afef2d --- /dev/null +++ b/workflows/hardware/ucla-miniscope-v4/port-status.bonsai @@ -0,0 +1,32 @@ + + + + + + + UclaMiniscopeV4/PortController + + + + + + + port-status_.csv + false + false + FileCount + false + Timestamp,Value.Clock,Value.StatusCode,Value.SerdesLocked,Value.SerdesPass + + + + + + + + \ No newline at end of file diff --git a/workflows/hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai b/workflows/hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai new file mode 100644 index 00000000..c022a40f --- /dev/null +++ b/workflows/hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai @@ -0,0 +1,230 @@ + + + + + + + riffa + 0 + + + + + BreakoutBoard + + BreakoutBoard/Heartbeat + 0 + true + 10 + + + BreakoutBoard/AnalogIO + 6 + false + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + Input + Input + Input + Input + Input + Input + Input + Input + Input + Input + Input + Input + + + BreakoutBoard/DigitalIO + 7 + false + + + BreakoutBoard/OutputClock + 5 + false + 1000000 + 50 + 0 + + + BreakoutBoard/HarpSyncInput + 12 + false + Breakout + + + BreakoutBoard/MemoryMonitor + 10 + false + 10 + + + + + + UclaMiniscopeV4 + + UclaMiniscopeV4/UclaMiniscopeV4 + 256 + true + Fps30Hz + High + false + 30 + 24.4 + + + UclaMiniscopeV4/PolledBno055 + 257 + true + ZYX + MirrorZ MirrorY MirrorX + + PortA + + + + + + 8192 + 2048 + + + + + + + start-time_.csv + false + false + FileCount + true + Timestamp,Value.AcquisitionClockHz,Value.BlockReadSize,Value.BlockWriteSize + + + + UclaMiniscopeV4/PortController + + + + + + + port-status_.csv + false + false + FileCount + false + Timestamp,Value.Clock,Value.StatusCode,Value.SerdesLocked,Value.SerdesPass + + + + UclaMiniscopeV4/UclaMiniscopeV4 + U8 + + + + Image + + + + ucla-miniscope-v4-video_.avi + FileCount + true + false + GREY + 30 + + 0 + 0 + + NearestNeighbor + + + + Clock + + + + ucla-miniscope-v4-clock_.raw + FileCount + false + ColumnMajor + + + + + UclaMiniscopeV4/PolledBno055 + All + + + + bno055_.csv + false + false + FileCount + false + Clock,EulerAngle,Quaternion,Acceleration,Gravity,Temperature + + + Quaternion + + + + + 0 + -1 + 0 + + true + COM4 + + + + + BreakoutBoard/MemoryMonitor + + + + PercentUsed + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 17e885203a7a5323db38336cb5c5998002549814 Mon Sep 17 00:00:00 2001 From: cjsha <36574350+cjsha@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:58:21 -0500 Subject: [PATCH 2/3] Add memory monitor to np1 example workflow (#157) --- workflows/hardware/np1e/np1e.bonsai | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/workflows/hardware/np1e/np1e.bonsai b/workflows/hardware/np1e/np1e.bonsai index 95e6602b..b05f2eba 100644 --- a/workflows/hardware/np1e/np1e.bonsai +++ b/workflows/hardware/np1e/np1e.bonsai @@ -204,6 +204,14 @@ true + + + BreakoutBoard/MemoryMonitor + + + + PercentUsed + @@ -222,6 +230,7 @@ + \ No newline at end of file From 540d1907e80d1ea62814aac2372704ae8e2037b2 Mon Sep 17 00:00:00 2001 From: cjsha <36574350+cjsha@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:10:27 -0500 Subject: [PATCH 3/3] Fix FourCC in docs (#164) --- articles/hardware/ucla-miniscope-v4/camera.md | 7 ++++++- workflows/hardware/ucla-miniscope-v4/camera.bonsai | 2 +- .../hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/articles/hardware/ucla-miniscope-v4/camera.md b/articles/hardware/ucla-miniscope-v4/camera.md index bc0e6922..c83b844a 100644 --- a/articles/hardware/ucla-miniscope-v4/camera.md +++ b/articles/hardware/ucla-miniscope-v4/camera.md @@ -21,9 +21,14 @@ The operator generates a sequen The relevant members are selected from the `UclaMiniscopeV4CameraFrame` by right-clicking the `UclaMiniscopeV4CameraData` operator and choosing the following Output members: `Camera`, and `Clock`. The [VideoWriter](xref:Bonsai.Vision.VideoWriter) saves the `Camera` to a files with the following format: -`ucla-miniscope-v4-video_.avi` with "GREY" FourCC. The [MatrixWriter](xref:Bonsai.Dsp.MatrixWriter) saves the `Clock` to a +`ucla-miniscope-v4-video_.avi` with "DIB " FourCC. The [MatrixWriter](xref:Bonsai.Dsp.MatrixWriter) saves the `Clock` to a files with the following format: `ucla-miniscope-v4-clock_.raw`. +> [!NOTE] +> - If you edit the FourCC property yourself and want to use "DIB ", take care to include a space as the fourth character. +> - You can also use the "FMP4" FourCC which compresses the video data into smaller file sizes. However, "FMP4" can only +> be used with 8-bit data. + Try adjusting the `FrameRate`, `SensorGain`, `LEDBrightness`, and `LiquidLensVoltage` properties while the workflow is running and observing the camera data. Follow our guide if you are not sure how to observe the camera data. \ No newline at end of file diff --git a/workflows/hardware/ucla-miniscope-v4/camera.bonsai b/workflows/hardware/ucla-miniscope-v4/camera.bonsai index d8daf9e9..f3a016dc 100644 --- a/workflows/hardware/ucla-miniscope-v4/camera.bonsai +++ b/workflows/hardware/ucla-miniscope-v4/camera.bonsai @@ -22,7 +22,7 @@ FileCount true false - GREY + DIB 30 0 diff --git a/workflows/hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai b/workflows/hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai index c022a40f..2b605f53 100644 --- a/workflows/hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai +++ b/workflows/hardware/ucla-miniscope-v4/ucla-miniscope-v4.bonsai @@ -152,7 +152,7 @@ FileCount true false - GREY + DIB 30 0