eegdash 0.3.7.dev105__py3-none-any.whl → 0.3.7.dev110__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of eegdash might be problematic. Click here for more details.
- eegdash/__init__.py +1 -1
- eegdash/api.py +91 -43
- eegdash/bids_eeg_metadata.py +75 -5
- eegdash/data_utils.py +123 -28
- eegdash/dataset/dataset_summary.csv +256 -0
- eegdash/paths.py +28 -0
- {eegdash-0.3.7.dev105.dist-info → eegdash-0.3.7.dev110.dist-info}/METADATA +10 -5
- {eegdash-0.3.7.dev105.dist-info → eegdash-0.3.7.dev110.dist-info}/RECORD +11 -9
- {eegdash-0.3.7.dev105.dist-info → eegdash-0.3.7.dev110.dist-info}/WHEEL +0 -0
- {eegdash-0.3.7.dev105.dist-info → eegdash-0.3.7.dev110.dist-info}/licenses/LICENSE +0 -0
- {eegdash-0.3.7.dev105.dist-info → eegdash-0.3.7.dev110.dist-info}/top_level.txt +0 -0
eegdash/__init__.py
CHANGED
eegdash/api.py
CHANGED
|
@@ -7,7 +7,6 @@ from urllib.parse import urlsplit
|
|
|
7
7
|
|
|
8
8
|
import mne
|
|
9
9
|
import numpy as np
|
|
10
|
-
import platformdirs
|
|
11
10
|
import xarray as xr
|
|
12
11
|
from dotenv import load_dotenv
|
|
13
12
|
from joblib import Parallel, delayed
|
|
@@ -18,14 +17,23 @@ from s3fs import S3FileSystem
|
|
|
18
17
|
|
|
19
18
|
from braindecode.datasets import BaseConcatDataset
|
|
20
19
|
|
|
21
|
-
from .bids_eeg_metadata import
|
|
20
|
+
from .bids_eeg_metadata import (
|
|
21
|
+
build_query_from_kwargs,
|
|
22
|
+
load_eeg_attrs_from_bids_file,
|
|
23
|
+
merge_participants_fields,
|
|
24
|
+
normalize_key,
|
|
25
|
+
)
|
|
22
26
|
from .const import (
|
|
23
27
|
ALLOWED_QUERY_FIELDS,
|
|
24
28
|
RELEASE_TO_OPENNEURO_DATASET_MAP,
|
|
25
29
|
)
|
|
26
30
|
from .const import config as data_config
|
|
27
|
-
from .data_utils import
|
|
31
|
+
from .data_utils import (
|
|
32
|
+
EEGBIDSDataset,
|
|
33
|
+
EEGDashBaseDataset,
|
|
34
|
+
)
|
|
28
35
|
from .mongodb import MongoConnectionManager
|
|
36
|
+
from .paths import get_default_cache_dir
|
|
29
37
|
|
|
30
38
|
logger = logging.getLogger("eegdash")
|
|
31
39
|
|
|
@@ -709,7 +717,8 @@ class EEGDashDataset(BaseConcatDataset):
|
|
|
709
717
|
self.n_jobs = n_jobs
|
|
710
718
|
self.eeg_dash_instance = eeg_dash_instance or EEGDash()
|
|
711
719
|
|
|
712
|
-
|
|
720
|
+
# Resolve a unified cache directory across code/tests/CI
|
|
721
|
+
self.cache_dir = Path(cache_dir or get_default_cache_dir())
|
|
713
722
|
|
|
714
723
|
if not self.cache_dir.exists():
|
|
715
724
|
warn(f"Cache directory does not exist, creating it: {self.cache_dir}")
|
|
@@ -784,20 +793,49 @@ class EEGDashDataset(BaseConcatDataset):
|
|
|
784
793
|
f"Offline mode is enabled, but local data_dir {self.data_dir} does not exist."
|
|
785
794
|
)
|
|
786
795
|
records = self._find_local_bids_records(self.data_dir, self.query)
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
796
|
+
# Try to enrich from local participants.tsv to restore requested fields
|
|
797
|
+
try:
|
|
798
|
+
bids_ds = EEGBIDSDataset(
|
|
799
|
+
data_dir=str(self.data_dir), dataset=self.query["dataset"]
|
|
800
|
+
) # type: ignore[index]
|
|
801
|
+
except Exception:
|
|
802
|
+
bids_ds = None
|
|
803
|
+
|
|
804
|
+
datasets = []
|
|
805
|
+
for record in records:
|
|
806
|
+
# Start with entity values from filename
|
|
807
|
+
desc: dict[str, Any] = {
|
|
808
|
+
k: record.get(k)
|
|
809
|
+
for k in ("subject", "session", "run", "task")
|
|
810
|
+
if record.get(k) is not None
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
if bids_ds is not None:
|
|
814
|
+
try:
|
|
815
|
+
rel_from_dataset = Path(record["bidspath"]).relative_to(
|
|
816
|
+
record["dataset"]
|
|
817
|
+
) # type: ignore[index]
|
|
818
|
+
local_file = (self.data_dir / rel_from_dataset).as_posix()
|
|
819
|
+
part_row = bids_ds.subject_participant_tsv(local_file)
|
|
820
|
+
desc = merge_participants_fields(
|
|
821
|
+
description=desc,
|
|
822
|
+
participants_row=part_row
|
|
823
|
+
if isinstance(part_row, dict)
|
|
824
|
+
else None,
|
|
825
|
+
description_fields=description_fields,
|
|
826
|
+
)
|
|
827
|
+
except Exception:
|
|
828
|
+
pass
|
|
829
|
+
|
|
830
|
+
datasets.append(
|
|
831
|
+
EEGDashBaseDataset(
|
|
832
|
+
record=record,
|
|
833
|
+
cache_dir=self.cache_dir,
|
|
834
|
+
s3_bucket=self.s3_bucket,
|
|
835
|
+
description=desc,
|
|
836
|
+
**base_dataset_kwargs,
|
|
837
|
+
)
|
|
798
838
|
)
|
|
799
|
-
for record in records
|
|
800
|
-
]
|
|
801
839
|
elif self.query:
|
|
802
840
|
# This is the DB query path that we are improving
|
|
803
841
|
datasets = self._find_datasets(
|
|
@@ -882,23 +920,16 @@ class EEGDashDataset(BaseConcatDataset):
|
|
|
882
920
|
else:
|
|
883
921
|
matching_args[finder_key] = [entity_val]
|
|
884
922
|
|
|
885
|
-
|
|
923
|
+
matched_paths = find_matching_paths(
|
|
886
924
|
root=str(dataset_root),
|
|
887
925
|
datatypes=["eeg"],
|
|
888
926
|
suffixes=["eeg"],
|
|
889
927
|
ignore_json=True,
|
|
890
928
|
**matching_args,
|
|
891
929
|
)
|
|
930
|
+
records_out: list[dict] = []
|
|
892
931
|
|
|
893
|
-
|
|
894
|
-
seen_files: set[str] = set()
|
|
895
|
-
|
|
896
|
-
for bids_path in paths:
|
|
897
|
-
fpath = str(Path(bids_path.fpath).resolve())
|
|
898
|
-
if fpath in seen_files:
|
|
899
|
-
continue
|
|
900
|
-
seen_files.add(fpath)
|
|
901
|
-
|
|
932
|
+
for bids_path in matched_paths:
|
|
902
933
|
# Build bidspath as dataset_id / relative_path_from_dataset_root (POSIX)
|
|
903
934
|
rel_from_root = (
|
|
904
935
|
Path(bids_path.fpath)
|
|
@@ -915,29 +946,37 @@ class EEGDashDataset(BaseConcatDataset):
|
|
|
915
946
|
"session": (bids_path.session or None),
|
|
916
947
|
"task": (bids_path.task or None),
|
|
917
948
|
"run": (bids_path.run or None),
|
|
918
|
-
# minimal fields to satisfy BaseDataset
|
|
949
|
+
# minimal fields to satisfy BaseDataset from eegdash
|
|
919
950
|
"bidsdependencies": [], # not needed to just run.
|
|
920
951
|
"modality": "eeg",
|
|
921
|
-
#
|
|
922
|
-
"sampling_frequency":
|
|
923
|
-
"nchans":
|
|
924
|
-
"ntimes":
|
|
952
|
+
# minimal numeric defaults for offline length calculation
|
|
953
|
+
"sampling_frequency": None,
|
|
954
|
+
"nchans": None,
|
|
955
|
+
"ntimes": None,
|
|
925
956
|
}
|
|
926
|
-
|
|
957
|
+
records_out.append(rec)
|
|
927
958
|
|
|
928
|
-
return
|
|
959
|
+
return records_out
|
|
929
960
|
|
|
930
961
|
def _find_key_in_nested_dict(self, data: Any, target_key: str) -> Any:
|
|
931
|
-
"""
|
|
932
|
-
|
|
962
|
+
"""Recursively search for target_key in nested dicts/lists with normalized matching.
|
|
963
|
+
|
|
964
|
+
This makes lookups tolerant to naming differences like "p-factor" vs "p_factor".
|
|
965
|
+
Returns the first match or None.
|
|
933
966
|
"""
|
|
967
|
+
norm_target = normalize_key(target_key)
|
|
934
968
|
if isinstance(data, dict):
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
if
|
|
940
|
-
return
|
|
969
|
+
for k, v in data.items():
|
|
970
|
+
if normalize_key(k) == norm_target:
|
|
971
|
+
return v
|
|
972
|
+
res = self._find_key_in_nested_dict(v, target_key)
|
|
973
|
+
if res is not None:
|
|
974
|
+
return res
|
|
975
|
+
elif isinstance(data, list):
|
|
976
|
+
for item in data:
|
|
977
|
+
res = self._find_key_in_nested_dict(item, target_key)
|
|
978
|
+
if res is not None:
|
|
979
|
+
return res
|
|
941
980
|
return None
|
|
942
981
|
|
|
943
982
|
def _find_datasets(
|
|
@@ -969,11 +1008,20 @@ class EEGDashDataset(BaseConcatDataset):
|
|
|
969
1008
|
self.records = self.eeg_dash_instance.find(query)
|
|
970
1009
|
|
|
971
1010
|
for record in self.records:
|
|
972
|
-
description = {}
|
|
1011
|
+
description: dict[str, Any] = {}
|
|
1012
|
+
# Requested fields first (normalized matching)
|
|
973
1013
|
for field in description_fields:
|
|
974
1014
|
value = self._find_key_in_nested_dict(record, field)
|
|
975
1015
|
if value is not None:
|
|
976
1016
|
description[field] = value
|
|
1017
|
+
# Merge all participants.tsv columns generically
|
|
1018
|
+
part = self._find_key_in_nested_dict(record, "participant_tsv")
|
|
1019
|
+
if isinstance(part, dict):
|
|
1020
|
+
description = merge_participants_fields(
|
|
1021
|
+
description=description,
|
|
1022
|
+
participants_row=part,
|
|
1023
|
+
description_fields=description_fields,
|
|
1024
|
+
)
|
|
977
1025
|
datasets.append(
|
|
978
1026
|
EEGDashBaseDataset(
|
|
979
1027
|
record,
|
eegdash/bids_eeg_metadata.py
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import logging
|
|
2
|
+
import re
|
|
2
3
|
from pathlib import Path
|
|
3
4
|
from typing import Any
|
|
4
5
|
|
|
5
6
|
from .const import ALLOWED_QUERY_FIELDS
|
|
6
7
|
from .const import config as data_config
|
|
7
|
-
from .data_utils import EEGBIDSDataset
|
|
8
8
|
|
|
9
9
|
logger = logging.getLogger("eegdash")
|
|
10
10
|
|
|
11
11
|
__all__ = [
|
|
12
12
|
"build_query_from_kwargs",
|
|
13
13
|
"load_eeg_attrs_from_bids_file",
|
|
14
|
+
"merge_participants_fields",
|
|
15
|
+
"normalize_key",
|
|
14
16
|
]
|
|
15
17
|
|
|
16
18
|
|
|
@@ -70,7 +72,7 @@ def build_query_from_kwargs(**kwargs) -> dict[str, Any]:
|
|
|
70
72
|
return query
|
|
71
73
|
|
|
72
74
|
|
|
73
|
-
def _get_raw_extensions(bids_file: str, bids_dataset
|
|
75
|
+
def _get_raw_extensions(bids_file: str, bids_dataset) -> list[str]:
|
|
74
76
|
"""Helper to find paths to additional "sidecar" files that may be associated
|
|
75
77
|
with a given main data file in a BIDS dataset; paths are returned as relative to
|
|
76
78
|
the parent dataset path.
|
|
@@ -92,9 +94,7 @@ def _get_raw_extensions(bids_file: str, bids_dataset: EEGBIDSDataset) -> list[st
|
|
|
92
94
|
]
|
|
93
95
|
|
|
94
96
|
|
|
95
|
-
def load_eeg_attrs_from_bids_file(
|
|
96
|
-
bids_dataset: EEGBIDSDataset, bids_file: str
|
|
97
|
-
) -> dict[str, Any]:
|
|
97
|
+
def load_eeg_attrs_from_bids_file(bids_dataset, bids_file: str) -> dict[str, Any]:
|
|
98
98
|
"""Build the metadata record for a given BIDS file (single recording) in a BIDS dataset.
|
|
99
99
|
|
|
100
100
|
Attributes are at least the ones defined in data_config attributes (set to None if missing),
|
|
@@ -182,3 +182,73 @@ def load_eeg_attrs_from_bids_file(
|
|
|
182
182
|
attrs[field] = None
|
|
183
183
|
|
|
184
184
|
return attrs
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
def normalize_key(key: str) -> str:
|
|
188
|
+
"""Normalize a metadata key for robust matching.
|
|
189
|
+
|
|
190
|
+
Lowercase and replace non-alphanumeric characters with underscores, then strip
|
|
191
|
+
leading/trailing underscores. This allows tolerant matching such as
|
|
192
|
+
"p-factor" ≈ "p_factor" ≈ "P Factor".
|
|
193
|
+
"""
|
|
194
|
+
return re.sub(r"[^a-z0-9]+", "_", str(key).lower()).strip("_")
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def merge_participants_fields(
|
|
198
|
+
description: dict[str, Any],
|
|
199
|
+
participants_row: dict[str, Any] | None,
|
|
200
|
+
description_fields: list[str] | None = None,
|
|
201
|
+
) -> dict[str, Any]:
|
|
202
|
+
"""Merge participants.tsv fields into a dataset description dictionary.
|
|
203
|
+
|
|
204
|
+
- Preserves existing entries in ``description`` (no overwrites).
|
|
205
|
+
- Fills requested ``description_fields`` first, preserving their original names.
|
|
206
|
+
- Adds all remaining participants columns generically using normalized keys
|
|
207
|
+
unless a matching requested field already captured them.
|
|
208
|
+
|
|
209
|
+
Parameters
|
|
210
|
+
----------
|
|
211
|
+
description : dict
|
|
212
|
+
Current description to be enriched in-place and returned.
|
|
213
|
+
participants_row : dict | None
|
|
214
|
+
A mapping of participants.tsv columns for the current subject.
|
|
215
|
+
description_fields : list[str] | None
|
|
216
|
+
Optional list of requested description fields. When provided, matching is
|
|
217
|
+
performed by normalized names; the original requested field names are kept.
|
|
218
|
+
|
|
219
|
+
Returns
|
|
220
|
+
-------
|
|
221
|
+
dict
|
|
222
|
+
The enriched description (same object as input for convenience).
|
|
223
|
+
|
|
224
|
+
"""
|
|
225
|
+
if not isinstance(description, dict) or not isinstance(participants_row, dict):
|
|
226
|
+
return description
|
|
227
|
+
|
|
228
|
+
# Normalize participants keys and keep first non-None value per normalized key
|
|
229
|
+
norm_map: dict[str, Any] = {}
|
|
230
|
+
for part_key, part_value in participants_row.items():
|
|
231
|
+
norm_key = normalize_key(part_key)
|
|
232
|
+
if norm_key not in norm_map and part_value is not None:
|
|
233
|
+
norm_map[norm_key] = part_value
|
|
234
|
+
|
|
235
|
+
# Ensure description_fields is a list for matching
|
|
236
|
+
requested = list(description_fields or [])
|
|
237
|
+
|
|
238
|
+
# 1) Fill requested fields first using normalized matching, preserving names
|
|
239
|
+
for key in requested:
|
|
240
|
+
if key in description:
|
|
241
|
+
continue
|
|
242
|
+
requested_norm_key = normalize_key(key)
|
|
243
|
+
if requested_norm_key in norm_map:
|
|
244
|
+
description[key] = norm_map[requested_norm_key]
|
|
245
|
+
|
|
246
|
+
# 2) Add remaining participants columns generically under normalized names,
|
|
247
|
+
# unless a requested field already captured them
|
|
248
|
+
requested_norm = {normalize_key(k) for k in requested}
|
|
249
|
+
for norm_key, part_value in norm_map.items():
|
|
250
|
+
if norm_key in requested_norm:
|
|
251
|
+
continue
|
|
252
|
+
if norm_key not in description:
|
|
253
|
+
description[norm_key] = part_value
|
|
254
|
+
return description
|
eegdash/data_utils.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import io
|
|
1
2
|
import json
|
|
2
3
|
import logging
|
|
3
4
|
import os
|
|
4
5
|
import re
|
|
5
6
|
import traceback
|
|
6
7
|
import warnings
|
|
8
|
+
from contextlib import redirect_stderr
|
|
7
9
|
from pathlib import Path
|
|
8
10
|
from typing import Any
|
|
9
11
|
|
|
@@ -21,6 +23,8 @@ from mne_bids import BIDSPath
|
|
|
21
23
|
|
|
22
24
|
from braindecode.datasets import BaseDataset
|
|
23
25
|
|
|
26
|
+
from .paths import get_default_cache_dir
|
|
27
|
+
|
|
24
28
|
logger = logging.getLogger("eegdash")
|
|
25
29
|
|
|
26
30
|
|
|
@@ -91,19 +95,8 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
91
95
|
root=self.bids_root,
|
|
92
96
|
datatype="eeg",
|
|
93
97
|
suffix="eeg",
|
|
94
|
-
# extension='.bdf',
|
|
95
98
|
**self.bids_kwargs,
|
|
96
99
|
)
|
|
97
|
-
# TO-DO: remove this once find a better solution using mne-bids or update competition dataset
|
|
98
|
-
try:
|
|
99
|
-
_ = str(self.bidspath)
|
|
100
|
-
except RuntimeError:
|
|
101
|
-
try:
|
|
102
|
-
self.bidspath = self.bidspath.update(extension=".bdf")
|
|
103
|
-
self.filecache = self.filecache.with_suffix(".bdf")
|
|
104
|
-
except Exception as e:
|
|
105
|
-
logger.error(f"Error while updating BIDS path: {e}")
|
|
106
|
-
raise e
|
|
107
100
|
|
|
108
101
|
self.s3file = self._get_s3path(record["bidspath"])
|
|
109
102
|
self.bids_dependencies = record["bidsdependencies"]
|
|
@@ -182,8 +175,11 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
182
175
|
dep_local = Path(self.dataset_folder) / dep_path
|
|
183
176
|
filepath = self.cache_dir / dep_local
|
|
184
177
|
if not self.s3_open_neuro:
|
|
178
|
+
if filepath.suffix == ".set":
|
|
179
|
+
filepath = filepath.with_suffix(".bdf")
|
|
185
180
|
if self.filecache.suffix == ".set":
|
|
186
181
|
self.filecache = self.filecache.with_suffix(".bdf")
|
|
182
|
+
|
|
187
183
|
# here, we download the dependency and it is fine
|
|
188
184
|
# in the case of the competition.
|
|
189
185
|
if not filepath.exists():
|
|
@@ -218,6 +214,12 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
218
214
|
|
|
219
215
|
def _ensure_raw(self) -> None:
|
|
220
216
|
"""Download the S3 file and BIDS dependencies if not already cached."""
|
|
217
|
+
# TO-DO: remove this once is fixed on the our side
|
|
218
|
+
# for the competition
|
|
219
|
+
if not self.s3_open_neuro:
|
|
220
|
+
self.bidspath = self.bidspath.update(extension=".bdf")
|
|
221
|
+
self.filecache = self.filecache.with_suffix(".bdf")
|
|
222
|
+
|
|
221
223
|
if not os.path.exists(self.filecache): # not preload
|
|
222
224
|
if self.bids_dependencies:
|
|
223
225
|
self._download_dependencies()
|
|
@@ -226,13 +228,50 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
226
228
|
# capturing any warnings
|
|
227
229
|
# to-do: remove this once is fixed on the mne-bids side.
|
|
228
230
|
with warnings.catch_warnings(record=True) as w:
|
|
231
|
+
# Ensure all warnings are captured into 'w' and not shown to users
|
|
232
|
+
warnings.simplefilter("always")
|
|
229
233
|
try:
|
|
230
|
-
#
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
# mne-bids emits RuntimeWarnings to stderr; silence stderr during read
|
|
235
|
+
_stderr_buffer = io.StringIO()
|
|
236
|
+
with redirect_stderr(_stderr_buffer):
|
|
237
|
+
self._raw = mne_bids.read_raw_bids(
|
|
238
|
+
bids_path=self.bidspath, verbose="ERROR"
|
|
239
|
+
)
|
|
240
|
+
# Parse unmapped participants.tsv fields reported by mne-bids and
|
|
241
|
+
# inject them into Raw.info and the dataset description generically.
|
|
242
|
+
extras = self._extract_unmapped_participants_from_warnings(w)
|
|
243
|
+
if extras:
|
|
244
|
+
# 1) Attach to Raw.info under subject_info.participants_extras
|
|
245
|
+
try:
|
|
246
|
+
subject_info = self._raw.info.get("subject_info") or {}
|
|
247
|
+
if not isinstance(subject_info, dict):
|
|
248
|
+
subject_info = {}
|
|
249
|
+
pe = subject_info.get("participants_extras") or {}
|
|
250
|
+
if not isinstance(pe, dict):
|
|
251
|
+
pe = {}
|
|
252
|
+
# Merge without overwriting
|
|
253
|
+
for k, v in extras.items():
|
|
254
|
+
pe.setdefault(k, v)
|
|
255
|
+
subject_info["participants_extras"] = pe
|
|
256
|
+
self._raw.info["subject_info"] = subject_info
|
|
257
|
+
except Exception:
|
|
258
|
+
# Non-fatal; continue
|
|
259
|
+
pass
|
|
260
|
+
|
|
261
|
+
# 2) Also add to this dataset's description, if possible, so
|
|
262
|
+
# targets can be selected later without naming specifics.
|
|
263
|
+
try:
|
|
264
|
+
import pandas as _pd # local import to avoid top-level cost
|
|
265
|
+
|
|
266
|
+
if isinstance(self.description, dict):
|
|
267
|
+
for k, v in extras.items():
|
|
268
|
+
self.description.setdefault(k, v)
|
|
269
|
+
elif isinstance(self.description, _pd.Series):
|
|
270
|
+
for k, v in extras.items():
|
|
271
|
+
if k not in self.description.index:
|
|
272
|
+
self.description.loc[k] = v
|
|
273
|
+
except Exception:
|
|
274
|
+
pass
|
|
236
275
|
except Exception as e:
|
|
237
276
|
logger.error(
|
|
238
277
|
f"Error while reading BIDS file: {self.bidspath}\n"
|
|
@@ -242,10 +281,60 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
242
281
|
logger.error(f"Exception: {e}")
|
|
243
282
|
logger.error(traceback.format_exc())
|
|
244
283
|
raise e
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
284
|
+
# Filter noisy mapping notices from mne-bids; surface others
|
|
285
|
+
for captured_warning in w:
|
|
286
|
+
try:
|
|
287
|
+
msg = str(captured_warning.message)
|
|
288
|
+
except Exception:
|
|
289
|
+
continue
|
|
290
|
+
# Suppress verbose participants mapping messages
|
|
291
|
+
if "Unable to map the following column" in msg and "MNE" in msg:
|
|
292
|
+
logger.debug(
|
|
293
|
+
"Suppressed mne-bids mapping warning while reading BIDS file: %s",
|
|
294
|
+
msg,
|
|
295
|
+
)
|
|
296
|
+
continue
|
|
297
|
+
logger.warning("Warning while reading BIDS file: %s", msg)
|
|
298
|
+
|
|
299
|
+
def _extract_unmapped_participants_from_warnings(
|
|
300
|
+
self, warnings_list: list[Any]
|
|
301
|
+
) -> dict[str, Any]:
|
|
302
|
+
"""Scan captured warnings from mne-bids and extract unmapped participants.tsv
|
|
303
|
+
entries in a generic way.
|
|
304
|
+
|
|
305
|
+
Optionally, the column name can carry a note in parentheses that we ignore
|
|
306
|
+
for key/value extraction. Returns a mapping of column name -> raw value.
|
|
307
|
+
"""
|
|
308
|
+
extras: dict[str, Any] = {}
|
|
309
|
+
header = "Unable to map the following column(s) to MNE:"
|
|
310
|
+
for wr in warnings_list:
|
|
311
|
+
try:
|
|
312
|
+
msg = str(wr.message)
|
|
313
|
+
except Exception:
|
|
314
|
+
continue
|
|
315
|
+
if header not in msg:
|
|
316
|
+
continue
|
|
317
|
+
lines = msg.splitlines()
|
|
318
|
+
# Find the header line, then parse subsequent lines as entries
|
|
319
|
+
try:
|
|
320
|
+
idx = next(i for i, ln in enumerate(lines) if header in ln)
|
|
321
|
+
except StopIteration:
|
|
322
|
+
idx = -1
|
|
323
|
+
for line in lines[idx + 1 :]:
|
|
324
|
+
line = line.strip()
|
|
325
|
+
if not line:
|
|
326
|
+
continue
|
|
327
|
+
# Pattern: <col>(optional note): <value>
|
|
328
|
+
# Examples: "gender: F", "Ethnicity: Indian", "foo (ignored): bar"
|
|
329
|
+
m = re.match(r"^([^:]+?)(?:\s*\([^)]*\))?\s*:\s*(.*)$", line)
|
|
330
|
+
if not m:
|
|
331
|
+
continue
|
|
332
|
+
col = m.group(1).strip()
|
|
333
|
+
val = m.group(2).strip()
|
|
334
|
+
# Keep original column names as provided to stay agnostic
|
|
335
|
+
if col and col not in extras:
|
|
336
|
+
extras[col] = val
|
|
337
|
+
return extras
|
|
249
338
|
|
|
250
339
|
# === BaseDataset and PyTorch Dataset interface ===
|
|
251
340
|
|
|
@@ -264,11 +353,16 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
264
353
|
def __len__(self) -> int:
|
|
265
354
|
"""Return the number of samples in the dataset."""
|
|
266
355
|
if self._raw is None:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
356
|
+
if (
|
|
357
|
+
self.record["ntimes"] is None
|
|
358
|
+
or self.record["sampling_frequency"] is None
|
|
359
|
+
):
|
|
360
|
+
self._ensure_raw()
|
|
361
|
+
else:
|
|
362
|
+
# FIXME: this is a bit strange and should definitely not change as a side effect
|
|
363
|
+
# of accessing the data (which it will, since ntimes is the actual length but rounded down)
|
|
364
|
+
return int(self.record["ntimes"] * self.record["sampling_frequency"])
|
|
365
|
+
return len(self._raw)
|
|
272
366
|
|
|
273
367
|
@property
|
|
274
368
|
def raw(self):
|
|
@@ -318,7 +412,7 @@ class EEGDashBaseRaw(BaseRaw):
|
|
|
318
412
|
metadata: dict[str, Any],
|
|
319
413
|
preload: bool = False,
|
|
320
414
|
*,
|
|
321
|
-
cache_dir: str =
|
|
415
|
+
cache_dir: str | None = None,
|
|
322
416
|
bids_dependencies: list[str] = [],
|
|
323
417
|
verbose: Any = None,
|
|
324
418
|
):
|
|
@@ -334,8 +428,9 @@ class EEGDashBaseRaw(BaseRaw):
|
|
|
334
428
|
chtype = "eog"
|
|
335
429
|
ch_types.append(chtype)
|
|
336
430
|
info = mne.create_info(ch_names=ch_names, sfreq=sfreq, ch_types=ch_types)
|
|
431
|
+
|
|
337
432
|
self.s3file = self._get_s3path(input_fname)
|
|
338
|
-
self.cache_dir = Path(cache_dir)
|
|
433
|
+
self.cache_dir = Path(cache_dir) if cache_dir else get_default_cache_dir()
|
|
339
434
|
self.filecache = self.cache_dir / input_fname
|
|
340
435
|
self.bids_dependencies = bids_dependencies
|
|
341
436
|
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
,dataset,n_records,n_subjects,n_tasks,nchans_set,sampling_freqs,duration_hours_total,size,size_bytes,s3_item_count,DatasetID,Type Subject,10-20 system,modality of exp,type of exp
|
|
2
|
+
0,ds002718,18,18,1,74,250,14.844,4.31 GB,4624315408,0,ds002718,Healthy,other,Visual,Perception
|
|
3
|
+
1,ds005505,1342,136,10,129,500,125.366,103.11 GB,110708824369,0,,,,,
|
|
4
|
+
2,ds004745,6,6,1,,1000,0.0,242.08 MB,253839725,0,,,,,
|
|
5
|
+
3,ds005514,2885,295,10,129,500,213.008,185.03 GB,198677728665,0,,,,,
|
|
6
|
+
4,ds005512,2320,257,10,129,500,196.205,157.19 GB,168778507427,0,,,,,
|
|
7
|
+
5,ds005510,1227,135,10,129,500,112.464,90.80 GB,97492961757,0,,,,,
|
|
8
|
+
6,ds005511,3100,381,10,"6,129",500,285.629,244.83 GB,262883881898,0,,,,,
|
|
9
|
+
7,ds005509,3326,330,10,129,500,274.559,224.17 GB,240701124393,0,,,,,
|
|
10
|
+
8,ds005508,3342,324,10,129,500,269.281,229.81 GB,246753736933,0,,,,,
|
|
11
|
+
9,ds005507,1812,184,10,129,500,168.649,139.37 GB,149646718160,0,,,,,
|
|
12
|
+
10,ds005506,1405,150,10,129,500,127.896,111.88 GB,120126449650,0,,,,,
|
|
13
|
+
11,test,2,1,1,64,500,20.556,0 B,0,0,,,,,
|
|
14
|
+
12,ds004854,1,1,1,64,128,0.535,79.21 MB,83057080,0,,,,,
|
|
15
|
+
13,ds004853,1,1,1,64,128,0.535,79.21 MB,83057080,0,,,,,
|
|
16
|
+
14,ds004844,68,17,1,64,1024,21.252,22.33 GB,23976121966,0,ds004844,,,Multisensory,Decision-making
|
|
17
|
+
15,ds004843,92,14,1,64,256,29.834,7.66 GB,8229205795,0,ds004843,,,Visual,Attention
|
|
18
|
+
16,ds004842,102,14,1,64,256,20.102,5.21 GB,5589054270,0,ds004842,,,Multisensory,Attention
|
|
19
|
+
17,ds004852,1,1,1,64,128,0.535,79.21 MB,83057106,0,,,,,
|
|
20
|
+
18,ds004851,1,1,1,64,128,0.535,56.59 GB,60765064414,0,,,,,
|
|
21
|
+
19,ds004850,1,1,1,64,128,0.535,79.21 MB,83057078,0,,,,,
|
|
22
|
+
20,ds004855,1,1,1,64,128,0.535,79.21 MB,83057076,0,,,,,
|
|
23
|
+
21,ds004849,1,1,1,64,128,0.535,79.21 MB,83057084,0,,,,,
|
|
24
|
+
22,ds004841,147,20,1,64,256,29.054,7.31 GB,7846934401,0,ds004841,,10-20,Multisensory,Attention
|
|
25
|
+
23,ds004661,17,17,1,64,128,10.137,1.40 GB,1505577392,0,ds004661,,10-20,Multisensory,Memory
|
|
26
|
+
24,ds004660,42,21,1,32,"2048,512",23.962,7.25 GB,7782408710,0,ds004660,Healthy,10-20,Multisensory,Attention
|
|
27
|
+
25,ds004657,119,24,1,64,"1024,8192",27.205,43.06 GB,46237302701,0,ds004657,,10-20,Motor,Decision-making
|
|
28
|
+
26,ds004362,1526,109,1,64,"128,160",48.592,11.14 GB,11961862159,0,ds004362,Healthy,10-20,Visual,Motor
|
|
29
|
+
27,ds004010,24,24,1,64,1000,26.457,23.14 GB,24844863976,0,ds004010,Healthy,other,Multisensory,Attention
|
|
30
|
+
28,ds002181,226,226,1,125,500,7.676,150.89 MB,158222084,0,,,,,
|
|
31
|
+
29,ds004554,16,16,1,99,1000,0.024,8.79 GB,9432865762,0,ds004554,Healthy,10-20,Visual,Decision-making
|
|
32
|
+
30,ds005697,50,50,1,"65,69",1000,77.689,66.58 GB,71486411402,0,,,,,
|
|
33
|
+
31,ds004350,240,24,5,64,256,41.265,26.83 GB,28810754598,0,ds004350,Healthy,other,Visual,Memory
|
|
34
|
+
32,ds004785,17,17,1,32,500,0.019,351.17 MB,368224136,0,ds004785,Healthy,,Motor,Motor
|
|
35
|
+
33,ds004504,88,88,1,19,500,19.608,5.38 GB,5780997160,0,ds004504,Dementia,10-20,Resting State,Clinical/Intervention
|
|
36
|
+
34,ds004635,55,55,1,129,1000,20.068,30.56 GB,32817659781,0,ds004635,Healthy,other,Multisensory,Attention
|
|
37
|
+
35,ds005787,448,19,1,"64,66","1000,500",23.733,27.09 GB,29087512003,0,,,,,
|
|
38
|
+
36,ds005079,60,1,15,65,500,3.25,1.68 GB,1809231997,0,ds005079,Healthy,,Multisensory,Affect
|
|
39
|
+
37,ds005342,32,32,1,17,250,33.017,2.03 GB,2181610593,0,ds005342,Healthy,,Visual,Motor
|
|
40
|
+
38,ds005034,100,25,2,129,1000,37.525,61.36 GB,65885315479,0,ds005034,Healthy,,Visual,Memory
|
|
41
|
+
39,ds002680,350,14,1,31,1000,21.244,9.22 GB,9902152149,0,ds002680,Healthy,10-20,Visual,Motor
|
|
42
|
+
40,ds003805,1,1,1,19,500,0.033,16.96 MB,17781347,0,ds003805,Healthy,10-20,Multisensory,Learning
|
|
43
|
+
41,ds003838,130,65,2,63,1000,136.757,253.29 GB,271965704312,0,ds003838,Healthy,10-20,Auditory,Memory
|
|
44
|
+
42,ds002691,20,20,1,32,250,6.721,776.76 MB,814491068,0,ds002691,Healthy,other,Visual,Attention
|
|
45
|
+
43,ds003690,375,75,3,"64,66",500,46.771,21.46 GB,23043491552,0,ds003690,Healthy,10-20,Auditory,Decision-making
|
|
46
|
+
44,ds004040,4,2,1,64,512,4.229,11.59 GB,12440304224,0,ds004040,Healthy,10-20,Auditory,Other
|
|
47
|
+
45,ds003061,39,13,1,79,256,8.196,2.26 GB,2421951821,0,ds003061,,10-20,Auditory,Perception
|
|
48
|
+
46,ds005672,3,3,1,"65,69",1000,4.585,4.23 GB,4545641306,0,,,,,
|
|
49
|
+
47,ds005410,81,81,1,63,1000,22.976,19.76 GB,21213481224,0,,,,,
|
|
50
|
+
48,ds003753,25,25,1,64,500,10.104,4.62 GB,4965253148,0,ds003753,Healthy,10-20,Visual,Learning
|
|
51
|
+
49,ds005565,24,24,1,,500,11.436,2.62 GB,2816607296,0,,,,,
|
|
52
|
+
50,ds002893,52,49,1,33,"250,250.0293378038558",36.114,7.70 GB,8263047991,0,ds002893,Healthy,10-20,Multisensory,Attention
|
|
53
|
+
51,ds002578,2,2,1,256,256,1.455,1.33 GB,1429254677,0,ds002578,Healthy,10-20,Visual,Attention
|
|
54
|
+
52,ds005089,36,36,1,63,1000,68.82,68.01 GB,73021312961,0,ds005089,Healthy,,Visual,Attention
|
|
55
|
+
53,ds003822,25,25,1,64,500,12.877,5.82 GB,6248744522,0,ds003822,Healthy,10-20,Visual,Affect
|
|
56
|
+
54,ds003670,62,25,1,32,2000,72.772,97.53 GB,104721234854,0,ds003670,,10-20,Visual,Attention
|
|
57
|
+
55,ds005048,35,35,1,,250,5.203,355.91 MB,373200880,0,ds005048,Dementia,,Auditory,Attention
|
|
58
|
+
56,ds004574,146,146,1,"63,64,66",500,31.043,13.48 GB,14470034208,0,ds004574,Parkinson's,10-20,Multisensory,Clinical/Intervention
|
|
59
|
+
57,ds004519,40,40,1,62,250,0.067,12.56 GB,13486848019,0,ds004519,,10-20,Visual,Attention
|
|
60
|
+
58,ds004602,546,182,3,128,"250,500",87.11,73.91 GB,79364456958,0,ds004602,Healthy,other,Visual,Perception
|
|
61
|
+
59,ds004784,6,1,6,128,512,0.518,10.82 GB,11621460277,0,ds004784,Healthy,,Motor,Attention
|
|
62
|
+
60,ds004771,61,61,1,34,256,0.022,1.36 GB,1462195517,0,ds004771,Healthy,10-20,Visual,Decision-making
|
|
63
|
+
61,ds003518,137,110,1,64,500,89.888,39.51 GB,42423490194,0,ds003518,Healthy,10-20,Visual,Clinical/Intervention
|
|
64
|
+
62,ds005207,39,20,1,"6,10,12,14,15,16,17,18","128,250",422.881,69.12 GB,74214619739,0,ds005207,Healthy,,Sleep,Sleep
|
|
65
|
+
63,ds005866,60,60,1,,500,15.976,3.57 GB,3837211623,0,,,,,
|
|
66
|
+
64,ds003523,221,91,1,64,500,84.586,37.54 GB,40304852370,0,ds003523,TBI,10-20,Visual,Memory
|
|
67
|
+
65,ds004347,48,24,1,64,"128,512",6.389,2.69 GB,2890549319,0,ds004347,Healthy,10-20,Visual,Perception
|
|
68
|
+
66,ds004588,42,42,1,24,300,4.957,601.76 MB,630994652,0,ds004588,Healthy,10-20,Visual,Decision-making
|
|
69
|
+
67,ds005811,448,19,1,62,"1000,500",23.733,24.12 GB,25902600444,0,,,,,
|
|
70
|
+
68,ds003987,69,23,1,64,500.0930232558139,52.076,26.41 GB,28362707915,0,ds003987,Healthy,10-20,Visual,Attention
|
|
71
|
+
69,ds004317,50,50,1,60,500,37.767,18.29 GB,19639199743,0,ds004317,Healthy,10-20,Multisensory,Affect
|
|
72
|
+
70,ds004033,36,18,2,64,500,42.645,19.81 GB,21270391452,0,ds004033,,10-20,Motor,Motor
|
|
73
|
+
71,ds004315,50,50,1,60,500,21.104,9.81 GB,10532856899,0,ds004315,Healthy,10-20,Multisensory,Affect
|
|
74
|
+
72,ds003474,122,122,1,64,500,36.61,16.64 GB,17867805967,0,ds003474,Healthy,10-20,Visual,Decision-making
|
|
75
|
+
73,ds003509,84,56,1,64,500,48.535,22.34 GB,23988721823,0,ds003509,Parkinson's,10-20,Visual,Learning
|
|
76
|
+
74,ds005868,48,48,1,,500,13.094,2.93 GB,3146417813,0,,,,,
|
|
77
|
+
75,ds003516,25,25,1,47,500,22.57,13.46 GB,14451393616,0,ds003516,Healthy,other,Auditory,Attention
|
|
78
|
+
76,ds004942,62,62,1,65,1000,28.282,25.05 GB,26899933549,0,ds004942,Healthy,,Visual,Memory
|
|
79
|
+
77,ds004348,18,9,2,34,200,35.056,12.30 GB,13210476025,0,ds004348,Healthy,other,Sleep,Sleep
|
|
80
|
+
78,ds004625,543,32,9,120,500,28.397,62.46 GB,67069111978,0,ds004625,,,Motor,Attention
|
|
81
|
+
79,ds003517,34,17,1,64,500,13.273,6.48 GB,6952992399,0,ds003517,Healthy,10-20,Visual,Learning
|
|
82
|
+
80,ds004368,40,39,1,63,128,0.033,997.14 MB,1045574811,0,ds004368,Schizophrenia/Psychosis,10-20,Visual,Perception
|
|
83
|
+
81,ds004584,149,149,1,"63,64,66",500,6.641,2.87 GB,3078216874,0,ds004584,Parkinson's,10-20,Resting State,Clinical/Intervention
|
|
84
|
+
82,ds003506,84,56,1,64,500,35.381,16.21 GB,17400039992,0,ds003506,Parkinson's,10-20,Visual,Decision-making
|
|
85
|
+
83,ds003570,40,40,1,64,2048,26.208,36.12 GB,38783075272,0,ds003570,Healthy,10-20,Auditory,Decision-making
|
|
86
|
+
84,ds003490,75,50,1,64,500,12.76,5.85 GB,6276775630,0,ds003490,Parkinson's,10-20,Auditory,Attention
|
|
87
|
+
85,ds004117,85,23,1,69,"1000,250,500,500.059",15.941,5.80 GB,6230776574,0,ds004117,Healthy,10-20,Visual,Memory
|
|
88
|
+
86,ds004505,25,25,1,120,250,30.398,522.56 GB,561092363916,0,ds004505,Healthy,10-20,Motor,Motor
|
|
89
|
+
87,ds004580,147,147,1,"63,64,66",500,36.514,15.84 GB,17008438640,0,ds004580,Parkinson's,10-20,Visual,Decision-making
|
|
90
|
+
88,ds004532,137,110,1,64,500,49.651,22.09 GB,23719572304,0,ds004532,Healthy,10-20,Visual,Learning
|
|
91
|
+
89,ds004902,218,71,2,61,"500,5000",18.118,8.29 GB,8898600609,0,ds004902,Healthy,,Resting State,Resting state
|
|
92
|
+
90,ds004295,26,26,1,66,"1024,512",34.313,31.51 GB,33831372141,0,ds004295,Healthy,10-20,Multisensory,Learning
|
|
93
|
+
91,ds003519,54,27,1,64,500,20.504,8.96 GB,9623156762,0,ds003519,Healthy,10-20,Visual,Clinical/Intervention
|
|
94
|
+
92,ds003458,23,23,1,64,500,10.447,4.72 GB,5065250805,0,ds003458,Healthy,10-20,Visual,Affect
|
|
95
|
+
93,ds003004,34,34,1,"134,180,189,196,201,206,207,208,209,211,212,213,214,215,218,219,220,221,222,223,224,226,227,229,231,232,235",256,49.072,35.63 GB,38255333087,0,ds003004,Healthy,10-20,Auditory,Affect
|
|
96
|
+
94,ds004200,20,20,1,37,1000,14.123,7.21 GB,7740555648,0,ds004200,Healthy,10-20,Multisensory,Attention
|
|
97
|
+
95,ds004015,36,36,1,18,500,47.29,6.03 GB,6475870225,0,ds004015,Healthy,other,Auditory,Attention
|
|
98
|
+
96,ds004595,53,53,1,64,500,17.078,7.89 GB,8470863296,0,ds004595,Other,10-20,Visual,Decision-making
|
|
99
|
+
97,ds004626,52,52,1,68,1000,21.359,19.87 GB,21336341431,0,ds004626,Other,10-20,Visual,Attention
|
|
100
|
+
98,ds004475,30,30,1,"113,115,118,119,120,122,123,124,125,126,127,128",512,26.899,112.74 GB,121053900746,0,ds004475,Healthy,other,Motor,Motor
|
|
101
|
+
99,ds004515,54,54,1,64,500,20.61,9.48 GB,10177384081,0,ds004515,Other,10-20,Visual,Affect
|
|
102
|
+
100,ds004883,516,172,3,128,500,137.855,122.80 GB,131858855599,0,ds004883,Healthy,,Visual,Decision-making
|
|
103
|
+
101,ds003739,120,30,4,128,256,20.574,10.94 GB,11742611182,0,ds003739,Healthy,10-20,Motor,Perception
|
|
104
|
+
102,ds004389,260,26,4,42,10000,30.932,376.50 GB,404264486093,0,,,,,
|
|
105
|
+
103,ds004367,40,40,1,68,1200,24.81,27.98 GB,30039343808,0,ds004367,Schizophrenia/Psychosis,10-20,Visual,Perception
|
|
106
|
+
104,ds004369,41,41,1,4,500,37.333,8.01 GB,8596739356,0,ds004369,Healthy,other,Auditory,Perception
|
|
107
|
+
105,ds004579,139,139,1,"63,64,66",500,55.703,24.12 GB,25896737812,0,ds004579,Parkinson's,10-20,Visual,Decision-making
|
|
108
|
+
106,ds005416,23,23,1,64,1000,24.68,21.30 GB,22869325264,0,,,,,
|
|
109
|
+
107,ds001785,54,18,3,63,"1000,1024",14.644,27.86 GB,29915397068,0,ds001785,Healthy,10-20,Tactile,Perception
|
|
110
|
+
108,ds001971,273,20,1,108,512,46.183,31.98 GB,34339201543,0,ds001971,Healthy,10-20,Auditory,Motor
|
|
111
|
+
109,ds004388,399,40,3,67,10000,43.327,682.54 GB,732876226489,0,,,,,
|
|
112
|
+
110,ds003478,243,122,1,64,500,23.57,10.65 GB,11430531312,0,ds003478,Healthy,10-20,Resting State,Resting state
|
|
113
|
+
111,ds004306,15,12,1,124,1024,18.183,79.11 GB,84945921180,0,ds004306,Healthy,other,Multisensory,Perception
|
|
114
|
+
112,ds005305,165,165,1,64,"2048,512",14.136,6.41 GB,6887595053,0,ds005305,Healthy,,Visual,Decision-making
|
|
115
|
+
113,ds005114,223,91,1,64,500,125.701,56.47 GB,60630838923,0,ds005114,TBI,,Visual,Attention
|
|
116
|
+
114,ds003039,16,16,1,64,500,14.82,7.82 GB,8401240820,0,ds003039,Healthy,10-20,Motor,Motor
|
|
117
|
+
115,ds003602,699,118,6,35,1000,159.35,73.21 GB,78609742568,0,ds003602,Other,other,Visual,Decision-making
|
|
118
|
+
116,ds003655,156,156,1,19,500,130.923,20.26 GB,21756905870,0,ds003655,Healthy,10-20,Visual,Memory
|
|
119
|
+
117,ds003522,200,96,1,64,500,57.079,25.36 GB,27225424004,0,ds003522,TBI,10-20,Auditory,Decision-making
|
|
120
|
+
118,ds003801,20,20,1,24,250,13.689,1.15 GB,1233075452,0,ds003801,Healthy,10-20,Auditory,Attention
|
|
121
|
+
119,ds005296,62,62,1,,500,37.205,8.53 GB,9154623627,0,ds005296,Healthy,,Multisensory,Decision-making
|
|
122
|
+
120,ds004561,23,23,1,62,10000,11.379,97.96 GB,105188606283,0,ds004561,Healthy,10-20,Motor,Perception
|
|
123
|
+
121,ds005131,63,58,2,64,500,52.035,22.35 GB,23996524256,0,ds005131,Healthy,other,Auditory,Attention/Memory
|
|
124
|
+
122,ds005028,66,11,3,,,0.0,1.46 GB,1563795662,0,ds005028,,other,Visual,Motor
|
|
125
|
+
123,ds005170,225,5,1,,,0.0,261.77 GB,281068716313,0,ds005170,,10-20,Visual,other
|
|
126
|
+
124,ds004840,51,9,3,8,"1024,256,512",11.306,1.75 GB,1876219715,0,ds004840,Other,10-20,Auditory,Clinical/Intervention
|
|
127
|
+
125,ds004718,51,51,1,64,1000,21.836,108.98 GB,117013849037,0,ds004718,Healthy,,Auditory,Learning
|
|
128
|
+
126,ds002725,105,21,5,30,1000,0.0,15.32 GB,16447829856,0,ds002725,Healthy,10-20,Auditory,Affect
|
|
129
|
+
127,ds004408,380,19,1,128,512,20.026,18.70 GB,20083249915,0,ds004408,Healthy,other,Auditory,Other
|
|
130
|
+
128,ds004796,235,79,3,,1000,0.0,240.21 GB,257923739221,0,ds004796,Other,,Visual/Resting State,Memory/Resting state
|
|
131
|
+
129,ds004511,134,45,3,139,3000,48.922,202.28 GB,217194709208,0,,,,,
|
|
132
|
+
130,ds004817,20,20,1,63,1000,0.0,25.34 GB,27207910489,0,ds004817,Healthy,,Visual,Attention
|
|
133
|
+
131,ds003190,280,19,1,0,256,29.891,1.27 GB,1361816737,0,ds003190,,10-20,Visual,Perception
|
|
134
|
+
132,ds004917,24,24,1,,,0.0,36.47 GB,39162637090,0,ds004917,Healthy,other,Multisensory,Decision-making
|
|
135
|
+
133,ds004357,16,16,1,63,1000,0.0,69.56 GB,74685825960,0,ds004357,Healthy,10-20,Visual,Perception
|
|
136
|
+
134,ds005397,26,26,1,64,500,27.923,12.10 GB,12993735747,0,,,,,
|
|
137
|
+
135,ds003846,60,19,1,64,500,24.574,11.36 GB,12193814091,0,ds003846,Healthy,other,Multisensory,Decision-making
|
|
138
|
+
136,ds004024,497,13,3,64,20000,55.503,1021.22 GB,1096522006089,0,ds004024,Healthy,10-20,Visual,Clinical/Intervention
|
|
139
|
+
137,ds005815,137,26,4,30,"1000,500",38.618,9.91 GB,10642000219,0,,,,,
|
|
140
|
+
138,ds005429,61,15,3,64,"2500,5000",14.474,16.47 GB,17685373747,0,,,,,
|
|
141
|
+
139,ds003702,47,47,1,61,500,0.0,60.93 GB,65421860496,0,ds003702,Healthy,10-20,Visual,Memory
|
|
142
|
+
140,ds004577,130,103,1,"19,21,24",200,22.974,652.76 MB,684471843,0,ds004577,Healthy,10-20,Sleep,Clinical/Intervention
|
|
143
|
+
141,ds003574,18,18,1,64,500,0.0,14.79 GB,15876358782,0,ds003574,Healthy,10-20,Visual,Affect
|
|
144
|
+
142,ds005779,250,19,16,"64,67,70",5000,16.65,88.67 GB,95206991747,0,,,,,
|
|
145
|
+
143,ds005185,356,20,3,8,500,0.0,783.25 GB,841005525524,0,,,,,
|
|
146
|
+
144,ds001787,40,24,1,64,256,27.607,5.69 GB,6112379157,0,ds001787,Healthy,10-20,Auditory,Attention
|
|
147
|
+
145,ds003505,37,19,2,128,2048,0.0,90.13 GB,96777780296,0,ds003505,Healthy,10-20,Visual,Perception
|
|
148
|
+
146,ds005340,15,15,1,2,10000,35.297,19.14 GB,20556600898,0,,,,,
|
|
149
|
+
147,ds005363,43,43,1,64,1000,43.085,17.71 GB,19011101429,0,,,,,
|
|
150
|
+
148,ds005121,39,34,1,58,512,41.498,9.04 GB,9711092185,0,ds005121,Healthy,,Sleep,Memory
|
|
151
|
+
149,ds004256,53,53,2,64,500,42.337,18.18 GB,19516271706,0,,,,,
|
|
152
|
+
150,ds005420,72,37,2,20,500,5.485,372.11 MB,390189484,0,,,,,
|
|
153
|
+
151,ds002034,167,14,4,64,512,37.248,10.10 GB,10842685551,0,ds002034,Healthy,10-20,Visual,Attention
|
|
154
|
+
152,ds003825,50,50,1,"63,128",1000,0.0,55.34 GB,59421076202,0,ds003825,Healthy,10-20,Visual,Perception
|
|
155
|
+
153,ds004587,114,103,1,59,10000,25.491,219.34 GB,235517890780,0,ds004587,Healthy,,Visual,Decision-making
|
|
156
|
+
154,ds004598,20,9,1,,10000,0.0,26.66 GB,28629940214,0,,,,,
|
|
157
|
+
155,ds005383,240,30,1,30,200,8.327,17.43 GB,18712238212,0,,,,,
|
|
158
|
+
156,ds003195,20,10,2,19,200,4.654,121.08 MB,126957549,0,ds003195,Parkinson's,10-20,Resting State,Clinical/Intervention
|
|
159
|
+
157,ds005403,32,32,1,62,10000,13.383,135.65 GB,145656630881,0,,,,,
|
|
160
|
+
158,ds004621,167,42,4,,1000,0.0,77.39 GB,83096459121,0,ds004621,Healthy,,Visual,Decision-making
|
|
161
|
+
159,ds005863,357,127,4,27,500,0.0,10.59 GB,11371790189,0,,,,,
|
|
162
|
+
160,ds005594,16,16,1,64,1000,12.934,10.89 GB,11695589464,0,,,,,
|
|
163
|
+
161,ds002336,54,10,6,,5000,0.0,17.98 GB,19300632853,0,ds002336,Healthy,other,Visual,Motor
|
|
164
|
+
162,ds004043,20,20,1,63,1000,0.0,30.44 GB,32685724275,0,ds004043,Healthy,10-20,Visual,Attention
|
|
165
|
+
163,ds005106,42,42,1,32,500,0.012,12.62 GB,13547440607,0,ds005106,Healthy,,Visual,Attention
|
|
166
|
+
164,ds004284,18,18,1,129,1000,9.454,16.49 GB,17703523636,0,ds004284,Healthy,other,Visual,Decision-making
|
|
167
|
+
165,ds005620,202,21,3,"64,65",5000,21.811,77.30 GB,83002663223,0,,,,,
|
|
168
|
+
166,ds002720,165,18,10,19,1000,0.0,2.39 GB,2566221024,0,ds002720,Healthy,10-20,Auditory,Affect
|
|
169
|
+
167,ds005307,73,7,1,"72,104",10000,1.335,18.59 GB,19956343711,0,,,,,
|
|
170
|
+
168,ds002094,43,20,3,30,5000,18.593,39.45 GB,42356287674,0,ds002094,,10-20,Resting State,Resting state
|
|
171
|
+
169,ds002833,80,20,1,257,1000,11.604,39.77 GB,42698182133,0,ds002833,,10-20,Auditory,Decision-making
|
|
172
|
+
170,ds002218,18,18,1,0,256,16.52,1.95 GB,2089183870,0,ds002218,Healthy,10-20,Multisensory,Perception
|
|
173
|
+
171,ds005021,36,36,1,64,1024,0.0,83.20 GB,89337424472,0,ds005021,Healthy,,Visual,Attention
|
|
174
|
+
172,ds004264,21,21,1,31,1000,0.0,3.30 GB,3546307489,0,ds004264,Healthy,10-20,Visual,Learning
|
|
175
|
+
173,ds004446,237,30,1,129,1000,33.486,29.23 GB,31382984441,0,ds004446,Healthy,other,Visual,Motor
|
|
176
|
+
174,ds004980,17,17,1,64,"499.9911824,499.9912809,499.991385,499.9914353,499.9914553,499.9915179,499.9917272,499.9917286,499.9917378,499.9919292,499.9919367,499.9923017,499.9923795,500",36.846,15.82 GB,16989514798,0,ds004980,Healthy,,Visual,Perception
|
|
177
|
+
175,ds002722,94,19,5,32,1000,0.0,6.10 GB,6545819602,0,ds002722,Healthy,10-20,Auditory,Affect
|
|
178
|
+
176,ds003944,82,82,1,61,"1000,3000.00030000003",6.999,6.15 GB,6606397067,0,ds003944,Schizophrenia/Psychosis,10-20,Resting State,Clinical/Intervention
|
|
179
|
+
177,ds004279,60,56,1,64,1000,53.729,25.22 GB,27082275780,0,ds004279,Healthy,10-20,Auditory,Perception
|
|
180
|
+
178,ds005876,29,29,1,32,1000,16.017,7.61 GB,8170007441,0,,,,,
|
|
181
|
+
179,ds003816,1077,48,8,127,1000,159.313,53.97 GB,57953346429,0,ds003816,Healthy,10-20,Other,Affect
|
|
182
|
+
180,ds005385,3264,608,2,64,1000,169.62,74.07 GB,79529430923,0,,,,,
|
|
183
|
+
181,ds004572,516,52,10,58,1000,52.624,43.56 GB,46777273840,0,ds004572,,10-20,Auditory,Perception
|
|
184
|
+
182,ds005095,48,48,1,63,1000,16.901,14.28 GB,15336165645,0,ds005095,Healthy,,Visual,Memory
|
|
185
|
+
183,ds004460,40,20,1,160,1000,27.494,61.36 GB,65881325046,0,ds004460,Healthy,other,Visual,Perception
|
|
186
|
+
184,ds005189,30,30,1,61,1000,0.0,17.03 GB,18283103870,0,ds005189,Healthy,,Visual,Memory
|
|
187
|
+
185,ds005274,22,22,1,6,500,0.0,71.91 MB,75400374,0,ds005274,Healthy,,,
|
|
188
|
+
186,ds004075,116,29,4,,1000,0.0,7.39 GB,7936060172,0,ds004075,,10-20,,
|
|
189
|
+
187,ds004447,418,22,1,"128,129",1000,23.554,20.73 GB,22253514308,0,ds004447,Healthy,other,Visual,Motor
|
|
190
|
+
188,ds004952,245,10,1,128,1000,123.411,696.72 GB,748095804444,0,ds004952,Healthy,,Visual,Attention
|
|
191
|
+
189,ds002724,96,10,4,32,1000,0.0,8.52 GB,9150248444,0,ds002724,Healthy,10-20,Auditory,Affect
|
|
192
|
+
190,ds005571,45,24,2,64,5000,0.0,62.77 GB,67394456730,0,,,,,
|
|
193
|
+
191,ds004262,21,21,1,31,1000,0.0,3.48 GB,3731654700,0,ds004262,Healthy,10-20,Visual,Learning
|
|
194
|
+
192,ds005273,33,33,1,63,1000,58.055,44.42 GB,47690882240,0,ds005273,Healthy,,Visual,Decision-making
|
|
195
|
+
193,ds004520,33,33,1,62,250,0.055,10.41 GB,11175908145,0,ds004520,,10-20,Visual,Memory
|
|
196
|
+
194,ds004444,465,30,1,129,1000,55.687,48.62 GB,52204973958,0,ds004444,Healthy,other,Visual,Motor
|
|
197
|
+
195,ds004582,73,73,1,59,10000,34.244,294.22 GB,315915939478,0,ds004582,Healthy,,Visual,Affect
|
|
198
|
+
196,ds002723,44,8,6,32,1000,0.0,2.60 GB,2791985215,0,ds002723,Healthy,10-20,Auditory,Affect
|
|
199
|
+
197,ds003751,38,38,1,128,250,19.95,4.71 GB,5057922307,0,ds003751,Healthy,other,Multisensory,Affect
|
|
200
|
+
198,ds003421,80,20,1,257,1000,11.604,76.77 GB,82433418198,0,ds003421,Healthy,10-20,Multisensory,Decision-making
|
|
201
|
+
199,ds002158,117,20,1,,,0.0,428.59 GB,460190030981,0,ds002158,Healthy,10-20,Visual,Affect
|
|
202
|
+
200,ds004951,23,11,1,63,1000,29.563,22.00 GB,23627352274,0,ds004951,?,,Tactile,Learning
|
|
203
|
+
201,ds004802,38,38,1,65,"2048,512",0.0,29.34 GB,31504070800,0,ds004802,Other,,Visual,Affect
|
|
204
|
+
202,ds004816,20,20,1,63,1000,0.0,23.31 GB,25028989553,0,ds004816,Healthy,,Visual,Attention
|
|
205
|
+
203,ds005873,2850,125,1,2,256,11935.09,117.21 GB,125851664268,0,,,,,
|
|
206
|
+
204,ds003194,29,15,2,"19,21",200,7.178,189.15 MB,198333904,0,ds003194,Parkinson's,10-20,Resting State,Clinical/Intervention
|
|
207
|
+
205,ds004356,24,22,1,34,10000,0.0,213.08 GB,228796286136,0,ds004356,Healthy,10-20,Auditory,Perception
|
|
208
|
+
206,ds004381,437,18,1,"4,5,7,8,10",20000,11.965,12.36 GB,13275540742,0,ds004381,Surgery,10-20,Other,Other
|
|
209
|
+
207,ds004196,4,4,1,64,512,1.511,9.33 GB,10022898106,0,ds004196,Healthy,10-20,Visual,Clinical/Intervention
|
|
210
|
+
208,ds005692,59,30,1,24,5000,112.206,92.81 GB,99649237201,0,,,,,
|
|
211
|
+
209,ds002338,85,17,4,,5000,0.0,25.89 GB,27802574037,0,ds002338,Healthy,other,Visual,Motor
|
|
212
|
+
210,ds004022,21,7,1,"16,18",500,0.0,634.93 MB,665774359,0,ds004022,Other,10-20,Visual,Motor
|
|
213
|
+
211,ds004603,37,37,1,64,1024,30.653,39.13 GB,42020115207,0,ds004603,Healthy,10-20,Visual,Perception
|
|
214
|
+
212,ds004752,136,15,1,"0,8,10,19,20,21,23","200,2000,4000,4096",0.302,11.95 GB,12829882725,0,ds004752,Epilepsy,10-20,Auditory,Memory
|
|
215
|
+
213,ds003768,255,33,2,,,0.0,89.24 GB,95819107191,0,ds003768,Healthy,10-20,Sleep,Sleep
|
|
216
|
+
214,ds003947,61,61,1,61,"1000,3000.00030000003",5.266,12.54 GB,13466591394,0,ds003947,Schizophrenia/Psychosis,10-20,Resting State,Clinical/Intervention
|
|
217
|
+
215,ds005530,21,17,1,10,500,154.833,6.47 GB,6949642931,0,,,,,
|
|
218
|
+
216,ds005555,256,128,1,"2,8,9,11,12,13",256,2002.592,33.45 GB,35921410419,0,,,,,
|
|
219
|
+
217,ds004477,9,9,1,79,2048,13.557,22.34 GB,23990303639,0,ds004477,Healthy,10-20,Multisensory,Decision-making
|
|
220
|
+
218,ds005688,89,20,5,4,"10000,20000",2.502,8.42 GB,9036021093,0,,,,,
|
|
221
|
+
219,ds003766,124,31,4,129,1000,39.973,152.77 GB,164033759919,0,ds003766,Healthy,other,Visual,Decision-making
|
|
222
|
+
220,ds005540,103,59,1,64,"1200,600",0.0,70.40 GB,75594345013,0,,,,,
|
|
223
|
+
221,ds004152,21,21,1,31,1000,0.0,4.77 GB,5118976537,0,ds004152,Healthy,10-20,Multisensory,Learning
|
|
224
|
+
222,ds003626,30,10,1,,,0.0,24.99 GB,26828585815,0,ds003626,Healthy,10-20,Visual,Motor
|
|
225
|
+
223,ds002814,168,21,1,68,1200,0.0,48.57 GB,52151006842,0,ds002814,Healthy,10-20,Visual,Perception
|
|
226
|
+
224,ds003645,108,18,1,,,0.0,105.89 GB,113698969765,0,ds003645,Healthy,other,Visual,Perception
|
|
227
|
+
225,ds005586,23,23,1,60,1000,33.529,28.68 GB,30791089319,0,,,,,
|
|
228
|
+
226,ds003810,50,10,1,15,125,0.0,69.31 MB,72674251,0,ds003810,Healthy,10-20,Motor,Clinical/Intervention
|
|
229
|
+
227,ds003969,392,98,4,64,"1024,2048",66.512,54.46 GB,58479195149,0,ds003969,Healthy,10-20,Auditory,Attention
|
|
230
|
+
228,ds004000,86,43,2,128,2048,0.0,22.50 GB,24161100810,0,ds004000,Schizophrenia/Psychosis,10-20,Multisensory,Decision-making
|
|
231
|
+
229,ds004995,20,20,1,,,0.0,27.60 GB,29637643188,0,ds004995,,,Visual,Attention
|
|
232
|
+
230,ds003638,57,57,1,64,512,40.597,16.31 GB,17516109722,0,ds003638,Healthy,10-20,Visual,Decision-making
|
|
233
|
+
231,ds004521,34,34,1,62,250,0.057,10.68 GB,11470006201,0,ds004521,,10-20,Visual,Motor
|
|
234
|
+
232,ds001849,120,20,1,30,5000,0.0,44.51 GB,47790431085,0,ds001849,Healthy,10-20,Multisensory,Clinical/Intervention
|
|
235
|
+
233,ds004252,1,1,1,,,0.0,4.31 GB,4630172409,0,ds004252,Healthy,10-20,Visual,Perception
|
|
236
|
+
234,ds004448,280,56,1,129,1000,43.732,38.17 GB,40980948240,0,ds004448,Healthy,other,Visual,Motor
|
|
237
|
+
235,ds005795,39,34,2,72,500,0.0,6.43 GB,6902188541,0,,,,,
|
|
238
|
+
236,ds004018,32,16,1,63,1000,0.0,10.56 GB,11334174765,0,ds004018,Healthy,10-20,Visual,Learning
|
|
239
|
+
237,ds004324,26,26,1,28,500,19.216,2.46 GB,2637689107,0,ds004324,Healthy,10-20,Multisensory,Affect
|
|
240
|
+
238,ds003887,24,24,1,128,1000,0.0,80.10 GB,86007307086,0,ds003887,Healthy,10-20,Visual,Perception
|
|
241
|
+
239,ds004860,31,31,1,32,"2048,512",0.0,3.79 GB,4065632222,0,ds004860,Healthy,,Auditory,Decision-making
|
|
242
|
+
240,ds002721,185,31,6,19,1000,0.0,3.35 GB,3598851749,0,ds002721,Healthy,10-20,Auditory,Affect
|
|
243
|
+
241,ds003555,30,30,1,,1024,0.0,28.27 GB,30359240949,0,ds003555,Epilepsy,10-20,Resting State,Clinical/Intervention
|
|
244
|
+
242,ds005486,445,159,1,,"25000,5000",0.0,371.04 GB,398401152773,0,,,,,
|
|
245
|
+
243,ds005520,69,23,3,67,1000,60.73,275.98 GB,296326427308,0,,,,,
|
|
246
|
+
244,ds005262,186,12,1,,,0.0,688.75 MB,722211079,0,ds005262,Healthy,,Visual,other
|
|
247
|
+
245,ds002778,46,31,1,40,512,2.518,545.00 MB,571471228,0,ds002778,Parkinson's,10-20,Resting State,Resting state
|
|
248
|
+
246,ds003885,24,24,1,128,1000,0.0,82.21 GB,88277188455,0,ds003885,Healthy,10-20,Visual,Perception
|
|
249
|
+
247,ds005406,29,29,1,63,1000,15.452,13.26 GB,14241905076,0,,,,,
|
|
250
|
+
248,ds003710,48,13,1,32,5000,9.165,10.18 GB,10934708022,0,ds003710,Healthy,10-20,Multisensory,Perception
|
|
251
|
+
249,ds003343,59,20,1,16,500,6.551,663.50 MB,695729345,0,ds003343,Healthy,10-20,Tactile,Perception
|
|
252
|
+
250,ds005345,26,26,1,64,500,0.0,405.13 GB,435000970369,0,,,,,
|
|
253
|
+
251,ds004067,84,80,1,63,2000,0.0,100.79 GB,108218050644,0,ds004067,Healthy,10-20,Visual,Affect
|
|
254
|
+
252,ds001810,263,47,1,64,512,91.205,109.70 GB,117790096766,0,ds001810,Healthy,10-20,Visual,Attention
|
|
255
|
+
253,ds005515,2516,533,8,129,500,198.849,160.55 GB,172385741878,0,,,,,
|
|
256
|
+
254,ds005516,3397,430,8,129,500,256.932,219.39 GB,235564761634,0,,,,,
|
eegdash/paths.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
from mne.utils import get_config as mne_get_config
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def get_default_cache_dir() -> Path:
|
|
10
|
+
"""Resolve a consistent default cache directory for EEGDash.
|
|
11
|
+
|
|
12
|
+
Priority order:
|
|
13
|
+
1) Environment variable ``EEGDASH_CACHE_DIR`` if set.
|
|
14
|
+
2) MNE config ``MNE_DATA`` if set (aligns with tests and ecosystem caches).
|
|
15
|
+
3) ``.eegdash_cache`` under the current working directory.
|
|
16
|
+
"""
|
|
17
|
+
# 1) Explicit env var wins
|
|
18
|
+
env_dir = os.environ.get("EEGDASH_CACHE_DIR")
|
|
19
|
+
if env_dir:
|
|
20
|
+
return Path(env_dir).expanduser().resolve()
|
|
21
|
+
|
|
22
|
+
# 2) Reuse MNE's data cache location if configured
|
|
23
|
+
mne_data = mne_get_config("MNE_DATA")
|
|
24
|
+
if mne_data:
|
|
25
|
+
return Path(mne_data).expanduser().resolve()
|
|
26
|
+
|
|
27
|
+
# 3) Default to a project-local hidden folder
|
|
28
|
+
return Path.cwd() / ".eegdash_cache"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eegdash
|
|
3
|
-
Version: 0.3.7.
|
|
3
|
+
Version: 0.3.7.dev110
|
|
4
4
|
Summary: EEG data for machine learning
|
|
5
5
|
Author-email: Young Truong <dt.young112@gmail.com>, Arnaud Delorme <adelorme@gmail.com>, Aviv Dotan <avivd220@gmail.com>, Oren Shriki <oren70@gmail.com>, Bruno Aristimunha <b.aristimunha@gmail.com>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -106,7 +106,7 @@ EEGDash queries return a **Pytorch Dataset** formatted to facilitate machine lea
|
|
|
106
106
|
|
|
107
107
|
## Data preprocessing
|
|
108
108
|
|
|
109
|
-
EEGDash datasets are processed using the popular [
|
|
109
|
+
EEGDash datasets are processed using the popular [braindecode](https://braindecode.org/stable/index.html) library. In fact, EEGDash datasets are braindecode datasets, which are themselves PyTorch datasets. This means that any preprocessing possible on braindecode datasets is also possible on EEGDash datasets. Refer to [braindecode](https://braindecode.org/stable/index.html) tutorials for guidance on preprocessing EEG data.
|
|
110
110
|
|
|
111
111
|
## EEG-Dash usage
|
|
112
112
|
|
|
@@ -129,7 +129,7 @@ ds_NDARDB033FW5 = EEGDashDataset(
|
|
|
129
129
|
)
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
This will search and download the metadata for the task **RestingState** for subject **NDARDB033FW5** in BIDS dataset **ds005514**. The actual data will not be downloaded at this stage. Following standard practice, data is only downloaded once it is processed. The **ds_NDARDB033FW5** object is a fully functional
|
|
132
|
+
This will search and download the metadata for the task **RestingState** for subject **NDARDB033FW5** in BIDS dataset **ds005514**. The actual data will not be downloaded at this stage. Following standard practice, data is only downloaded once it is processed. The **ds_NDARDB033FW5** object is a fully functional braindecode dataset, which is itself a PyTorch dataset. This [tutorial](https://github.com/sccn/EEGDash/blob/develop/notebooks/tutorial_eoec.ipynb) shows how to preprocess the EEG data, extracting portions of the data containing eyes-open and eyes-closed segments, then perform eyes-open vs. eyes-closed classification using a (shallow) deep-learning model.
|
|
133
133
|
|
|
134
134
|
To use the data from multiple subjects, enter:
|
|
135
135
|
|
|
@@ -145,7 +145,13 @@ This will search and download the metadata for the task 'RestingState' for all s
|
|
|
145
145
|
|
|
146
146
|
### Automatic caching
|
|
147
147
|
|
|
148
|
-
EEGDash
|
|
148
|
+
By default, EEGDash caches downloaded data under a single, consistent folder:
|
|
149
|
+
|
|
150
|
+
- If ``EEGDASH_CACHE_DIR`` is set in your environment, that path is used.
|
|
151
|
+
- Else, if MNE’s ``MNE_DATA`` config is set, that path is used to align with other EEG tooling.
|
|
152
|
+
- Otherwise, ``.eegdash_cache`` in the current working directory is used.
|
|
153
|
+
|
|
154
|
+
This means that if you run the tutorial [scripts](https://github.com/sccn/EEGDash/tree/develop/notebooks), the data will only be downloaded the first time the script is executed and reused thereafter.
|
|
149
155
|
|
|
150
156
|
## Education -- Coming soon...
|
|
151
157
|
|
|
@@ -159,4 +165,3 @@ EEG-DaSh is a collaborative initiative between the United States and Israel, sup
|
|
|
159
165
|
|
|
160
166
|
|
|
161
167
|
|
|
162
|
-
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
eegdash/__init__.py,sha256=
|
|
2
|
-
eegdash/api.py,sha256=
|
|
3
|
-
eegdash/bids_eeg_metadata.py,sha256=
|
|
1
|
+
eegdash/__init__.py,sha256=F5TQhqM9qkeTzD_WPltQ5yIxOINLh1uzi2VsHZqBZlM,285
|
|
2
|
+
eegdash/api.py,sha256=1KFZiuYtQW6gIt-qCwFWliLXFBAXYmnwV2W0PJ85tD4,40162
|
|
3
|
+
eegdash/bids_eeg_metadata.py,sha256=LZrGPGVdnGUbZlD4M_aAW4kEItzwTTeZFicH-jyqDyc,9712
|
|
4
4
|
eegdash/const.py,sha256=qdFBEL9kIrsj9CdxbXhBkR61R3CrTGSaj5Iq0YOACIs,7313
|
|
5
|
-
eegdash/data_utils.py,sha256=
|
|
5
|
+
eegdash/data_utils.py,sha256=m2M0XJOlC_OW4WYyOlWBMKxzXYf4mNTPak5xL1m1MIo,34336
|
|
6
6
|
eegdash/mongodb.py,sha256=GD3WgA253oFgpzOHrYaj4P1mRjNtDMT5Oj4kVvHswjI,2006
|
|
7
|
+
eegdash/paths.py,sha256=246xkectTxDAYcREs1Qma_F1Y-oSmLlb0hn0F2Za5Ss,866
|
|
7
8
|
eegdash/utils.py,sha256=7TfQ9D0LrAJ7FgnSXEvWgeHWK2QqaqS-_WcWXD86ObQ,408
|
|
8
9
|
eegdash/dataset/__init__.py,sha256=Qmzki5G8GaFlzTb10e4SmC3WkKuJyo1Ckii15tCEHAo,157
|
|
9
10
|
eegdash/dataset/dataset.py,sha256=5ku9I-JTC8DNult_m1Dgem1OQnSPazp_Xdktq4s_2s4,6829
|
|
11
|
+
eegdash/dataset/dataset_summary.csv,sha256=XF0vdHz77DFyVLTaET8lL5gQQ4r-q1xAfSDWH5GTPLA,23655
|
|
10
12
|
eegdash/dataset/registry.py,sha256=4L8KHlCrY7LT2SDAjKSiEuwklZVKbP-KZceoMDM3zO4,4332
|
|
11
13
|
eegdash/features/__init__.py,sha256=BXNhjvL4_SSFAY1lcP9nyGpkbJNtoOMH4AHlF6OyABo,4078
|
|
12
14
|
eegdash/features/datasets.py,sha256=kU1DO70ArSIy-LF1hHD2NN4iT-kJrI0mVpSkyV_OSeI,18301
|
|
@@ -23,8 +25,8 @@ eegdash/features/feature_bank/dimensionality.py,sha256=j_Ds71Y1AbV2uLFQj8EuXQ4kz
|
|
|
23
25
|
eegdash/features/feature_bank/signal.py,sha256=3Tb8z9gX7iZipxQJ9DSyy30JfdmW58kgvimSyZX74p8,3404
|
|
24
26
|
eegdash/features/feature_bank/spectral.py,sha256=bNB7skusePs1gX7NOU6yRlw_Gr4UOCkO_ylkCgybzug,3319
|
|
25
27
|
eegdash/features/feature_bank/utils.py,sha256=DGh-Q7-XFIittP7iBBxvsJaZrlVvuY5mw-G7q6C-PCI,1237
|
|
26
|
-
eegdash-0.3.7.
|
|
27
|
-
eegdash-0.3.7.
|
|
28
|
-
eegdash-0.3.7.
|
|
29
|
-
eegdash-0.3.7.
|
|
30
|
-
eegdash-0.3.7.
|
|
28
|
+
eegdash-0.3.7.dev110.dist-info/licenses/LICENSE,sha256=asisR-xupy_NrQBFXnx6yqXeZcYWLvbAaiETl25iXT0,931
|
|
29
|
+
eegdash-0.3.7.dev110.dist-info/METADATA,sha256=dDtNbyQLwDkMPM2ABjhMy9U5CF7YiWJpuVVprow757c,10264
|
|
30
|
+
eegdash-0.3.7.dev110.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
31
|
+
eegdash-0.3.7.dev110.dist-info/top_level.txt,sha256=zavO69HQ6MyZM0aQMR2zUS6TAFc7bnN5GEpDpOpFZzU,8
|
|
32
|
+
eegdash-0.3.7.dev110.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|