Making use of Python: threshold finding with bisection

Quickstart

To run the code below:
  1. Click on the cell to select it.
  2. Press SHIFT+ENTER on your keyboard or press the play button () in the toolbar above
Feel free to create new cells using the plus button (), or pressing SHIFT+ENTER while 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).

Read more…

Non-standard neuron modelling: smooth pursuit eye movements

Quickstart

To run the code below:
  1. Click on the cell to select it.
  2. Press SHIFT+ENTER on your keyboard or press the play button () in the toolbar above
Feel free to create new cells using the plus button (), or pressing SHIFT+ENTER while this cell is selected.

In this article we demonstrate how Brian can be used to simulate non-neural aspects of the model. This is an idealized model of the smooth pursuit reflex, including two ocular muscles, a moving visual stimulus and spiking neural control.

This article is adapted from our eLife paper (Stimberg et al. 2019), which includes an interactive version that you can play with here.

Read more…

Non-standard neuron modelling: the pyloric network

Quickstart

To run the code below:
  1. Click on the cell to select it.
  2. Press SHIFT+ENTER on your keyboard or press the play button () in the toolbar above
Feel free to create new cells using the plus button (), or pressing SHIFT+ENTER while this cell is selected.

One of the great advantages of using Brian is that defining new non-standard model types is easy. In this article, we will build a highly simplified model of the pyloric circuit of the crustacean stomatogastric ganglion. This circuit generates a tri-phasic rhythmic pattern with alternating bursts of action potentials in different types of motor neurons. Here, we follow previous work (e.g. Golowasch et al., 1999) by modeling the circuit as consisting of three populations: AB/PD (anterior buster and pyloric dilator neurons), LP (lateral pyloric neurons), and PY (pyloric neurons). This model has a number of non-standard properties that will be described in the following annotated version of the code.

Golowasch, J., Casey, M., Abbott, L. F., & Marder, E. (1999).
Network Stability from Activity-Dependent Regulation of Neuronal Conductances.
Neural Computation, 11(5), 1079-1096.
https://doi.org/10.1162/089976699300016359

This article was based on one of the examples from our eLife paper (Stimberg et al. 2019).

Read more…

Notes on Notebooks

The articles in this blog are written as Jupyter notebooks – interactive documents that contain text, Python code, and the results of running the code (i.e. text or figures). This article gives some details on the various ways to use them and explains common commands we use when presenting Brian code.

While the documents are “static” on this website, i.e. you can neither change nor run the code, you have two options to interactively explore and modify their content:

Read more…

GSoC 2020: work on Brian during the summer

The INCF is again applying to be a mentor organization in Google’s Summer of Code program, a “a global program focused on bringing more student developers into open source software development”. Changes are quite high that it will be selected, since its participation in the last years was very successful. If this is the case, there will be an opportunity to work on the Brian simulator, please see the list of proposed projects (Brian projects are number 8 and 9). Feel free to ask questions or discuss the project on the Neurostars forum (find all projects in the GSoC category). It is not mandatory to work on one of the proposed projects, though, please contact marcel.stimberg@inserm.fr if you have an idea of your own.

New release: Brian 2.3

Happy New Year to all Brian users 🎉! We are happy to announce a new release, Brian 2.3. This release fixes a number of bugs and introduces some new features. It also paves the way for the transition from Python 2 to Python 3 – given that Python 2 is now no longer officially supported, Brian 2.3 will be the last release to support Python 2. For a full list of changes, see the release notes. We recommend all users of Brian 2 to update.

Read more…

Paper on Brian 2 published in eLife

We are happy to report that our paper “Brian 2, an intuitive and efficient neural simulator” has been accepted for publication in eLife: https://elifesciences.org/articles/47314

In this paper, we describe a number of examples that showcase various features of Brian 2, ranging from non-standard neuronal/synaptic models to interacting with hardware in real time via C++ code. All the code to run these examples is openly available in a github repository.
The examples are provided as interactive jupyter notebooks, and can be tried out without a local installation of Brian by running them on the binder infrastructure.

Brian 2.2

We are happy to announce the release of Brian 2.2. This release includes a number of important fixes and performance improvements. It also makes sure that simulation no longer give platform-dependent results for certain corner cases that involve the division of integers. For a full list of changes, see the release notes. We recommend all users of Brian 2 to update. Brian 2 can be installed with Anaconda from the conda-forge channel, or with pip from the pypi repository. Detailed installation instructions: http://brian2.readthedocs.io/en/2.2/introduction/install.html As always, please report bugs or suggestions to the github bug tracker (https://github.com/brian-team/brian2/issues) or to the brian-development mailing list (brian-development@googlegroups.com).

Brian 2.1.3

We are happy to announce the release of Brian 2.1.3. This release includes a number of important fixes and performance improvements. For a full list of changes, see the release notes. We recommend all users of Brian 2 to update. From this release on, conda packages will be provided via the conda-forge channel. For a limited time, we will additionally copy over packages to the brian-team channel, but this channel should now be considered deprecated. How to get Brian 2: http://brian2.readthedocs.io/en/2.1.3.1/introduction/install.html As always, please report bugs or suggestions to the github bug tracker (https://github.com/brian-team/brian2/issues) or to the brian-development mailing list (brian-development@googlegroups.com).