# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['cleo', 'cleo.ephys', 'cleo.imaging', 'cleo.ioproc', 'cleo.light', 'cleo.opto']

package_data = \
{'': ['*']}

install_requires = \
['attrs>=21.0,<22.0',
 'bidict',
 'brian2>=2.4,<3.0,!=2.5.0.2',
 'matplotlib>=3.4,<4.0',
 'neo>=0.12.0,<0.13.0',
 'nptyping>=1.4.4,<2.0.0',
 'numpy>=1.16,<2.0',
 'scipy>=1.7.2,<2.0.0',
 'tklfp>=0.2,<0.3']

setup_kwargs = {
    'name': 'cleosim',
    'version': '0.10.0',
    'description': 'Cleo: the Closed-Loop, Electrophysiology, and Optogenetics experiment simulation testbed',
    'long_description': '###### Cleo: the Closed-Loop, Electrophysiology, and Optogenetics experiment simulation testbed\n[![Test and lint](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/en/latest/?badge=latest)\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 Optogenetics experiment simulation testbed">\n  </img>\n</p>\n</h1>\n\n\nHello 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.\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.\n\n<p align="center">\n  <img \n      style="display: block; \n             width: 90%;"\n      src="https://user-images.githubusercontent.com/19983357/187724696-b880a884-1c32-4bad-8b2c-acdd4add44d0.png" \n      alt="logo">\n  </img>\n</p>\n\n## <img align="bottom" src="https://user-images.githubusercontent.com/19983357/167456512-fb10619b-255e-4a53-8ed9-79ae954d3ff4.png" alt="CL icon" > 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. The user can also add latency to closed-loop 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="CL icon" > Electrode recording\nCleo 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).\n\n## <img align="bottom" src="https://user-images.githubusercontent.com/19983357/187728089-62fae854-1d69-4e8f-a597-a25934ca3eaa.png" alt="CL icon" > Optogenetic stimulation\nBy providing an optic fiber-light propagation model, Cleo enables users to flexibly add photostimulation to their model. Both a four-state Markov state model of opsin dynamics is available, as well as a minimal proportional current option for compatibility with simple neuron models. Parameters are provided for the common blue light/ChR2 setup.\n\n## Getting started\nJust use pip to install&mdash;the name on PyPI is `cleosim`:\n```\npip install cleosim\n```\n\nThen head to the [overview section of the documentation](https://cleosim.readthedocs.io/en/latest/overview.html) for a more detailed discussion of motivation, structure, and basic usage.\n\n## 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. 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:\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. 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.\n\n<p align="center">\n  <img \n      style="display: block; \n             width: 100%;"\n      src="https://user-images.githubusercontent.com/19983357/187723498-f0f03da8-096a-46eb-90df-28da55dce7a0.png" \n      alt="CLOCTools and Cleo">\n  </img>\n</p>\n\n### Publications\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*, 2022.\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*, 2022.\n\n[**Closed-Loop Identifiability in Neural Circuits**](https://github.com/awillats/clinc)<br>\nA. Willats, M. O\'Shaughnessy, and C. Rozell. *In prep*, 2022.\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',
    'author': 'Kyle Johnsen',
    'author_email': 'kyle@kjohnsen.org',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://cleosim.readthedocs.io',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.8,<=3.11',
}


setup(**setup_kwargs)
