# Understanding spiking networks through convex optimization

This folder contains the Python source code to generate Figures 3 and 4 in the paper.

## Requirements

To install requirements:

```setup
pip install -r requirements.txt
```


## Using the code
The code is provided as Jupyter notebooks. Figure 3 can be reproduced with `Convex_SNNs_Figure3.ipynb`, and Figure 4 with `Convex_SNNs_Figure4.ipynb`.

`plotting.py` contains some plotting functions for Figure 4, and `snn_cvx.py` contains the simulation functions used for both figures.

To just peruse the code and resulting outputs without the need for installing any requirements, see the HTML files `Convex_SNNs_Figure3.html` and `Convex_SNNs_Figure3.html`.

For a general tutorial on using jupyter notebooks see: https://www.datacamp.com/community/tutorials/tutorial-jupyter-notebook.

For tutorials on how to use the plotting toolbox we used see: https://holoviews.org/.
