Extended Data Fig. 5: Example setup and Bonsai workflow for simultaneous neural recording and behavior tracking.

a, A mouse with a Miniscope implant explores the same arena described in Figs. 2 and 3, and is being tracked by 4 side-mounted, and one overhead camera. The experiment is performed using the Bonsai2 software. In addition to the headstage connection (red), Bonsai controls the motorized commutator (blue) via a serial-over-USB link, as well as the 5 cameras (green) using the camera vendor API over USB. b, Mouse with a Miniscope v.4 implant3, controlled by Bonsai via the ONIX system. c, The motorized commutator and 3D-tracking base stations. d, Excerpt of the Bonsai workflow: Data arrives via the’MiniscopeV4’ node (green), which communicates with a standard Miniscope through the ONIX micro-coax, is rescaled using an image processing nodes (blue) and saved to disk (yellow). A separate data path assigns time stamps to frames, synchronization with behavior cameras or other data. e, Bonsai workflow used to drive the commutator (Fig. 1). The head orientation quaternion output of the’MiniscopeV4 BNO55’ node (green) is one of the outputs of the BNO55 chip on the headstage (shared across the Miniscope, and the 64-channel Intan, as well as Neuropixel headstages). The quaternion is the saved to disk as raw data (purple), and sent to the ‘Commutator’ node (yellow), which drives the commutator to follow the animal’s rotation and remove any twisting of the tether. f, Example screenshot from Bonsai showing simultaneous data acquisition from all sources. Example workflows are available on the ONIX GitHub repository (https://open-ephys.github.io/onix-docs/Software%20Guide/Bonsai.ONIX/Bonsai%20Examples/index.html).