Skip to content

Commit

Permalink
Add funding, remove acknowledgements for README
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Aug 22, 2024
1 parent caa0804 commit 68dc736
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 115 deletions.
54 changes: 32 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,41 @@
- elegant mechanisms for parameter sharing


### Tutorials
## Getting started

Tutorials are available [on our website](https://jaxleyverse.github.io/jaxley/). We currently have tutorials on how to:

- [simulate morphologically detailed neurons](https://jaxleyverse.github.io/jaxley/tutorial/01_morph_neurons/)
- [simulate networks of such neurons](https://jaxleyverse.github.io/jaxley/tutorial/02_small_network/)
- [set parameters of cells and networks](https://jaxleyverse.github.io/jaxley/tutorial/03_setting_parameters/)
- [speed up simulations with jit and vmap](https://jaxleyverse.github.io/jaxley/tutorial/04_jit_and_vmap/)
- [define your own channels and synapses](https://jaxleyverse.github.io/jaxley/tutorial/05_channel_and_synapse_models/)
- [define groups](https://jaxleyverse.github.io/jaxley/tutorial/06_groups/)
- [read and handle SWC files](https://jaxleyverse.github.io/jaxley/tutorial/08_importing_morphologies/)
- [train biophysical models](https://jaxleyverse.github.io/jaxley/tutorial/07_gradient_descent/)
`Jaxley` allows to simulate biophysical neuron models on CPU, GPU, or TPU:
```python
import matplotlib.pyplot as plt
from jax import config

import jaxley as jx
from jaxley.channels import HH

config.update("jax_platform_name", "cpu") # Or "gpu" / "tpu".

cell = jx.Cell() # Define cell.
cell.insert(HH()) # Insert channels.

### Units
current = jx.step_current(i_delay=1.0, i_dur=1.0, i_amp=0.1, delta_t=0.025, t_max=10.0)
cell.stimulate(current) # Stimulate with step current.
cell.record("v") # Record voltage.

`Jaxley` uses the same [units as `NEURON`](https://www.neuron.yale.edu/neuron/static/docs/units/unitchart.html).
v = jx.integrate(cell) # Run simulation.
plt.plot(v.T) # Plot voltage trace.
```

If you want to learn more, we recommend you to check out our tutorials on how to:

- [get started with `Jaxley`](https://jaxleyverse.github.io/jaxley/tutorial/01_morph_neurons/)
- [simulate networks of neurons](https://jaxleyverse.github.io/jaxley/tutorial/02_small_network/)
- [speed up simulations with GPUs and `jit`](https://jaxleyverse.github.io/jaxley/tutorial/04_jit_and_vmap/)
- [define your own channels and synapses](https://jaxleyverse.github.io/jaxley/tutorial/05_channel_and_synapse_models/)
- [compute the gradient and train biophysical models](https://jaxleyverse.github.io/jaxley/tutorial/07_gradient_descent/)


## Installation

### Installation
`Jaxley` is available on [`PyPI`](https://pypi.org/project/jaxley/):
```sh
pip install jaxley
Expand All @@ -48,22 +63,17 @@ pip install -U "jax[cuda12]"
```


### Feedback and Contributions
## Feedback and Contributions

We welcome any feedback on how Jaxley is working for your neuron models and are happy to receive bug reports, pull requests and other feedback (see [contribute](https://github.com/jaxleyverse/jaxley/blob/main/CONTRIBUTING.md)). We wish to maintain a positive community, please read our [Code of Conduct](https://github.com/jaxleyverse/jaxley/blob/main/CODE_OF_CONDUCT.md).


### Acknowledgements

We greatly benefited from previous toolboxes for simulating multicompartment neurons, in particular [NEURON](https://github.com/neuronsimulator/nrn).


### License
## License

[Apache License](https://github.com/jaxleyverse/jaxley/blob/main/LICENSE)
[Apache License Version 2.0 (Apache-2.0)](https://github.com/jaxleyverse/jaxley/blob/main/LICENSE)


### Citation
## Citation

If you use `Jaxley`, consider citing the [corresponding paper](https://www.biorxiv.org/content/10.1101/2024.08.21.608979):

Expand Down
9 changes: 7 additions & 2 deletions docs/docs/credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@

## License

`Jaxley` is licensed under the [Apache License](https://github.com/jaxleyverse/jaxley/blob/main/LICENSE) and
`Jaxley` is licensed under the [Apache License Version 2.0 (Apache-2.0)](https://github.com/jaxleyverse/jaxley/blob/main/LICENSE) and

> Copyright (C) 2024 Michael Deistler, Jakob H. Macke, Pedro J. Goncalves, Philipp Berens.

## Important dependencies and prior art

* We greatly benefited from previous toolboxes for simulating multicompartment neurons, in particular [NEURON](https://github.com/neuronsimulator/nrn)
* We greatly benefited from previous toolboxes for simulating multicompartment neurons, in particular [NEURON](https://github.com/neuronsimulator/nrn).


## Funding

This work was supported by the German Research Foundation (DFG) through Germany's Excellence Strategy (EXC 2064 – Project number 390727645) and the CRC 1233 "Robust Vision", the German Federal Ministry of Education and Research (Tübingen AI Center, FKZ: 01IS18039A), the 'Certification and Foundations of Safe Machine Learning Systems in Healthcare' project funded by the Carl Zeiss Foundation, and the European Union (ERC, "DeepCoMechTome", ref. 101089288, "NextMechMod", ref. 101039115).
7 changes: 6 additions & 1 deletion docs/docs/faq.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Frequently asked questions

[How can I save and load cells and networks?](faq/question_01.md)
- [What units does `Jaxley` use?](faq/question_01.md)
- [How can I save and load cells and networks?](faq/question_02.md)

See also the [discussion page](https://github.com/jaxleyverse/jaxley/discussions) and the [issue
tracker](https://github.com/jaxleyverse/jaxley/issues) on the `Jaxley` GitHub repository for
recent questions and problems.
19 changes: 2 additions & 17 deletions docs/docs/faq/question_01.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
# How can I save and load cells and networks?
# What units does `Jaxley` use?

All `module`s (i.e., compartments, branches, cells, and networks) in `Jaxley` can be saved and loaded with pickle:
```python
import jaxley as jx
import pickle

# ... define network, cell, etc.
network = jx.Network([cell1, cell2])

# Save.
with open("path/to/file.pkl", "wb") as handle:
pickle.dump(network, handle)

# Load.
with open("path/to/file.pkl", "rb") as handle:
network = pickle.load(handle)
```
`Jaxley` uses the same units as the `NEURON` simulator, which are listed [here](https://www.neuron.yale.edu/neuron/static/docs/units/unitchart.html).
18 changes: 18 additions & 0 deletions docs/docs/faq/question_02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# How can I save and load cells and networks?

All `module`s (i.e., compartments, branches, cells, and networks) in `Jaxley` can be saved and loaded with pickle:
```python
import jaxley as jx
import pickle

# ... define network, cell, etc.
network = jx.Network([cell1, cell2])

# Save.
with open("path/to/file.pkl", "wb") as handle:
pickle.dump(network, handle)

# Load.
with open("path/to/file.pkl", "rb") as handle:
network = pickle.load(handle)
```
44 changes: 28 additions & 16 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,43 @@
- elegant mechanisms for parameter sharing


## Tutorials
## Getting started

We currently have tutorials on how to:
`Jaxley` allows to simulate biophysical neuron models on CPU, GPU, or TPU:
```python
import matplotlib.pyplot as plt
from jax import config

import jaxley as jx
from jaxley.channels import HH

config.update("jax_platform_name", "cpu") # Or "gpu" / "tpu".

cell = jx.Cell() # Define cell.
cell.insert(HH()) # Insert channels.

current = jx.step_current(i_delay=1.0, i_dur=1.0, i_amp=0.1, delta_t=0.025, t_max=10.0)
cell.stimulate(current) # Stimulate with step current.
cell.record("v") # Record voltage.

v = jx.integrate(cell) # Run simulation.
plt.plot(v.T) # Plot voltage trace.
```

If you want to learn more, we have tutorials on how to:

- [simulate morphologically detailed neurons](https://jaxleyverse.github.io/jaxley/tutorial/01_morph_neurons/)
- [simulate networks of such neurons](https://jaxleyverse.github.io/jaxley/tutorial/02_small_network/)
- [set parameters of cells and networks](https://jaxleyverse.github.io/jaxley/tutorial/03_setting_parameters/)
- [speed up simulations with jit and vmap](https://jaxleyverse.github.io/jaxley/tutorial/04_jit_and_vmap/)
- [speed up simulations with GPUs and jit](https://jaxleyverse.github.io/jaxley/tutorial/04_jit_and_vmap/)
- [define your own channels and synapses](https://jaxleyverse.github.io/jaxley/tutorial/05_channel_and_synapse_models/)
- [define groups](https://jaxleyverse.github.io/jaxley/tutorial/06_groups/)
- [read and handle SWC files](https://jaxleyverse.github.io/jaxley/tutorial/08_importing_morphologies/)
- [train biophysical models](https://jaxleyverse.github.io/jaxley/tutorial/07_gradient_descent/)


## Units

`Jaxley` uses the same [units as `NEURON`](https://www.neuron.yale.edu/neuron/static/docs/units/unitchart.html).
- [compute the gradient and train biophysical models](https://jaxleyverse.github.io/jaxley/tutorial/07_gradient_descent/)


## Installation

`Jaxley` is available on [`pypi`](https://pypi.org/project/jaxley/):
```sh
pip install jaxley
Expand All @@ -47,17 +64,12 @@ pip install -U "jax[cuda12]"
We welcome any feedback on how `Jaxley` is working for your neuron models and are happy to receive bug reports, pull requests and other feedback (see [contribute](https://github.com/jaxleyverse/jaxley/blob/main/CONTRIBUTING.md)). We wish to maintain a positive community, please read our [Code of Conduct](https://github.com/jaxleyverse/jaxley/blob/main/CODE_OF_CONDUCT.md).


## Acknowledgements

We greatly benefited from previous toolboxes for simulating multicompartment neurons, in particular [NEURON](https://github.com/neuronsimulator/nrn).


## License

[Apache License](https://github.com/jaxleyverse/jaxley/blob/main/LICENSE)
[Apache License Version 2.0 (Apache-2.0)](https://github.com/jaxleyverse/jaxley/blob/main/LICENSE)


### Citation
## Citation

If you use `Jaxley`, consider citing the [corresponding paper](https://www.biorxiv.org/content/10.1101/2024.08.21.608979):

Expand Down
8 changes: 4 additions & 4 deletions tutorials/01_morph_neurons.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"import matplotlib.pyplot as plt\n",
"\n",
"\n",
"# Build the network.\n",
"# Build the cell.\n",
"comp = jx.Compartment()\n",
"branch = jx.Branch(comp, nseg=4)\n",
"cell = jx.Cell(branch, parents=[-1, 0, 0, 1, 1])\n",
Expand All @@ -44,14 +44,14 @@
"cell.vis(ax=ax)\n",
"\n",
"# Stimulate.\n",
"current = jx.step_current(i_delay=1.0, i_dur=1.0, i_amp=0.1, dt=0.025, t_max=10.0)\n",
"current = jx.step_current(i_delay=1.0, i_dur=1.0, i_amp=0.1, delta_t=0.025, t_max=10.0)\n",
"cell.branch(0).loc(0.0).stimulate(current)\n",
"\n",
"# Record.\n",
"cell.branch(0).loc(0.0).record(\"v\")\n",
"\n",
"# Simulate and plot.\n",
"v = jx.integrate(net)\n",
"v = jx.integrate(cell)\n",
"plt.plot(v.T)\n",
"```"
]
Expand Down Expand Up @@ -247,7 +247,7 @@
"source": [
"### Stimulate the cell\n",
"\n",
"We next stimulate one of the compartments with a step current. For this, we first define the step current:"
"We next stimulate one of the compartments with a step current. For this, we first define the step current (all units are the same as for the `NEURON` simulator, which are listed [here](https://www.neuron.yale.edu/neuron/static/docs/units/unitchart.html)):"
]
},
{
Expand Down
Loading

0 comments on commit 68dc736

Please sign in to comment.