Welcome

Visual Reactive Programming with Bonsai

This training course will introduce you to the basic concepts of data acquisition and behavioural control using the Bonsai visual programming language.

Course Schedule

Tuesday Wednesday Thursday Friday
Lecture Introduction to Bonsai Reactive Operators Higher Order Operators Extending Bonsai
Tutorial Visual environments Closed-loop experiments Subjects
Projects
Scripting
Projects

Day 1 - Introduction to Bonsai

  • Introduction to Bonsai: what is visual reactive programming?
  • Marble diagrams and how to read them
  • Creating and controlling visual environments with BonVision
  • Learning your way around the IDE

Day 2 - Designing behavior tasks

  • Fundamental reactive operators
  • Modeling trial sequences: states, events, and side-effects
  • How to measure almost anything with Bonsai
  • Logging stimulus and response outcomes
  • Continuous and conditional feedback: closed-loop experiment building blocks
  • Real-time markerless pose tracking using Bonsai + SLEAP

Day 3 - Managing complex workflows

  • Sharing observable sequences
  • Higher-order reactive operators
  • Include workflows and workflow design guidelines
  • Creating dynamic observable sequences with higher-order operators
  • Interfacing Bonsai with Python

Day 4 - Extending Bonsai

  • How to extend Bonsai with scripting
  • Reproducible deployment and versioning of experiments
  • Debugging your own scripts and workflows
  • Bonsai hackathon