dirconn.datasets.require_sample#
- dirconn.datasets.require_sample(*, path: str | Path | None = None, download: bool = False) Path#
Return the root of the MNE
sampledataset, or stop with instructions.Looks for the dataset locally and checks that the files the benchmark reads are present. It never changes MNE’s global configuration (
update_path=False).- Parameters:
path (path-like, optional) – Directory that contains (or will contain)
MNE-sample-data. By default MNE’s own search order applies (MNE_DATA, its configuration, then~/mne_data).download (bool) –
Trueis the explicit confirmation to download the dataset (about 1.5 GB) when it is missing. Nothing is downloaded if the data are already complete.
- Returns:
The
MNE-sample-datadirectory.- Return type:
pathlib.Path
- Raises:
SampleDataMissingError – If the dataset is missing or incomplete and
downloadisFalse, ifpathdoes not exist, or if a download did not supply the files.TypeError – If
downloadis not a bool.