/voxelwise_tutorials

Voxelwise modeling tutorial from the Gallantlab.

Primary LanguageJupyter NotebookBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Voxelwise modeling tutorials

Github Python License

Welcome to the voxelwise modeling tutorial from the Gallantlab.

Tutorials

This repository contains tutorials describing how to use the voxelwise modeling framework. Voxelwise modeling is a framework to perform functional magnetic resonance imaging (fMRI) data analysis, fitting encoding models at the voxel level.

To explore these tutorials, one can:

  • read the rendered examples in the tutorials website (recommended)
  • run the Python scripts (tutorials directory)
  • run the Jupyter notebooks (tutorials/notebooks directory)
  • run the merged notebook in Colab.

The tutorials are best explored in order, starting with the "Movies" tutorial.

Helper Python package

To run the tutorials, this repository contains a small Python package called voxelwise_tutorials, with useful functions to download the data sets, load the files, process the data, and visualize the results.

Installation

To install the voxelwise_tutorials package, run:

pip install voxelwise_tutorials

To also download the tutorial scripts and notebooks, clone the repository via:

git clone https://github.com/gallantlab/voxelwise_tutorials.git
cd voxelwise_tutorials
pip install .

Developers can also install the package in editable mode via:

pip install --editable .

Requirements

The package voxelwise_tutorials has the following dependencies: numpy, scipy, h5py, scikit-learn, matplotlib, networkx, nltk, pycortex, himalaya, pymoten.

Cite as

If you use one of our packages in your work (voxelwise_tutorials [1], himalaya [2], pycortex [3], or pymoten [4]), please cite the corresponding publications:

[1]Deniz, F., Visconti di Oleggio Castello, M., Dupré La Tour, T., & Gallant, J. L. (2022). Voxelwise encoding models in functional MRI. In preparation.
[2]Dupré La Tour, T., Eickenberg, M., & Gallant, J. L. (2022). Variance decomposition with banded ridge regression. In preparation.
[3]Gao, J. S., Huth, A. G., Lescroart, M. D., & Gallant, J. L. (2015). Pycortex: an interactive surface visualizer for fMRI. Frontiers in neuroinformatics, 23.
[4]Nunez-Elizalde, A.O., Deniz, F., Dupré la Tour, T., Visconti di Oleggio Castello, M., and Gallant, J.L. (2021). pymoten: scientific python package for computing motion energy features from video. Zenodo. https://doi.org/10.5281/zenodo.6349625