Installation#
CaliBrain can be installed from source for development or installed into a
standard Python environment for running workflows. The package metadata currently
declares Python >=3.6; in practice, the scientific Python dependencies used
by the workflows are best managed with a recent conda or virtualenv environment.
Dependencies#
Core dependencies are declared in pyproject.toml and include:
numpypandasscipyscikit-learnmnePOTnibabelpyyamlmatplotliband visualization dependencies
Documentation dependencies are declared in the optional docs extra.
Source installation#
From a local checkout:
git clone https://github.com/braindatalab/CaliBrain.git
cd CaliBrain
python -m pip install -e .
For documentation builds:
python -m pip install -e ".[docs]"
Conda environment#
The repository includes environment.yml. Use it when you want conda to
create the scientific Python environment:
conda env create -f environment.yml
conda activate calibrain
python -m pip install -e .
Pip requirements#
For a pip-only setup:
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -e .
Data directory#
Workflow examples expect precomputed forward solutions and leadfields. By
default, CaliBrain uses the repository data/ directory. To use another data
location, set:
export CALIBRAIN_DATA=/path/to/calibrain/data
The workflow configs also contain explicit paths for results, posterior
summaries, run manifests, aggregation outputs, and calibration outputs. Inspect
configs/*.py before running large experiments.
Building the documentation#
From the repository root:
cd docs
make html
The rendered site is written to docs/build/html/index.html.
Installation topics