dirconn.datasets.require_sample#

dirconn.datasets.require_sample(*, path: str | Path | None = None, download: bool = False) → Path#

Return the root of the MNE sample dataset, 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) – True is 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-data directory.

Return type:

pathlib.Path

Raises:
  • SampleDataMissingError – If the dataset is missing or incomplete and download is False, if path does not exist, or if a download did not supply the files.

  • TypeError – If download is not a bool.