Published July 25, 2025 | Version v2

pyRTAOI: A real-time all-optical interface for dynamic perturbation of neural activity during behavior

  • 1. ROR icon University College London
  • 2. ROR icon Stanford University
  • 1. ROR icon Stanford University
  • 2. ROR icon University College London

Description

A python-based real-time all-optical interface (pyRTAOI) for closed-loop control of neural activity.

The software integrates a calcium imaging analysis toolbox (CaImAn, Giovannucci et al., 2019, https://github.com/flatironinstitute/CaImAn), a custom hologram control software (HoloBlink in this repository) with a two-photon microscope control system (Prairie View, Bruker Corporation). Holographic photostimulation can be delivered to pre-defined or online-detected ensembles of neurons based on the calcium activity recorded from a single neuron or population of neurons. It also provides users with access to real-time motion-corrected and denoised imaging frames, manual curation and selection of ROIs for readout and stimulation, configuration of photostimulation and sensory stimulation protocols (e.g. laser power, frequency, amplitude, duration, etc.), automatic photostimulation and imaging laser alignment check, direct control of relevant parameters settings in CaImAn and the Prairie View microscope system.

Developed by Zihui Zhang and Patrycja Dzialecka

Notes

System requirements

  • Software has been tested on a Windows 10 desktop with microscope control system (PrairieView, rev40, Bruker Corporation).
  • Software platforms used in the package include: Python 3.6 (with PyQt5), Visual Studio 2013 (64 bit, with Qt 5.9) and MATLAB (2017b).
  • Access to the raw image data stream depends on PrairieLink (Bruker Corporation).
  • Phase masks are uploaded to the spatial light modulator (OverDrive Plus SLM, Meadowlark Optics) using the Blink_SDK dll (Meadowlark Optics).
  • NVIDIA GPUs have been tested for raw data preprocessing and hologram calculation (CUDA8.0, NVDIA GeForce GTX 1080Ti).
  • Analog voltage outputs are generated using NI-DAQmx (device used: PCI-6713, National Instruments).

Requirements for post-hoc analysis in MATLAB:

  • dPCA: https://github.com/machenslab/dPCA
  • CaImAn: https://github.com/flatironinstitute/CaImAn-MATLAB

Files

pyRTAOI-master.zip

Files (35.9 MB)

Name Size
md5:0a5dc587a8a7ce30af5046b27b54d281
35.9 MB Preview Download

Additional details

Dates

Created
2018-06-27

Software

Repository URL
https://github.com/alloptical/pyRTAOI
Programming language
Python , MATLAB , C++