moabb.datasets.download.data_dl#

moabb.datasets.download.data_dl(url, sign, path=None, force_update=False, verbose=None, fname=None)[source]#

Download file from url to specified path.

This function should replace data_path as the MNE will not support the download of dataset anymore. This version is using Pooch.

Parameters:
  • url (str) – Path to remote location of data

  • sign (str) – Signifier of dataset

  • path (None | str) – Location of where to look for the data storing location. If None, the environment variable or config parameter MNE_DATASETS_(signifier)_PATH is used. If it doesn’t exist, the “~/mne_data” directory is used. If the dataset is not found under the given path, the data will be automatically downloaded to the specified folder.

  • force_update (bool) – Force update of the dataset even if a local copy exists.

  • verbose (bool, str, int, or None) – If not None, override default verbose level (see mne.verbose()).

  • fname (None | str) – Name to store the file under, relative to the dataset directory. By default the name is derived from url, which assumes the URL ends in the filename. Pass this for APIs whose download URLs do not: DSpace serves every bitstream from .../bitstreams/<uuid>/content, so URL-derived naming would store each one as content.

Returns:

path – Local path to the given data file. This path is contained inside a list of length one, for compatibility.

Return type:

list of str

Examples using moabb.datasets.download.data_dl#

Tutorial 4: Creating custom datasets

Tutorial 4: Creating custom datasets