Skip to content
A tutorial of functional alignment methods in fMRI data
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.



A collection of tutorials for functional alignment methods in fMRI data. This repository does not include implementations of these methods; for this, we recommend BrainIAK, fmralign, or pyMVPA.

Here, we demonstrate functional alignment methods using simulated data as well as the publicly accessible Learning Naturalistic Structure dataset, generously shared by Aly and colleagues. For more information on the acquisition of this data set, please see their paper:

Aly M, Chen J, Turk-Browne NB, & Hasson U (2018). Learning naturalistic temporal structure in the posterior medial network. Journal of Cognitive Neuroscience, 30(9): 1345-1365.

fMRI data were pre-processed using fMRIPrep version 1.5.0rc1. For a full description of the pipeline, please see the Open Science Framework README.

Running on Binder

Unfortunately, several of these tutorials are too computationally intensive to run on the public mybinder instance. Although we are exploring alternative binderhub instances, for now only the simulation tutorial is available to run in-browser.

Local Installation

To access this material locally, you can download this repository and install the requirements using pip. We recommend that you install these requirements within a virtual environment; for example, the following commands will create a conda environment and install all necessary packages:

git clone
cd fmralign-tutorials
conda create --name fmralign-tutorials python=3.6
source activate fmralign-tutorials
pip install -r requirements.txt

You can render the tutorials using Jupytext, which provides a convenient means to sync the user-friendly notebook interface with a git-friendly plain-text Python script.

For example, for the aly_benchmark tutorial, simply run:

jupytext --to notebook
jupytext --sync aly_benchmark.ipynb

You can then launch the notebook using:

jupyter notebook aly_benchmark.ipynb

All changes you make there will be automatically updated in the associated Python script.

You can’t perform that action at this time.