This repository holds the preprint and code for Kern, Date, Chao, 2024: Effects of Spatial Constraints of Inhibitory Connectivity on the Dynamical Development of Criticality in Spiking Networks.
wihtout running any simulations, or to play around with our data, follow these steps:
-
Clone this repository
-
Set up a python environment with the dependencies listed in
requirements.txt
, e.g.:python -m venv .env pip install -r requirements.txt
-
Download the abridged data from https://doi.org/10.6084/m9.figshare.26796061 and unzip it as a
results/
subdirectory -
Run all jupyter notebooks to generate the main and supplementary figures.
To run new simulations, I recommend using a Linux or similar system. Windows users are recommended to use WSL. Simulation and analysis are possible in any system, but will require a little more footwork to replicate the work the bash scripts (steps 3-4 below) do. Luckily, the scripts are very simple (go look), and are easily replaced with some copy-paste drudgery. If that's not for you, follow these steps:
-
Clone this repository
-
Set up a python environment with the dependencies listed in
requirements.txt
, e.g.:python -m venv .env pip install -r requirements.txt
-
Run simulations with a specified runtime seed, which should be a positive integer:
bash grid-run.sh <runseed>
Note:
- This runs through all combinations of p_inh and r_inh as defined in the parameter files in
params/
. Note that each parameter file itself defines 10 networks to be run in parallel (N_nets=10
), generated with a consistent random seed for structure (rng=0
). - To recreate the published results exactly (minus possible floating point inaccuracies etc.), call
grid_run.sh
(and subsequent scripts) with runseeds 0, 100, 200, 300, and 400 in five separate calls. - Every run of a single parameter setting generates ~1.3G of raw data; i.e., invoking
grid-run.sh
once requires on the order of ~35G of disk space. - Caution: There is no overwrite protection. If you are not careful with the naming scheme, the contents of existing subdirectories in
results/
may be overwritten.
- This runs through all combinations of p_inh and r_inh as defined in the parameter files in
-
Run analysis scripts to munge the raw data into manageable size, again using the runseed as an integer argument:
bash grid-spikestats.sh <runseed> bash grid-wstats.sh <runseed>
Notes (i) and (ii) above apply here, too.
-
Run postprocessing script for further data munging:
python grid_postprocessing.py <runseed[s]>
Unlike the bash scripts, this can be called with multiple runseed arguments (e.g.,
python grid_postprocessing.py 0 100 200 300 400
), but note that it relies on the outputs of step 4 above. -
Run all jupyter notebooks to generate the main and supplementary figures.