neurogears / vestibular-vr

Closed-loop VR setup for Rancz Lab
2 stars 0 forks source link

Specify block types via gain parameters #50

Closed RoboDoig closed 2 months ago

RoboDoig commented 2 months ago

This PR introduces the ability to control block types through setting different gain modifiers in the experiment schema, as well as visual field parameters like extent and offset. This relates to issue #49.

Different block types (linear, linear with closed loop, linear with closed loop + mismatch) can now be created at the schema level by adjusting parameters that control the gain with which different inputs affect visual flow. A yml file blockTypesDemo is included to showcase this.

Setting block types with these gain parameters also allows more flexibility in designing block behaviors. Rather than being separate categories, blocks with overlapping characteristics can be created, e.g. a block where both playback signal and flow sensor signal contribute to visual flow update.

The visual environment parameters also allow for visual environments to be designed based on schema parameters. Originally, the linear corridor was created (for the gratings case) by drawing a pair of gratings covering half the visual field offset by 180 degrees relative. These extents and offsets were hard-coded in Bonsai. This PR allows the extents and offsets to be defined per-block in the schema. To define a 'drum' environment rather than the linear corridor, one just needs to set the extent of the first grating field to 360, and the second to 0. This will create a single wraparound grating.