Cleo: the Closed-Loop, Electrophysiology, and Optophysiology experiment simulation testbed

Tests Documentation Status Ruff DOI

Cleo: the Closed-Loop, Electrophysiology, and Optophysiology experiment simulation testbed

Hello there! Cleo has the goal of bridging theory and experiment for mesoscale neuroscience, facilitating electrode recording, optogenetic stimulation, and closed-loop experiments (e.g., real-time input and output processing) with the Brian 2 spiking neural network simulator. We hope users will find these components useful for prototyping experiments, innovating methods, and testing observations about a hypotheses in silico, incorporating into spiking neural network models laboratory techniques ranging from passive observation to complex model-based feedback control. Cleo also serves as an extensible, modular base for developing additional recording and stimulation modules for Brian simulations.

This package was developed by Kyle Johnsen and Nathan Cruzado under the direction of Chris Rozell at Georgia Institute of Technology. See the preprint here.

Overview table of Cleo's closed-loop control, ephys, and ophys features

🖥️ Closed Loop processing#

Cleo allows for flexible I/O processing in real time, enabling the simulation of closed-loop experiments such as event-triggered or feedback control. The user can also add latency to the stimulation to study the effects of computation delays.

🔌 Electrode recording#

Cleo provides functions for configuring electrode arrays and placing them in arbitrary locations in the simulation. The user can then specify parameters for probabilistic spike detection or a spike-based LFP approximation developed by Teleńczuk et al., 2020.

⚡ 1P/2P optogenetic stimulation#

By modeling light propagation and opsins, Cleo enables users to flexibly add photostimulation to their model. Both a four-state Markov state model of opsin kinetics is available, as well as a minimal proportional current option for compatibility with simple neuron models. Cleo also accounts for opsin action spectra to model the effects of multi-light/wavelength/opsin crosstalk and heterogeneous expression. Parameters are for multiple opsins, and blue optic fiber (1P) and infrared spot (for 2P) illumination.

🔬 2P imaging#

Users can also inject a microscope into their model, selecting neurons on the specified plane of imaging or elsewhere, with signal and noise strength determined by indicator expression levels and position with respect to the focal plane. The calcium indicator model of Song et al., 2021 is implemented, with parameters included for GCaMP6 variants.

🚀 Getting started#

Just use pip to install—the name on PyPI is cleosim:

pip install cleosim

Then head to the overview section of the documentation for a more detailed discussion of motivation, structure, and basic usage.

Documentation contents#

Indices and tables#