In-vivo connectomics — mapping the wires between neurons based on voltage imaging recordings.
Proof of concept simulation.
For rendered notebooks with results:
Directories:
nb/
contains Jupyter Notebooks, with exploratory and figure-producing code. These notebooks are both in Python, and later – from 2022 onwards – in Julia. They call code that has been factored out to external packages:pkg/
contains Julia packages, which define functions and data types that are reused in multiple notebooks.web/
contains config and code to build the website where the notebooks are hosted (using JupyterBook).sysimg/
contains instructions for building a custom Julia system image. It is not necessary to run the notebooks, but it speeds up package imports and first function calls.
Files:
Project.toml
lists the identifiers of the Julia packages our code directly depends on.Manifest.toml
records the exact versions of all packages used to generate the results (i.e. the notebook outputs).gen_manifest.jl
is used to generate a newManifest.toml
. It is only to be used when working on this codebase; not when you want to reproduce the results.
To reproduce results, i.e. to succesfully run one of the notebooks:
-
You need a version of Julia
∈ [1.7, 2)
.
Download and run an installer for your OS if needed. -
Download this repository.
git clone
this repository's url with the--recurse-submodules
option,
andcd
into the new directory.--recurse-submodules
makes sure that the git submodules in this repository (seepkg/
) are cloned as well. -
Choose a Julia notebook to run.
If it is one of the newest notebooks, the rest of this step can be skipped.
If not, copy the hash of the last commit to the notebook file, andgit checkout
this commit.- A link to this commit and its hash can be found on GitHub,
in the
nb/
directory, next to the notebook's filename.
Or usegit log <path>
. - Why is this step needed? The codebase that is called from the notebook will have been further developed since the notebook was last run. Checking out the commit restores the codebase to its former, working state for the notebook.
- A link to this commit and its hash can be found on GitHub,
in the
-
Install dependencies.
In the root directory, enter Julia Pkg mode.
Then runactivate .
(note the dot) andinstantiate
.
This might need a shell with admin access.instantiate
installs the exact package versions specified inManifest.toml
, which is included in the repository for the purpose of reproducibility.- Downloading and installing all these packages will take a while.
- If you want to instead use newer versions of dependencies (maybe because you
already have them downloaded), run
julia gen_manifest.jl
in the terminal.
-
Start a Jupyter server.
- If you do not have Jupyter installed,
run
using IJulia
andnotebook()
in the julia REPL. - If you have, the usual
jupyter notebook
(orpython -m notebook
) in the terminal works.
- If you do not have Jupyter installed,
run
You should now be able to run all cells in the notebook.
Last time these instructions were tested on a fresh system: [a few weeks before today, March 2nd 2022].
Check out the following version of this repository and this ReadMe
for instructions on how to reproduce the older, Python notebooks:
- Activate your conda environment. Install matplotlib in it.
pip install -e pkg/pyplotlib
- Add an environment variable
JULIA_PYTHONCALL_EXE
, pointing to the python executable of your active conda env (which can be found usingwhich python
). Example value:C:\Users\tfiers\mambaforge\python
.