Note
Go to the end to download the full example code.
Download ON-Harmony dataset#
Imports#
from uniharmony import verbosity
from uniharmony.datasets import clean_tmp, download_ONharmony
verbosity("debug")
Load dataset#
download_ONharmony(
subjects="16981",
sessions="NOT4GEP001",
modalities="anat",
suffixes="T1w",
extensions=".json",
)
2026-06-10 10:31:15 [debug ] Validating arguments
2026-06-10 10:31:15 [info ] Visible dataset directory ready at /home/runner/work/UniHarmony/UniHarmony/examples/02-multisite-data/ON-Harmony
2026-06-10 10:31:15 [debug ] Hidden dataset path prepared: /tmp/datalad_cache
2026-06-10 10:31:15 [debug ] Using hidden folder at /tmp/datalad_cache
2026-06-10 10:31:15 [debug ] Source URL: https://github.com/OpenNeuroDatasets/ds004712.git
2026-06-10 10:31:15 [info ] Cloning DataLad dataset...
[INFO] Attempting a clone into /tmp/datalad_cache
[INFO] Attempting to clone from https://github.com/OpenNeuroDatasets/ds004712.git to /tmp/datalad_cache
[INFO] Start enumerating objects
[INFO] Start counting objects
[INFO] Start compressing objects
[INFO] Start receiving objects
[INFO] Start resolving deltas
[INFO] Completed clone attempts for Dataset(/tmp/datalad_cache)
[INFO] Remote origin not usable by git-annex; setting annex-ignore
[INFO] https://github.com/OpenNeuroDatasets/ds004712.git/config download failed: Not Found
2026-06-10 10:31:20 [info ] DataLad dataset cloned successfully
2026-06-10 10:31:20 [info ] Getting: sub-16981/ses-NOT4GEP001/anat/sub-16981_ses-NOT4GEP001_T1w.json
2026-06-10 10:31:20 [info ] Copied derivative files to target directory.
2026-06-10 10:31:20 [info ] Getting: participants.tsv
2026-06-10 10:31:20 [info ] Copied root files to target directory.
Clean up#
# Later, clean up the temporary cache
clean_tmp("datalad_cache")
2026-06-10 10:31:20 [info ] Removing temporary files: /tmp/datalad_cache
2026-06-10 10:31:21 [info ] Temporary cache removed successfully.
Total running time of the script: (0 minutes 6.219 seconds)