Giter VIP home page Giter VIP logo

tfiers / phd Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 189.79 MB

"In-vivo connectomics" · Mapping the wires between neurons based on voltage imaging recordings. [Proof of concept simulation]

Home Page: https://tfiers.github.io/phd

Python 5.75% JavaScript 0.20% CSS 0.12% Julia 67.66% Just 0.06% TeX 26.15% MATLAB 0.04%
spiking-neural-networks voltage-imaging computational-neuroscience fluorescence-microscopy unitful simulation

phd's Introduction

Voltage-to-wiring, the simulation

In-vivo connectomics — mapping the wires between neurons based on voltage imaging recordings.
Proof of concept simulation.

For rendered notebooks with results:

Button saying "go to website"

Organization

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 new Manifest.toml. It is only to be used when working on this codebase; not when you want to reproduce the results.

Reproducing results

Julia

To reproduce results, i.e. to succesfully run one of the notebooks:

  1. You need a version of Julia ∈ [1.7, 2).
    Download and run an installer for your OS if needed.

  2. Download this repository.

    git clone this repository's url with the --recurse-submodules option,
    and cd into the new directory.

    --recurse-submodules makes sure that the git submodules in this repository (see pkg/) are cloned as well.

  3. 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, and git 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 use git 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.
  4. Install dependencies.

    In the root directory, enter Julia Pkg mode.
    Then run activate . (note the dot) and instantiate.
    This might need a shell with admin access.

    • instantiate installs the exact package versions specified in Manifest.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.
  5. Start a Jupyter server.
    • If you do not have Jupyter installed, run using IJulia and notebook() in the julia REPL.
    • If you have, the usual jupyter notebook (or python -m notebook) in the terminal works.

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].

Python

Check out the following version of this repository and this ReadMe
for instructions on how to reproduce the older, Python notebooks:

👉 Repository @ commit 56bc7f6 (Jan 8, 2022)

Using the Python package pkg/pyplotlib in Julia

  • 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 using which python). Example value: C:\Users\tfiers\mambaforge\python.

phd's People

Contributors

tfiers avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.