diff --git a/examples/anonymize_dataset.py b/examples/anonymize_dataset.py index 441d03a72..132e515db 100644 --- a/examples/anonymize_dataset.py +++ b/examples/anonymize_dataset.py @@ -23,7 +23,6 @@ # %% import shutil -from pathlib import Path import mne @@ -37,7 +36,7 @@ write_raw_bids, ) -data_path = Path(mne.datasets.sample.data_path()) +data_path = mne.datasets.sample.data_path() event_id = { "Auditory/Left": 1, "Auditory/Right": 2, diff --git a/examples/create_bids_folder.py b/examples/create_bids_folder.py index 7b81602fc..b050b97b6 100644 --- a/examples/create_bids_folder.py +++ b/examples/create_bids_folder.py @@ -20,7 +20,8 @@ # First we will import the relevant functions import shutil -from pathlib import Path + +import mne from mne_bids import BIDSPath @@ -51,11 +52,11 @@ # # You can also use MNE-BIDS to create folder hierarchies. -my_root = Path(__file__).resolve().parent # replace with *your* root folder +my_root = mne.datasets.sample.data_path() # replace with *your* root folder bids_path = BIDSPath( - subject="01", session="mysession", datatype="meg", root=my_root + subject="mneBIDStest", session="mysession", datatype="meg", root=my_root ).mkdir() print(bids_path.directory) # clean up -shutil.rmtree(my_root / "sub-01") +shutil.rmtree(my_root / "sub-mneBIDStest")