Skip to main content

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 publication 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.

Those using Cleo to simulate closed-loop control experiments may be interested in software developed for the execution of real-time, in-vivo experiments. Developed by members of Chris Rozell's and Garrett Stanley's labs at Georgia Tech, the CLOCTools repository can serve these users in two ways:

  1. By providing utilities and interfaces with experimental platforms for moving from simulation to reality.
  2. By providing performant control and estimation algorithms for feedback control. Although Cleo enables closed-loop manipulation of network simulations, it does not include any advanced control algorithms itself. The ldsCtrlEst library implements adaptive linear dynamical system-based control while the hmm library can generate and decode systems with discrete latent states and observations.

CLOCTools and Cleo

📃 Publications

Bridging Model and Experiment in Systems Neuroscience with Cleo: The Closed-Loop, Electrophysiology, and Optophysiology Simulation Testbed
K.A. Johnsen, N.A. Cruzado, Z.C. Menard, A.A. Willats, A.S. Charles, J.E. Markowitz, and C.J. Rozell. Journal of Neuroscience, 2026.

Closed-Loop Identifiability in Neural Circuits
A. Willats, M. O'Shaughnessy, and C. Rozell. In prep, 2023.

State-space optimal feedback control of optogenetically driven neural activity
M.F. Bolus, A.A. Willats, C.J. Rozell and G.B. Stanley. Journal of Neural Engineering, 18(3), pp. 036006, March 2021.

Design strategies for dynamic closed-loop optogenetic neurocontrol in vivo
M.F. Bolus, A.A. Willats, C.J. Whitmire, C.J. Rozell and G.B. Stanley. Journal of Neural Engineering, 15(2), pp. 026011, January 2018.

Metadata

Release files for cleosim 0.20.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cleosim 0.20.0
File Size Uploaded
cleosim-0.20.0.tar.gz 6.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for cleosim 0.20.0
File Interpreter ABI Platform
cleosim-0.20.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 MB

Release files / cleosim-0.20.0.tar.gz

Download URL cleosim-0.20.0.tar.gz
Size 6.4 MB
Tags Source
SHA-256 checksum
How to use checksums
406404dcf738f3a9a087529597fe7c6d37d9f01e27280335066d47f8bc57123f
BLAKE2b-256 checksum
How to use checksums
422be80aaf42eb22e72c69004c1e43f40e5d1bb5059f28067407dcb6c1b02223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.12.11 Linux/5.15.0-187-generic

Release files / cleosim-0.20.0-py3-none-any.whl

Download URL cleosim-0.20.0-py3-none-any.whl
Size 6.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c222e895bc2b823d1e35a54c3c4a29ece2e274590d9adcce8343ae05a0abcb86
BLAKE2b-256 checksum
How to use checksums
5cc748ba3e1d10ae627618f6e65e00212e1f497fec63b978033d595527f60e6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.12.11 Linux/5.15.0-187-generic

Release history Release notifications | RSS feed

This release

0.20.0 This release

2 release files

0.19.0

2 release files

0.18.3

2 release files

0.18.1

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.2

2 release files

0.14.0

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page