This article is written as a Jupyter notebook which you can execute and modify interactively. You can either download it via the “Source” link on the top right, or run it directly in the browser on the mybinder infrastructure:
For more information, see our general Notes on Notebooks.
QuickstartTo run the code below:
- Click on the cell to select it.
SHIFT+ENTERon your keyboard or press the play button () in the toolbar above
SHIFT+ENTERwhile this cell is selected.
This article demonstrates how a control flow, where simulation parameters depend on the results of previous simulations, can be expressed by making use of standard control structures in Python. By having access to the full expressivity of a general purpose programming language, expressing such control flow is straight-forward; this would not be the case for a declarative model description.
Our goal in this toy example is to find the threshold voltage of neuron as a function of the density of sodium channels.
This example is from our eLife paper (Stimberg et al. 2019).