Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 2.83 KB

README.md

File metadata and controls

46 lines (34 loc) · 2.83 KB

Cleo paper virtual experiment 3

evoking sharp wave-ripples with optogenetics

results image

This project takes the hippocampus model developed by Aussel et al. (2018, 2022, code), wraps it with Cleo, and evokes SWRs with optogenetics rather than the original external current meant to model slow-wave sleep rhythms.

Installation

Clone the repo, then use mamba (or conda if you must 😁):

mamba env create -f environment.yml
mamba activate hipp2

This creates an environment called hipp2—so called because the original simulation provided an environment called hipp.

If you have problems installing from the environment.yml file, try this instead:

mamba create -n hipp2 python=3.9
mamba install numpy scipy
pip install cleosim==0.14.1

Then install the model files as a package:

pip install -e ./aussel_model

To run LQR control, you'll need ldsctrlest Python bindings. To run MPC, you'll need Julia with JuMP@1.4.0 and OSQP@0.8.0 packages installed.

Running experiments

Then, follow along with the experiments in run_experiments.sh. I haven't tested running that file all the way—rather, I added lines as I worked on the terminal. So, I'd recommend running line by line, especially since the simulations take a while (those with full optogenetics take about 10 minutes on my decent laptop).

Plotting

Some plots are generated automatically by the simulation. That code is in plot_results.py. The code I used to make the final summary figure is in create_figure.py.

Validation experiment

The --mode=val argument runs the model with epilepsy parameters to reproduce figure 5A of Aussel et al., 2022 This relies on validation/aussel22-data/input_epi_wake_{1|2|3}.txt, which must be obtained by contacting Amélie Aussel, the author. These files contain firing rate inputs to the entorhinal cortex from three different afferent brain regions, produced (after some preprocessing) from sEEG recordings as described in the two papers. Code to produce a figure from these results is located at validation/plot_data.py.