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).
- whobpyt.datasets.fetchers.fetch_egmomi2023(dest_folder=None, redownload=False)#
Fetch the data for the Momi et al. (2023) example.
- whobpyt.datasets.fetchers.fetch_egmomi2025(dest_folder=None, redownload=False)#
Fetch the data for the Momi et al. (2025) example.
- Parameters:
- Returns:
strThe folder containing the data, organised into the sub-folders
anatomical,calculate_distance,empirical_data,example_fittingresultsandvirtual_dissection.
- whobpyt.datasets.fetchers.fetch_egismail2026(dest_folder=None, redownload=False)#
Fetch the data for the Ismail et al. (2026) example.
- whobpyt.datasets.fetchers.fetch_eggriffiths2022(dest_folder=None, redownload=False)#
Fetch the data for Griffiths et al. (2022), as one OSF folder.
- 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
hcpl2k8dataset from Google Drive.Returns the path of the
hcpl2k8folder insidedest_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_LITEfolder and thefsaveragefolder intodest_folder(default~/.whobpyt/data/MomiEtAlELife2023). For the example in the documentation, usefetch_egmomi2023()instead.- Returns:
strThe 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.
- 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:
- dlcode
str URL of a zip archive (
download_method='wget') or a Google Drive folder ID ('gdown').- newfolder_name
str Name of the folder to create inside
dest_folder.- dest_folder
str|None Parent folder. Defaults to
get_localdefaultdatapath().- download_method{‘wget’, ‘gdown’}
- dlcode
- Returns:
strPath of the downloaded folder.