Skip to content

Installation

Requirements

  • Python ≥ 3.13
  • PyTorch ≥ 2.2
  • Linux / macOS / Windows
  • Optional CUDA-enabled GPU for training speed

Install from PyPI

pip install neuroscience-control

Or with uv:

uv add neuroscience-control

Install from source

git clone https://github.com/dani2442/neuroscience_control.git
cd neuroscience_control
uv sync

Optional dataset integrations

nilearn is included by default. For OpenNeuro and DataLad dataset download support, install the datasets extra:

pip install "neuroscience-control[datasets]"
# or
uv sync --group datasets

Verify installation

python -c "import src; print(src.__version__)"

Import namespace

Install the package as neuroscience-control, but import from src in the current repository layout:

from src.models import CoupledHopfModel, NeuralSDE
from src.metrics import FCCorrelation, PhFCD
from src.training import Trainer, HopfConfig

Dependency notes

Complex-valued torchsde fork

This project depends on a fork of torchsde that adds complex Brownian motion support. When installing from source with uv, this is resolved automatically via the [tool.uv.sources] override in pyproject.toml. If you install with plain pip, it will use the PyPI torchsde release (which may lack complex-valued support).