Skip to main content

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

Project description

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

Tests Documentation Status

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.

logo

🖥️ 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.

📚 Related resources

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

Cleo: A testbed for bridging model and experiment by simulating closed-loop stimulation, electrode recording, and optophysiology
K.A. Johnsen, N.A. Cruzado, Z.C. Menard, A.A. Willats, A.S. Charles, and C.J. Rozell. bioRxiv, 2023.

CLOC Tools: A Library of Tools for Closed-Loop Neuroscience
A.A. Willats, M.F. Bolus, K.A. Johnsen, G.B. Stanley, and C.J. Rozell. In prep, 2023.

State-Aware Control of Switching Neural Dynamics
A.A. Willats, M.F. Bolus, C.J. Whitmire, G.B. Stanley, and C.J. Rozell. In prep, 2023.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cleosim-0.12.0.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

cleosim-0.12.0-py3-none-any.whl (66.2 kB view details)

Uploaded Python 3

File details

Details for the file cleosim-0.12.0.tar.gz.

File metadata

  • Download URL: cleosim-0.12.0.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.9 Linux/5.10.16.3-microsoft-standard-WSL2

File hashes

Hashes for cleosim-0.12.0.tar.gz
Algorithm Hash digest
SHA256 604bec14dcfd378164e022b43681c44c5782ea3b2a50aa5c6776b4f4652fbd16
MD5 e3bde8f6ff27c5f41bebbc000ada8a1b
BLAKE2b-256 e504f1566ce9c198a9eb79c56ffc54392dd5c115dabe9217f97fd252f60787fe

See more details on using hashes here.

File details

Details for the file cleosim-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: cleosim-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 66.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.9 Linux/5.10.16.3-microsoft-standard-WSL2

File hashes

Hashes for cleosim-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1817e96e447671a593e82bb83dd91b217c7806d8bb9e996176bed6ba4e2b4976
MD5 5b9f454742896fa728cfd6b0d40a5e37
BLAKE2b-256 8145066f3c017efb55477c235de4386826aafb82c67b30f6f83794c64c9119d1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page