Skip to content

Commit

Permalink
Describe Ts4231 sample rate (#111)
Browse files Browse the repository at this point in the history
* Add info about ts4231 sample rate

- Hard wrap lines
- Add a note about how to visualize data'
-  Edits per jonnew's feedback
- Also, remove the suggestion to skip to the (currently empty) tutorial
  section if they are familiar with bonsai
  • Loading branch information
cjsha authored Nov 18, 2024
1 parent 6c6a163 commit feeb22b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion articles/getting-started/install-configure-bonsai.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ Sometimes it is helpful to uninstall packages. [Open the package manager](#open-

## Next Steps

Now that Bonsai has been installed and configured, it is time to start constructing a workflow to capture data from your ONIX system. The following sections give a high-level understanding of how Bonsai is organized, and some of the ONIX-specific concepts that will be useful for learning how to work with the operators. If you are familiar with Bonsai, you might want to skip to the <xref:tutorials> section.
Now that Bonsai has been installed and configured, it is time to start constructing a workflow to capture data from your ONIX system. The following sections give a high-level understanding of how Bonsai is organized, and some of the ONIX-specific concepts that will be useful for learning how to work with the operators.
2 changes: 1 addition & 1 deletion articles/hardware/hs64/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ These are the devices available on the Headstage64:
- Optional adjustable digital high-pass filter with cutoff configurable from 0.146 Hz to 3309 Hz
- Three auxiliary ADC channels sampled at 30 kHz with 16 bit depth
- [Bno055](xref:hs64_bno055): 9-axis IMU for real-time, 3D orientation tracking sampled up to ~100 Hz for easy automated commutation with Open Ephys commutators
- [Ts4231](xref:hs64_ts4231): For compatibility with HTC Vive Lighthouses for real-time, 3D position tracking
- [Ts4231](xref:hs64_ts4231): 3x HTC Vive Lighthouse receivers for real-time, 3D position tracking sampled at 30 Hz per receiver in ideal conditions
- [Electrical Stimulation](xref:hs64_estim): Single current source with ±15V compliance voltage and automatic electrode discharge
- The stimulation waveform is highly configurable via the <xref:OpenEphys.Onix1.Headstage64ElectricalStimulatorTrigger>'s properties.
- [Optical Stimulation](xref:hs64_ostim): Two current sources with 800mA upper limit
Expand Down
25 changes: 22 additions & 3 deletions articles/hardware/hs64/ts4231.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,29 @@ uid: hs64_ts4231
title: Headstage64 Position Data
---

The following excerpt from the Headstage64 [example workflow](xref:hs64_hs64) demonstrates electrical stimulation.
The following excerpt from the Headstage64 [example workflow](xref:hs64_hs64) demonstrates the Headstage64's position
tracking capabilities.

::: workflow
::: workflow
![/workflows/hardware/hs64/ts4231.bonsai workflow](../../../workflows/hardware/hs64/ts4231.bonsai)
:::

The <xref:OpenEphys.Onix1.TS4231V1PositionData> operator generates a sequence of <xref:OpenEphys.Onix1.TS4231V1PositionDataFrame>s.
The <xref:OpenEphys.Onix1.TS4231V1PositionData> operator generates a sequence of
[TS4231V1PositionDataFrames](xref:OpenEphys.Onix1.TS4231V1PositionDataFrame). A `TS4231V1PositionDataFrame` is emitted
when a receiver on the Headstage64 captures a sequence of 12 optical signals from a pair of lighthouses which occurs at
30 Hz. Therefore, with no occlusions, the maximum achievable sample rate is 30 Hz per receiver. There are three
receivers on the Headstage64, so `TS4231V1PositionData` can emit up to 3 `TS4231V1PositionDataFrames` in a single 30 Hz
sampling cycle. Of course, if occlusions cause receivers to miss optical signals, this rate will be reduced.

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`
members from the `TS4231V1PositionDataFrame` to a file with the following name format: `ts4231v1__<timestamp>.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
`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 <xref:OpenEphys.Onix1.TS4231V1PositionDataFrame.Position> member is selected in
the workflow to help visualize the position data by double-clicking the node when the workflow is running
4 changes: 2 additions & 2 deletions articles/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
href: hardware/hs64/rhd2164.md
- name: Orientation Data & Commutation
href: hardware/hs64/bno055.md
# - name: Position Data
# href: hardware/hs64/ts4231.md
- name: Position Data
href: hardware/hs64/ts4231.md
# - name: Electrical Stimulation
# href: hardware/hs64/estim.md
# - name: Optical Stimulation
Expand Down

0 comments on commit feeb22b

Please sign in to comment.