eegdash 0.3.0.dev172943270__py3-none-any.whl → 0.3.1__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/data_utils.py +19 -2
- eegdash/dataset.py +17 -17
- {eegdash-0.3.0.dev172943270.dist-info → eegdash-0.3.1.dist-info}/METADATA +1 -1
- {eegdash-0.3.0.dev172943270.dist-info → eegdash-0.3.1.dist-info}/RECORD +8 -8
- {eegdash-0.3.0.dev172943270.dist-info → eegdash-0.3.1.dist-info}/WHEEL +0 -0
- {eegdash-0.3.0.dev172943270.dist-info → eegdash-0.3.1.dist-info}/licenses/LICENSE +0 -0
- {eegdash-0.3.0.dev172943270.dist-info → eegdash-0.3.1.dist-info}/top_level.txt +0 -0
eegdash/__init__.py
CHANGED
eegdash/data_utils.py
CHANGED
|
@@ -61,10 +61,23 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
61
61
|
suffix="eeg",
|
|
62
62
|
**bids_kwargs,
|
|
63
63
|
)
|
|
64
|
-
|
|
64
|
+
if s3_bucket:
|
|
65
|
+
self.s3_bucket = s3_bucket
|
|
66
|
+
self.s3_open_neuro = False
|
|
67
|
+
else:
|
|
68
|
+
self.s3_bucket = self._AWS_BUCKET
|
|
69
|
+
self.s3_open_neuro = True
|
|
70
|
+
|
|
65
71
|
self.s3file = self.get_s3path(record["bidspath"])
|
|
66
72
|
self.filecache = self.cache_dir / record["bidspath"]
|
|
67
73
|
self.bids_dependencies = record["bidsdependencies"]
|
|
74
|
+
# Temporary fix for BIDS dependencies path
|
|
75
|
+
# just to release to the competition
|
|
76
|
+
if not self.s3_open_neuro:
|
|
77
|
+
self.bids_dependencies = [
|
|
78
|
+
dep.split("/", 1)[1] for dep in self.bids_dependencies
|
|
79
|
+
]
|
|
80
|
+
|
|
68
81
|
self._raw = None
|
|
69
82
|
|
|
70
83
|
def get_s3path(self, filepath: str) -> str:
|
|
@@ -77,6 +90,9 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
77
90
|
filesystem = s3fs.S3FileSystem(
|
|
78
91
|
anon=True, client_kwargs={"region_name": "us-east-2"}
|
|
79
92
|
)
|
|
93
|
+
if not self.s3_open_neuro:
|
|
94
|
+
self.s3file = re.sub(r"(^|/)ds\d{6}/", r"\1", self.s3file, count=1)
|
|
95
|
+
|
|
80
96
|
filesystem.download(self.s3file, self.filecache)
|
|
81
97
|
self.filenames = [self.filecache]
|
|
82
98
|
|
|
@@ -108,7 +124,7 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
108
124
|
self._download_dependencies()
|
|
109
125
|
self._download_s3()
|
|
110
126
|
if self._raw is None:
|
|
111
|
-
self._raw = mne.io.read_raw(self.bidspath, verbose=False)
|
|
127
|
+
self._raw = mne.io.read_raw(fname=self.bidspath, verbose=False)
|
|
112
128
|
|
|
113
129
|
# === BaseDataset and PyTorch Dataset interface ===
|
|
114
130
|
|
|
@@ -215,6 +231,7 @@ class EEGDashBaseRaw(BaseRaw):
|
|
|
215
231
|
)
|
|
216
232
|
|
|
217
233
|
def get_s3path(self, filepath):
|
|
234
|
+
print(f"Getting S3 path for {filepath}")
|
|
218
235
|
return f"{self._AWS_BUCKET}/{filepath}"
|
|
219
236
|
|
|
220
237
|
def _download_s3(self):
|
eegdash/dataset.py
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
from .api import EEGDashDataset
|
|
2
2
|
|
|
3
|
+
RELEASE_TO_OPENNEURO_DATASET_MAP = {
|
|
4
|
+
"R11": "ds005516",
|
|
5
|
+
"R10": "ds005515",
|
|
6
|
+
"R9": "ds005514",
|
|
7
|
+
"R8": "ds005512",
|
|
8
|
+
"R7": "ds005511",
|
|
9
|
+
"R6": "ds005510",
|
|
10
|
+
"R4": "ds005508",
|
|
11
|
+
"R5": "ds005509",
|
|
12
|
+
"R3": "ds005507",
|
|
13
|
+
"R2": "ds005506",
|
|
14
|
+
"R1": "ds005505",
|
|
15
|
+
}
|
|
16
|
+
|
|
3
17
|
|
|
4
18
|
class EEGChallengeDataset(EEGDashDataset):
|
|
5
19
|
def __init__(
|
|
@@ -7,7 +21,7 @@ class EEGChallengeDataset(EEGDashDataset):
|
|
|
7
21
|
release: str = "R5",
|
|
8
22
|
query: dict | None = None,
|
|
9
23
|
cache_dir: str = ".eegdash_cache",
|
|
10
|
-
s3_bucket: str | None = "s3://nmdatasets/NeurIPS25
|
|
24
|
+
s3_bucket: str | None = "s3://nmdatasets/NeurIPS25",
|
|
11
25
|
**kwargs,
|
|
12
26
|
):
|
|
13
27
|
"""Create a new EEGDashDataset from a given query or local BIDS dataset directory
|
|
@@ -32,25 +46,11 @@ class EEGChallengeDataset(EEGDashDataset):
|
|
|
32
46
|
constructor.
|
|
33
47
|
|
|
34
48
|
"""
|
|
35
|
-
dsnumber_release_map = {
|
|
36
|
-
"R11": "ds005516",
|
|
37
|
-
"R10": "ds005515",
|
|
38
|
-
"R9": "ds005514",
|
|
39
|
-
"R8": "ds005512",
|
|
40
|
-
"R7": "ds005511",
|
|
41
|
-
"R6": "ds005510",
|
|
42
|
-
"R4": "ds005508",
|
|
43
|
-
"R5": "ds005509",
|
|
44
|
-
"R3": "ds005507",
|
|
45
|
-
"R2": "ds005506",
|
|
46
|
-
"R1": "ds005505",
|
|
47
|
-
}
|
|
48
|
-
|
|
49
49
|
self.release = release
|
|
50
|
-
if release not in
|
|
50
|
+
if release not in RELEASE_TO_OPENNEURO_DATASET_MAP:
|
|
51
51
|
raise ValueError(f"Unknown release: {release}")
|
|
52
52
|
|
|
53
|
-
dataset =
|
|
53
|
+
dataset = RELEASE_TO_OPENNEURO_DATASET_MAP[release]
|
|
54
54
|
if query is None:
|
|
55
55
|
query = {"dataset": dataset}
|
|
56
56
|
elif "dataset" not in query:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eegdash
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: EEG data for machine learning
|
|
5
5
|
Author-email: Young Truong <dt.young112@gmail.com>, Arnaud Delorme <adelorme@gmail.com>, Bruno Aristimunha <b.aristimunha@gmail.com>
|
|
6
6
|
License: GNU General Public License
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
eegdash/__init__.py,sha256=
|
|
1
|
+
eegdash/__init__.py,sha256=sNP5x1-Ek6HhCM9KzACR7_WvkY7NYvvw3Iv6um43gfw,232
|
|
2
2
|
eegdash/api.py,sha256=igpkLTCjH6NNQf8tEizA6SF8cYa1gE22-hNVxNRPszg,26747
|
|
3
3
|
eegdash/data_config.py,sha256=OS6ERO-jHrnEOfMJUehY7ieABdsRw_qWzOKJ4pzSfqw,1323
|
|
4
|
-
eegdash/data_utils.py,sha256=
|
|
5
|
-
eegdash/dataset.py,sha256=
|
|
4
|
+
eegdash/data_utils.py,sha256=hUjSO-2hBZF_f7We7RSXbm3H15-j58rBZZxmFFggyJE,24191
|
|
5
|
+
eegdash/dataset.py,sha256=BngXb9TtAo0Sjc3o5bRC0fJkQrThdsqzx2Zpvp7xtvs,2374
|
|
6
6
|
eegdash/mongodb.py,sha256=GD3WgA253oFgpzOHrYaj4P1mRjNtDMT5Oj4kVvHswjI,2006
|
|
7
7
|
eegdash/preprocessing.py,sha256=7S_TTRKPKEk47tTnh2D6WExBt4cctAMxUxGDjJqq5lU,2221
|
|
8
8
|
eegdash/utils.py,sha256=wU9CBQZLW_LIQIBwhgQm5bU4X-rSsVNPdeF2iE4QGJ4,410
|
|
@@ -21,8 +21,8 @@ eegdash/features/feature_bank/dimensionality.py,sha256=j_Ds71Y1AbV2uLFQj8EuXQ4kz
|
|
|
21
21
|
eegdash/features/feature_bank/signal.py,sha256=3Tb8z9gX7iZipxQJ9DSyy30JfdmW58kgvimSyZX74p8,3404
|
|
22
22
|
eegdash/features/feature_bank/spectral.py,sha256=bNB7skusePs1gX7NOU6yRlw_Gr4UOCkO_ylkCgybzug,3319
|
|
23
23
|
eegdash/features/feature_bank/utils.py,sha256=DGh-Q7-XFIittP7iBBxvsJaZrlVvuY5mw-G7q6C-PCI,1237
|
|
24
|
-
eegdash-0.3.
|
|
25
|
-
eegdash-0.3.
|
|
26
|
-
eegdash-0.3.
|
|
27
|
-
eegdash-0.3.
|
|
28
|
-
eegdash-0.3.
|
|
24
|
+
eegdash-0.3.1.dist-info/licenses/LICENSE,sha256=KykUD4H3kw3HLz5bZ0kxMWwZotnk8rhkfCCerGyX2sk,855
|
|
25
|
+
eegdash-0.3.1.dist-info/METADATA,sha256=XPr6_yorRXXsHSRWILffJ09I9yrLfs8m_36Gd7-mIZY,10621
|
|
26
|
+
eegdash-0.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
+
eegdash-0.3.1.dist-info/top_level.txt,sha256=zavO69HQ6MyZM0aQMR2zUS6TAFc7bnN5GEpDpOpFZzU,8
|
|
28
|
+
eegdash-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|