Zapit Optostim: Introduction

Zapit is a general purpose package for coordinating galvo-based optostimulation in vivo.

What is it?

Zapit is point-based (scanner-based) optostimulator system for head-fixed mouse behavioral tasks. The software will run on a variety of hardware designs and experimental paradigms. A user-friendly MATLAB GUI handles creation of stimulus sets, scanner calibration, and alignment of stereotaxic coordinates to the sample. The experiment itself is run via a MATLAB API: using a small number of simple commands the user can initiate and stop optostimulation, and handle trial logging to disk. There is a Python wrapper for the MATLAB API and support for presenting stimuli in other programming languages.

How does it work?

A pair of scan mirrors deflect an incoming laser beam, which is focused onto the exposed skull of a head-fixed animal with a lens. This lens is also used to image the sample onto a camera in order to visualise where the beam is pointing. Zapit registers the scanners to the camera, allowing the user to place the beam in any desired location by clicking on a live image feed. Zapit maps stereotaxic coordinates into the camera space, allowing the user to point the beam to coordinates defined with respect to bregma. A graphical tool builds experiment coordinate files using a top-down view of the Allen Atlas. Two stimulation regimes are currently possible:

  1. The beam is parked at a single location and gated with a fixed duty cycle (typically 40 Hz) until a command is issued to end the trial.

  2. The beam is cycled between two or more coordinates at a fixed duty cycle.

Within any single experiment, coordinates are chosen from a pre-defined list. Stimulation begins either immediately after an API command is issued or after a hardware trigger is received by the DAQ. Stimulation ends on receipt of an API command and laser intensity is decreased gradually over a period of about 250 ms to avoid the significant rebound artefacts which would occur in the absence of the ramp.

Zapit is being used in production experiments at the Sainsbury Wellcome Centre but it remains under development. New users should check the live Issues on GitHub, in particular the known obvious ones at: https://github.com/Zapit-Optostim/zapit/labels/Known%20obvious%20issue

Last updated