Learning objectives
In this tutorial, you will learn how to build a simple network of integrate-and-fire neurons using PyNN, how to run simulation experiments with this network using different simulators, and how to visualize the data generated by these experiments.
Audience
This tutorial is intended for people with at least a basic knowledge of neuroscience (high school level or above) and basic familiarity with the Python programming language. It should also be helpful for people who already have advanced knowledge of neuroscience and neural simulation, who simply wish to learn how to use PyNN, and how it differs from other simulation tools they know.
Prerequisites
To follow this tutorial, you need a basic knowledge of neuroscience (high-school level or greater), basic familiarity with the Python programming language, and either a computer with PyNN, NEST, NEURON and Brian 2 installed, or an EBRAINS account and basic familiarity with Jupyter notebooks. If you don't have these tools installed, see one of our previous tutorials which guide you through the installation.
Format
This tutorial will be a video combining slides, animations, and screencast elements. The intended duration is 10 minutes.
Script
Introduce yourself
Hello, my name is X.
This video is one of a series of tutorials for PyNN, which is Python software for modelling and simulating spiking neural networks.
For a list of the other tutorials in this series, you can visit ebrains.eu/service/pynn, that's p-y-n-n.
State the learning objectives
In this tutorial, you will learn the basics of PyNN: how to build a simple network of integrate-and-fire neurons using PyNN, how to run simulation experiments with this network using different simulators, and how to visualize the data generated by these experiments.
State prerequisites
To follow this tutorial, you need a basic knowledge of neuroscience (high-school level or greater), basic familiarity with the Python programming language, and you should have already followed our earlier tutorial video which guides you through the installation process.
This video covers PyNN 0.10. If you've installed a more recent version of PyNN, you might want to look for an updated version of this video.
Description, explanation, and practice
PyNN is a tool for building models of nervous systems, and parts of nervous systems, at the level of individual neurons and synapses.
We'll start off creating a group of 100 neurons, using a really simple model of a neuron, the leaky integrate-and-fire model.
When we inject positive current into this model, either from an electrode or from an excitatory synapse, it increases the voltage across the cell membrane, until the voltage reaches a certain threshold.
At that point, the neuron produces an action potential, also called a spike, and the membrane voltage is reset.
Let's start by writing a docstring, "Simple network model using PyNN".
For now, we're going to use the NEST simulator to simulate this model, so we import the PyNN-for-NEST module.
Like with any numerical model, we need to break time down into small steps, so let's set that up with steps of 0.1 milliseconds.
PyNN comes with a selection of integrate-and-fire models. We're going to use the IF_curr_exp model, where "IF" is for integrate-and-fire, "curr" means that synaptic responses are changes in current, and "exp" means that the shape of the current is a decaying exponential function.
Summary (In this tutorial, you have learned to do X…)
.
Acknowledgements if appropriate
.
References to websites (For more information, visit us at…)
.
Contact information (For questions, contact us at…)
.