diff --git a/articles/hardware/hs64/ts4231.md b/articles/hardware/hs64/ts4231.md index dd822e0..7fac010 100644 --- a/articles/hardware/hs64/ts4231.md +++ b/articles/hardware/hs64/ts4231.md @@ -3,11 +3,28 @@ uid: hs64_ts4231 title: Headstage64 Position Data --- -The following excerpt from the Headstage64 [example workflow](xref:hs64_hs64) demonstrates the headstage's position tracking capabilities. +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 operator generates a sequence of [TS4231V1PositionDataFrames](xref:OpenEphys.Onix1.TS4231V1PositionDataFrame). `TS4231V1PositionData` emits a `TS4231V1PositionDataFrame` when a receiver on the headstage successfully receives a coordinated set of four IR sweeps - two from each lighthouse. These coordinated sweeps occur at a rate of 30 Hz, so the maximum achievable sample rate is 30 Hz. In practice, the sample rate depends on the conditions of the behavioral arena. Achieving a 30 Hz sample rate requires that that the receiver is within range of the lighthouses and that there is no occlusion between the receiver and the lighthouses. There are four receivers on the headstage64 to increase the likelihood that at least one of them successfully receiving a complete lighthouse signal. Each receiver that successfully receives the full lighthouse signal results in `TS4231V1PositionData` emitting a `TS4231V1PositionDataFrame`. This means it is possible for the `TS4231V1PositionData` operator to emit multiple `TS4231V1PositionDataFrames` for a given set of coordinated sweeps. +The operator generates a sequence of +[TS4231V1PositionDataFrames](xref:OpenEphys.Onix1.TS4231V1PositionDataFrame). These `TS4231V1PositionDataFrames` are +emitted when a receiver on the Headstage64 successfully receives a fully formed set of signals from both lighthouses. +With no occlusions, the maximum achievable sample rate is 30 Hz. There are three receivers on the Headstage64, so it's +possible `TS4231V1PositionData` emits multiple `TS4231V1PositionDataFrames` in a single 30 Hz sampling cycle. +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__.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 member is selected in +the workflow to help visualize the position data. \ No newline at end of file