Installation#
MPAT needs Python 3.10 or newer. It depends on MITTENS
v2 (mittens-dmri), which is not on PyPI yet, so pip builds it from GitHub. That build needs a
Rust toolchain (rustup.rs) and maturin:
pip install maturin
pip install "mpat-tractography[viewer] @ git+https://github.com/rokemlab/MPAT.git"
Extras:
extra |
for |
|---|---|
|
|
|
the test suite ( |
|
building this documentation |
The other dependencies are numpy, scipy, nibabel, numba, DIPY, scikit-image and pyAFQ (≥ 3.4).
Building the documentation#
pip install -e ".[docs,test]"
make -C docs html # = sphinx-build -b html docs/source docs/build/html
The docs/ folder keeps sources and outputs apart:
folder |
|
|---|---|
|
the pages (MyST Markdown), |
|
hand-written assets (CSS) |
|
the scripts that render the figures and animations, and the phantom they share |
|
the Sphinx extension that runs those scripts and embeds their output |
|
everything generated: |
The figures and animations on How MPAT works are rendered at build time by the scripts in
docs/animations/, which run MPAT on a small phantom. That takes a few minutes the first time.
The results are cached and re-rendered only when a script or MPAT’s source changes. Two
environment variables control this:
MPAT_DOCS_ANIMATIONS=skipskips rendering for quick edits to the text.MPAT_DOCS_ANIMATIONS=gifwrites GIFs instead of MP4s.