download_participants_tsv#

torch_brain.utils.openneuro.download_participants_tsv(dataset_id, target_dir, *, redownload=False)[source]#

Download participants.tsv from OpenNeuro S3.

Parameters:
  • dataset_id (str) – The OpenNeuro dataset identifier

  • target_dir (Path) – Local directory to download to

  • redownload (bool) – If True, re-download and overwrite any existing local file. If False (default), an existing local file is returned as-is.

Return type:

Path | None

Returns:

Path to the downloaded or existing participants.tsv file, or None if the dataset has no participants.tsv on OpenNeuro S3.

Raises:

RuntimeError – If the download fails for a reason other than the file being absent.