SPM and PythonΒΆ
We have developed a Python interface that enable performing SPM analyses in Python. The package provides an intuitive Python interface to SPM. Under the hood, the package does not reimplement SPM functions but rather relies on Matlab Runtime to execute the SPM routines - guaranteeing that the results are numerically consistent with established Matlab routines.
This project is supported by the SPM team and hosted on Github here.
-
Installation
SPM-Python is available on
pipand does not require a MATLAB license! -
Getting Started
We provide a series of short examples to get started with calling SPM functions, work with SPM objects, and write and run SPM batches.
-
Data types
SPM-Python implements a Python type system that allows all MATLAB types to be interacted with. Get familiar with them.
-
Troubleshooting
Python and MATLAB have fundamentally different design philosophies; interfacing them can lead to issues and ambiguities. We have compiled a list of common problems encountered when using SPM-Python, and their solutions.
-
Tutorials
Read our tutorials for applying SPM-Python in different contexts (fMRI, VBM, EEG, MEG, etc.).
-
API
The complete SPM API documentation is available. All functions describe here can be accessed from MATLAB or from Python.
Warning
This project is currently under construction and might contain bugs. If you experience any issues, please let us know!