Datasets#

Fetchers for the example datasets. Each downloads its dataset the first time it is called and returns the folder it was saved to. See Datasets for what each one contains.

whobpyt.datasets.fetchers.fetch_egtmseeg(dest_folder=None, redownload=False)#

Fetch the data for the TMS-EEG example (one subject).

Parameters:
dest_folderstr | None

Where to save the files. Defaults to ~/.whobpyt/data/eg__tmseeg.

redownloadbool

If True, delete any existing copy and download again.

Returns:
str

The folder containing the data.

whobpyt.datasets.fetchers.fetch_egmomi2023(dest_folder=None, redownload=False)#

Fetch the data for the Momi et al. (2023) example.

Parameters:
dest_folderstr | None

Where to save the files. Defaults to ~/.whobpyt/data/eg__momi2023.

redownloadbool

If True, delete any existing copy and download again.

Returns:
str

The folder containing the data.

whobpyt.datasets.fetchers.fetch_egmomi2025(dest_folder=None, redownload=False)#

Fetch the data for the Momi et al. (2025) example.

Parameters:
dest_folderstr | None

Where to save the files. Defaults to ~/.whobpyt/data/eg__momi2025.

redownloadbool

If True, delete any existing copy and download again.

Returns:
str

The folder containing the data, organised into the sub-folders anatomical, calculate_distance, empirical_data, example_fittingresults and virtual_dissection.

whobpyt.datasets.fetchers.fetch_egismail2026(dest_folder=None, redownload=False)#

Fetch the data for the Ismail et al. (2026) example.

Parameters:
dest_folderstr | None

Where to save the files. Defaults to ~/.whobpyt/data/eg__ismail2026.

redownloadbool

If True, delete any existing copy and download again.

Returns:
str

The folder containing the data.

whobpyt.datasets.fetchers.fetch_eggriffiths2022(dest_folder=None, redownload=False)#

Fetch the data for Griffiths et al. (2022), as one OSF folder.

Parameters:
dest_folderstr | None

Parent folder to save into. The data go in an eg__griffiths2022 sub-folder. Defaults to ~/.whobpyt/data.

redownloadbool

If True, delete any existing copy and download again.

Returns:
str

The folder containing the data.

whobpyt.datasets.fetchers.get_localdefaultdatapath()#

Return the default data folder (~/.whobpyt/data, expanded).

Older datasets#

whobpyt.datasets.fetchers.fetch_hcpl2k8(dest_folder=None)#

Fetch the hcpl2k8 dataset from Google Drive.

Returns the path of the hcpl2k8 folder inside dest_folder (default ~/.whobpyt/data).

whobpyt.datasets.fetchers.fetch_MomiEtAlELife2023(dest_folder=None)#

Fetch the full Momi et al. (2023) reproduction data from Google Drive.

Downloads the DATA_LITE folder and the fsaverage folder into dest_folder (default ~/.whobpyt/data/MomiEtAlELife2023). For the example in the documentation, use fetch_egmomi2023() instead.

Returns:
str

The folder containing the data.

whobpyt.datasets.fetchers.fetch_egismail2025(dest_folder=None, redownload=False)#

Deprecated alias for fetch_egismail2026().

The Ismail et al. paper was published in 2026, and its example dataset is now fetched by fetch_egismail2026. This name is kept so that older code keeps working; it will be removed in a future release.

Download helpers#

whobpyt.datasets.fetchers.pull_file(dlcode, destination, download_method='wget')#

Download a single file to destination.

Parameters:
dlcodestr

A full URL (download_method='wget', the name is kept for backward compatibility; the download is done in Python, not with the wget program), or a Google Drive file ID ('gdown' or 'requests').

destinationstr

Path of the file to write.

download_method{‘wget’, ‘gdown’, ‘requests’}
whobpyt.datasets.fetchers.pull_folder(dlcode, newfolder_name, dest_folder=None, download_method='wget')#

Download a whole folder into dest_folder/newfolder_name.

Skipped if that folder already exists.

Parameters:
dlcodestr

URL of a zip archive (download_method='wget') or a Google Drive folder ID ('gdown').

newfolder_namestr

Name of the folder to create inside dest_folder.

dest_folderstr | None

Parent folder. Defaults to get_localdefaultdatapath().

download_method{‘wget’, ‘gdown’}
Returns:
str

Path of the downloaded folder.