Data Management

NiSpace ships with no data bundled. All datasets — parcellations, brain templates, reference maps, and example data — are downloaded on demand the first time they are requested and cached locally.

Storage location

By default, data are stored in ~/nispace-data/ on all platforms. Set the environment variable NISPACE_DATA_DIR to use a different path:

export NISPACE_DATA_DIR=/path/to/your/data

or in Python before importing NiSpace:

import os
os.environ["NISPACE_DATA_DIR"] = "/path/to/your/data"

The directory structure mirrors the NiSpace data repository:

~/nispace-data/
├── parcellation/
├── reference/
├── template/
└── example/

Data versioning

The NiSpace package version and the data version are tightly coupled. Internally, every NiSpace release pins a specific commit of the NiSpace data repository, so all users on the same package version receive byte-for-byte identical data.

This means:

  • Upgrading ``NiSpace`` may update or add datasets automatically on next use.

  • You cannot mix data versions: the toolbox controls which data commit is used.

  • For strict reproducibility, pin your NiSpace installation to a specific package commit (see Installation via pip from GitHub).

Integrity checking

Every downloaded file is verified against a SHA-256 hash manifest shipped inside the package. If a file is missing, incomplete, or corrupted, NiSpace automatically re-downloads it — no manual intervention required. A log message marked Updating indicates that a cached file was replaced.

Reproducibility

NiSpace logs the package version and source-code commit at the start of every analysis. Include this information when reporting results:

import nispace
print(nispace.__version__)   # package version
print(nispace.__commit__)    # exact source commit

For full reproducibility, report both the NiSpace version (which implicitly identifies the data version) and the specific commit hash.