Open In Colab   Open in Kaggle

Tutorial: LIF Neuron Part I#

Week 0, Day 1: Python Workshop 1

By Neuromatch Academy

Content creators: Marco Brigham and the CCNSS team

Content reviewers: Michael Waskom, Karolina Stosio, Spiros Chavlis

Production editors: Ella Batty, Spiros Chavlis

Tutorial objectives#

During NMA, you will be using code to learn computational neuroscience in an interactive (and hopefully fun) way. This tutorial and the next are to help you get up to speed on Python before the course, so that during the course you can focus on the computational neuroscience concepts.

In this notebook, we’ll practice basic operations with Python variables, control flow, plotting, and take a sneak peek at np.array, the workhorse of scientific computation in Python.

Each new concept in Python will unlock a different aspect of our implementation of a Leaky Integrate-and-Fire (LIF) neuron. And as if it couldn’t get any better, we’ll visualize the evolution of its membrane potential in time, and extract its statistical properties!


Please execute the cell(s) below to initialize the no