You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/hobgoblin-closeloop.md
+19-10Lines changed: 19 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ To better understand what each parameter controls, try the following modificatio
122
122
> **Optional** Verify the pulse train by connecting the output to a digital input pin.
123
123
124
124
>[!TIP]
125
-
> If your cameras support external triggering, you can use pulse trains to trigger frame capture. Recording the same pulse train on a digital input with the `Hobgoblin` allows you to have hardware timestamped images that are automatically aligned with other acquired data.
125
+
> If your camera supports external triggering, you can use pulse trains to trigger frame capture. Recording the same pulse train on a digital input with the `Hobgoblin` allows you to have hardware timestamped images that are automatically aligned with other acquired data.
126
126
127
127
### Exercise 4: Triggering a digital line based on region of interest activity
128
128
@@ -144,8 +144,24 @@ To better understand what each parameter controls, try the following modificatio
144
144
> [!Note]
145
145
> The [`CropPolygon`] operator uses the `Regions` property to define multiple, possibly non-rectangular regions. The visual editor is similar to [`Crop`], where you draw a rectangular box. However, in [`CropPolygon`] you can move the corners of the box by right-clicking _inside_ the box and dragging the cursor to the new position. You can add new points by double-clicking with the left mouse button, and delete points by double-clicking with the right mouse button. You can delete regions by pressing the `Del` key and cycle through selected regions by pressing the `Tab` key.
146
146
147
+
### Exercise 5: Conditioned place preference
148
+
149
+
Implement the following trial structure for conditioned place preference. `enter` and `leave` events should be triggered in real-time from the camera, by tracking an object moving in or out of a region of interest (ROI). `Reward` should be triggered once upon entering the ROI, and not repeat again until the object exits the ROI and the ITI has elapsed.
150
+
151
+
```mermaid
152
+
stateDiagram-v2
153
+
direction LR
154
+
ITI --> Ready: elapsed
155
+
Ready --> Reward: enter
156
+
Reward --> ITI: leave
157
+
```
158
+
159
+
> [!Tip]
160
+
> There are several ways to implement ROI activation, so feel free to explore different ideas. Consider using either [`Crop`], [`RoiActivity`], or [`ContainsPoint`] as part of different strategies to implement the `enter` and `leave` events.
0 commit comments