Aim of the course

What I cannot create, I do not understand

Richard Feynman

We aim to teach you how to work with data and with code so that you can get a deeper understanding of how the methods work, how they can fail, how to fix them, and how to develop new methods, if you need them.

We aim to teach you to work efficiently, so that you can in due course forget about your tools and think about the ideas. We aim to make things simple, before easy, so that you can reach a stage where things are both simple and easy.

We hope that you will come out of this course feeling comfortable working with data from raw images to finished activation maps. We will teach you the standard best practice of how to work with code and data to make your analyses more reliable, easier to share, and easier to reproduce.

We’ll use Python for most of the course, but the principles apply equally to languages like MATLAB. We’ll be using Python libraries to show how the analysis works. Later we will show how these principles relate to analysis with standard imaging software such as FSL and SPM.

Who is this course for?

The course is designed for people starting or doing neuroimaging, with some programming experience (for example, writing MATLAB or Python scripts).

We have designed the course to help you:

  • Understand the basic concepts in neuroimaging, and how they relate to the wider world of statistics, engineering, computer science;
  • Be comfortable working with neuroimaging data and code, so you can write your own basic algorithms, and understand other people’s code;
  • Work with code and data in a way that will save you time, help you collaborate, and continue learning.


  • Reasonable knowledge of programming in any language;

Topics we cover

Practical workflow

  • Version control (we teach git);
  • Extensible text editor (see below);
  • Versatile programming language (we teach Python);
  • Testing code;
  • Collaborating with code.

Relevant concepts

  • convolution (hemodynamic modeling, smoothing);
  • interpolation (slice time correction, image resampling);
  • optimization (registration, advanced statistics);
  • basic linear algebra (statistics);

FMRI analysis steps

  • Diagnostics;
  • slice timing;
  • motion correction;
  • registration within and between subject;
  • smoothing;
  • statistical estimation with multiple regression;
  • statistical inference.

Format of the class

  • Prior reading / homework for each week of approx 30 minutes;

  • Class is 2 hours:

    • 10 minutes debrief from previous class
    • 30 minutes talk introduction + questions;
    • 60 minutes problems;
    • 10 minutes review of problems;

As we cover the material, we will also pause at times to cover how to do:

  • version control;
  • code collaboration.