download_dataset_description#

brainsets.utils.openneuro.download_dataset_description(dataset_id, target_dir)[source]#

Download dataset_description.json from OpenNeuro S3.

This file is required for mne-bids to recognize a valid BIDS dataset. If the file already exists locally, it is not re-downloaded.

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

  • target_dir (Path) – Local directory to download to

Return type:

Path

Returns:

Path to the downloaded or existing dataset_description.json file

Raises:

RuntimeError – If download fails or file doesn’t exist on S3