download_meta#
- torch_brain.utils.openneuro.download_meta(dataset_id, target_dir, filename, *, redownload=False, required=False)[source]#
Download a metadata file from OpenNeuro S3.
- Parameters:
dataset_id (
str) – The OpenNeuro dataset identifiertarget_dir (
Path) – Local directory to download tofilename (
str) – Metadata filename at the dataset root (for example,"dataset_description.json"or"participants.tsv")redownload (
bool) – IfTrue, re-download and overwrite any existing local file. IfFalse(default), an existing local file is returned as-is.required (
bool) – IfTrue, raiseRuntimeErrorwhen the file is missing on S3. IfFalse(default), returnNonewhen the file is absent.
- Return type:
- Returns:
Path to the downloaded or existing local file, or
Noneif the file is not present on S3 andrequiredisFalse.- Raises:
RuntimeError – If the download fails, or if the file is missing on S3 and
requiredisTrue.