download_recording#

brainsets.utils.openneuro.download_recording(s3_url, target_dir)[source]#

Download all files matching an S3 prefix pattern for a recording.

Parameters:
  • s3_url (str) – S3 URL prefix pattern (e.g., ‘s3://openneuro.org/ds005555/sub-1/eeg/sub-1_task-Sleep’)

  • target_dir (Path) – Local directory to download files to

Return type:

list[Path]

Returns:

List of downloaded file paths

Raises:

RuntimeError – If download fails