cleosim


Namecleosim JSON
Version 0.16.0 PyPI version JSON
download
home_pagehttps://cleosim.readthedocs.io
SummaryCleo: the Closed-Loop, Electrophysiology, and Optogenetics experiment simulation testbed
upload_time2024-09-18 20:36:00
maintainerNone
docs_urlNone
authorKyle Johnsen
requires_python<3.13,>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 style="font-size: 1em;">Cleo: the Closed-Loop, Electrophysiology, and Optophysiology experiment simulation testbed
</h1>

[![Tests](https://github.com/kjohnsen/cleosim/actions/workflows/test.yml/badge.svg)](https://github.com/kjohnsen/cleosim/actions/workflows/test.yml)
[![Documentation Status](https://readthedocs.org/projects/cleosim/badge/?version=latest)](https://cleosim.readthedocs.io/latest/?badge=latest)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![DOI](https://zenodo.org/badge/262130097.svg)](https://zenodo.org/doi/10.5281/zenodo.7036270)


<h1>
<p align="center">
  <img 
      style="display: block; 
             width: 50%;"
      src="https://user-images.githubusercontent.com/19983357/187561700-100b853a-d226-4039-a580-1d798b00f9e4.png" 
      alt="Cleo: the Closed-Loop, Electrophysiology, and Optophysiology experiment simulation testbed">
  </img>
</p>
</h1>


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](https://brian2.readthedocs.io/en/stable/) 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](https://kjohnsen.org) and Nathan Cruzado under the direction of [Chris Rozell](https://siplab.gatech.edu) at Georgia Institute of Technology.
See the preprint [here](https://www.biorxiv.org/content/10.1101/2023.01.27.525963).

<p align="center">
  <img 
      style="display: block; 
             width: 90%;"
      src="https://raw.githubusercontent.com/siplab-gt/cleo/master/docs/_static/cleo-overview-table.png" 
      alt="Overview table of Cleo's closed-loop control, ephys, and ophys features">
  </img>
</p>

## <img align="bottom" src="https://user-images.githubusercontent.com/19983357/167456512-fb10619b-255e-4a53-8ed9-79ae954d3ff4.png" alt="πŸ–₯️" > 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.


## <img align="bottom" src="https://user-images.githubusercontent.com/19983357/167461111-b0a3746c-03fa-47b7-a9a9-7b651157044f.png" alt="πŸ”Œ" > 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](https://www.sciencedirect.com/science/article/pii/S0165027020302946).

## <img align="bottom" src="https://user-images.githubusercontent.com/19983357/187728089-62fae854-1d69-4e8f-a597-a25934ca3eaa.png" alt="⚑" > 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.

## <img src="https://github.com/siplab-gt/cleo/assets/19983357/08b473bf-7e19-4dfb-9a21-1f9772f7ed50" alt="πŸ”¬" > 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](https://www.sciencedirect.com/science/article/pii/S0165027021001084) is implemented, with parameters included for GCaMP6 variants.

## πŸš€ Getting started
Just use pip to install&mdash;the name on PyPI is `cleosim`:
```bash
pip install cleosim
```

Then head to the [overview section of the documentation](https://cleosim.readthedocs.io/latest/overview.html) 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](https://siplab.gatech.edu)'s and [Garrett Stanley](https://stanley.gatech.edu/)'s labs at Georgia Tech, the [CLOCTools repository](https://cloctools.github.io) 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.

<p align="center">
  <img 
      style="display: block; 
             width: 100%;"
      src="https://raw.githubusercontent.com/siplab-gt/cleo/master/docs/_static/cloctools_and_cleo.png" 
      alt="CLOCTools and Cleo">
  </img>
</p>

### πŸ“ƒ Publications
[**Cleo: A testbed for bridging model and experiment by simulating closed-loop stimulation, electrode recording, and optophysiology**](https://www.biorxiv.org/content/10.1101/2023.01.27.525963)<br>
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**](https://github.com/cloctools/tools-for-neuro-control-manuscript)<br>
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**](https://github.com/awillats/state-aware-control)<br>
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**](https://github.com/awillats/clinc)<br>
A. Willats, M. O'Shaughnessy, and C. Rozell. *In prep*, 2023.

[**State-space optimal feedback control of optogenetically driven neural activity**](https://www.biorxiv.org/content/10.1101/2020.06.25.171785v2)<br>
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**](https://iopscience.iop.org/article/10.1088/1741-2552/aaa506)<br>
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://cleosim.readthedocs.io",
    "name": "cleosim",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Kyle Johnsen",
    "author_email": "kyle@kjohnsen.org",
    "download_url": "https://files.pythonhosted.org/packages/0c/f2/dd4a09ebb59b1c40694f6f4a1f8b1825dd2ace73b6fa165751b3d62eeb2a/cleosim-0.16.0.tar.gz",
    "platform": null,
    "description": "<h1 style=\"font-size: 1em;\">Cleo: the Closed-Loop, Electrophysiology, and Optophysiology experiment simulation testbed\n</h1>\n\n[![Tests](https://github.com/kjohnsen/cleosim/actions/workflows/test.yml/badge.svg)](https://github.com/kjohnsen/cleosim/actions/workflows/test.yml)\n[![Documentation Status](https://readthedocs.org/projects/cleosim/badge/?version=latest)](https://cleosim.readthedocs.io/latest/?badge=latest)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![DOI](https://zenodo.org/badge/262130097.svg)](https://zenodo.org/doi/10.5281/zenodo.7036270)\n\n\n<h1>\n<p align=\"center\">\n  <img \n      style=\"display: block; \n             width: 50%;\"\n      src=\"https://user-images.githubusercontent.com/19983357/187561700-100b853a-d226-4039-a580-1d798b00f9e4.png\" \n      alt=\"Cleo: the Closed-Loop, Electrophysiology, and Optophysiology experiment simulation testbed\">\n  </img>\n</p>\n</h1>\n\n\nHello there!\nCleo 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](https://brian2.readthedocs.io/en/stable/) spiking neural network simulator.\nWe 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.\nCleo also serves as an extensible, modular base for developing additional recording and stimulation modules for Brian simulations.\n\nThis package was developed by [Kyle Johnsen](https://kjohnsen.org) and Nathan Cruzado under the direction of [Chris Rozell](https://siplab.gatech.edu) at Georgia Institute of Technology.\nSee the preprint [here](https://www.biorxiv.org/content/10.1101/2023.01.27.525963).\n\n<p align=\"center\">\n  <img \n      style=\"display: block; \n             width: 90%;\"\n      src=\"https://raw.githubusercontent.com/siplab-gt/cleo/master/docs/_static/cleo-overview-table.png\" \n      alt=\"Overview table of Cleo's closed-loop control, ephys, and ophys features\">\n  </img>\n</p>\n\n## <img align=\"bottom\" src=\"https://user-images.githubusercontent.com/19983357/167456512-fb10619b-255e-4a53-8ed9-79ae954d3ff4.png\" alt=\"\ud83d\udda5\ufe0f\" > Closed Loop processing\nCleo allows for flexible I/O processing in real time, enabling the simulation of closed-loop experiments such as event-triggered or feedback control.\nThe user can also add latency to the stimulation to study the effects of computation delays.\n\n\n## <img align=\"bottom\" src=\"https://user-images.githubusercontent.com/19983357/167461111-b0a3746c-03fa-47b7-a9a9-7b651157044f.png\" alt=\"\ud83d\udd0c\" > Electrode recording\nCleo provides functions for configuring electrode arrays and placing them in arbitrary locations in the simulation.\nThe user can then specify parameters for probabilistic spike detection or a spike-based LFP approximation developed by [Tele\u0144czuk et al., 2020](https://www.sciencedirect.com/science/article/pii/S0165027020302946).\n\n## <img align=\"bottom\" src=\"https://user-images.githubusercontent.com/19983357/187728089-62fae854-1d69-4e8f-a597-a25934ca3eaa.png\" alt=\"\u26a1\" > 1P/2P optogenetic stimulation\nBy modeling light propagation and opsins, Cleo enables users to flexibly add photostimulation to their model.\nBoth 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.\nCleo also accounts for opsin action spectra to model the effects of multi-light/wavelength/opsin crosstalk and heterogeneous expression.\nParameters are for multiple opsins, and blue optic fiber (1P) and infrared spot (for 2P) illumination.\n\n## <img src=\"https://github.com/siplab-gt/cleo/assets/19983357/08b473bf-7e19-4dfb-9a21-1f9772f7ed50\" alt=\"\ud83d\udd2c\" > 2P imaging\n\nUsers 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.\nThe calcium indicator model of [Song et al., 2021](https://www.sciencedirect.com/science/article/pii/S0165027021001084) is implemented, with parameters included for GCaMP6 variants.\n\n## \ud83d\ude80 Getting started\nJust use pip to install&mdash;the name on PyPI is `cleosim`:\n```bash\npip install cleosim\n```\n\nThen head to the [overview section of the documentation](https://cleosim.readthedocs.io/latest/overview.html) for a more detailed discussion of motivation, structure, and basic usage.\n\n## \ud83d\udcda Related resources\nThose using Cleo to simulate closed-loop control experiments may be interested in software developed for the execution of real-time, *in-vivo* experiments.\nDeveloped by members of [Chris Rozell](https://siplab.gatech.edu)'s and [Garrett Stanley](https://stanley.gatech.edu/)'s labs at Georgia Tech, the [CLOCTools repository](https://cloctools.github.io) can serve these users in two ways:\n\n1. By providing utilities and interfaces with experimental platforms for moving from simulation to reality.\n2. By providing performant control and estimation algorithms for feedback control.\nAlthough Cleo enables closed-loop manipulation of network simulations, it does not include any advanced control algorithms itself.\nThe `ldsCtrlEst` library implements adaptive linear dynamical system-based control while the `hmm` library can generate and decode systems with discrete latent states and observations.\n\n<p align=\"center\">\n  <img \n      style=\"display: block; \n             width: 100%;\"\n      src=\"https://raw.githubusercontent.com/siplab-gt/cleo/master/docs/_static/cloctools_and_cleo.png\" \n      alt=\"CLOCTools and Cleo\">\n  </img>\n</p>\n\n### \ud83d\udcc3 Publications\n[**Cleo: A testbed for bridging model and experiment by simulating closed-loop stimulation, electrode recording, and optophysiology**](https://www.biorxiv.org/content/10.1101/2023.01.27.525963)<br>\nK.A. Johnsen, N.A. Cruzado, Z.C. Menard, A.A. Willats, A.S. Charles, and C.J. Rozell. *bioRxiv*, 2023.\n\n[**CLOC Tools: A Library of Tools for Closed-Loop Neuroscience**](https://github.com/cloctools/tools-for-neuro-control-manuscript)<br>\nA.A. Willats, M.F. Bolus, K.A. Johnsen, G.B. Stanley, and C.J. Rozell. *In prep*, 2023.\n\n[**State-Aware Control of Switching Neural Dynamics**](https://github.com/awillats/state-aware-control)<br>\nA.A. Willats, M.F. Bolus, C.J. Whitmire, G.B. Stanley, and C.J. Rozell. *In prep*, 2023.\n\n[**Closed-Loop Identifiability in Neural Circuits**](https://github.com/awillats/clinc)<br>\nA. Willats, M. O'Shaughnessy, and C. Rozell. *In prep*, 2023.\n\n[**State-space optimal feedback control of optogenetically driven neural activity**](https://www.biorxiv.org/content/10.1101/2020.06.25.171785v2)<br>\nM.F. Bolus, A.A. Willats, C.J. Rozell and G.B. Stanley. *Journal of Neural Engineering*, 18(3), pp. 036006, March 2021.\n\n[**Design strategies for dynamic closed-loop optogenetic neurocontrol in vivo**](https://iopscience.iop.org/article/10.1088/1741-2552/aaa506)<br>\nM.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.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Cleo: the Closed-Loop, Electrophysiology, and Optogenetics experiment simulation testbed",
    "version": "0.16.0",
    "project_urls": {
        "Homepage": "https://cleosim.readthedocs.io",
        "Repository": "https://github.com/siplab-gt/cleo"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "026884eba520bb80c1d3e50ccbcb0fb0f8a9d6591c6d8d87210c1069c0e959ac",
                "md5": "8221ba3150b9214461649f81c6daa8b5",
                "sha256": "98243dc9985473d3d4e99e1537a40b93c201d6cb0403b7863f215a5a6abdd790"
            },
            "downloads": -1,
            "filename": "cleosim-0.16.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8221ba3150b9214461649f81c6daa8b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 74035,
            "upload_time": "2024-09-18T20:35:59",
            "upload_time_iso_8601": "2024-09-18T20:35:59.859155Z",
            "url": "https://files.pythonhosted.org/packages/02/68/84eba520bb80c1d3e50ccbcb0fb0f8a9d6591c6d8d87210c1069c0e959ac/cleosim-0.16.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0cf2dd4a09ebb59b1c40694f6f4a1f8b1825dd2ace73b6fa165751b3d62eeb2a",
                "md5": "1820d406b3e3f1b423bccdf3632e7097",
                "sha256": "381c6f71f2cb4e49453c793a335b42066712fdaea3e5171babd877a8637bc42a"
            },
            "downloads": -1,
            "filename": "cleosim-0.16.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1820d406b3e3f1b423bccdf3632e7097",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 66711,
            "upload_time": "2024-09-18T20:36:00",
            "upload_time_iso_8601": "2024-09-18T20:36:00.838413Z",
            "url": "https://files.pythonhosted.org/packages/0c/f2/dd4a09ebb59b1c40694f6f4a1f8b1825dd2ace73b6fa165751b3d62eeb2a/cleosim-0.16.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-18 20:36:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "siplab-gt",
    "github_project": "cleo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cleosim"
}
        
Elapsed time: 0.78791s