eegdash 0.3.3.dev61__py3-none-any.whl → 0.3.3.dev178374711__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 +3 -1
- eegdash/dataset.py +13 -0
- eegdash/registry.py +72 -0
- {eegdash-0.3.3.dev61.dist-info → eegdash-0.3.3.dev178374711.dist-info}/METADATA +2 -26
- {eegdash-0.3.3.dev61.dist-info → eegdash-0.3.3.dev178374711.dist-info}/RECORD +8 -7
- {eegdash-0.3.3.dev61.dist-info → eegdash-0.3.3.dev178374711.dist-info}/WHEEL +0 -0
- {eegdash-0.3.3.dev61.dist-info → eegdash-0.3.3.dev178374711.dist-info}/licenses/LICENSE +0 -0
- {eegdash-0.3.3.dev61.dist-info → eegdash-0.3.3.dev178374711.dist-info}/top_level.txt +0 -0
eegdash/__init__.py
CHANGED
eegdash/dataset.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
1
3
|
from .api import EEGDashDataset
|
|
4
|
+
from .registry import register_openneuro_datasets
|
|
2
5
|
|
|
3
6
|
RELEASE_TO_OPENNEURO_DATASET_MAP = {
|
|
4
7
|
"R11": "ds005516",
|
|
@@ -67,3 +70,13 @@ class EEGChallengeDataset(EEGDashDataset):
|
|
|
67
70
|
s3_bucket=f"{s3_bucket}/{release}_L100",
|
|
68
71
|
**kwargs,
|
|
69
72
|
)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
registered_classes = register_openneuro_datasets(
|
|
76
|
+
summary_file=Path(__file__).with_name("dataset_summary.csv"),
|
|
77
|
+
base_class=EEGDashDataset,
|
|
78
|
+
namespace=globals(),
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
__all__ = ["EEGChallengeDataset"] + list(registered_classes.keys())
|
eegdash/registry.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import csv
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Any, Dict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def register_openneuro_datasets(
|
|
9
|
+
summary_file: str | Path,
|
|
10
|
+
*,
|
|
11
|
+
base_class=None,
|
|
12
|
+
namespace: Dict[str, Any] | None = None,
|
|
13
|
+
) -> Dict[str, type]:
|
|
14
|
+
"""Dynamically create dataset classes from a summary file.
|
|
15
|
+
|
|
16
|
+
Parameters
|
|
17
|
+
----------
|
|
18
|
+
summary_file : str | Path
|
|
19
|
+
Path to a CSV file where each line starts with the dataset identifier.
|
|
20
|
+
base_class : type | None
|
|
21
|
+
Base class for the generated datasets. If ``None``, defaults to
|
|
22
|
+
:class:`eegdash.api.EEGDashDataset`.
|
|
23
|
+
namespace : dict | None
|
|
24
|
+
Mapping where the new classes will be registered. Defaults to the
|
|
25
|
+
module's global namespace.
|
|
26
|
+
|
|
27
|
+
Returns
|
|
28
|
+
-------
|
|
29
|
+
dict
|
|
30
|
+
Mapping from class names to the generated classes.
|
|
31
|
+
|
|
32
|
+
"""
|
|
33
|
+
if base_class is None:
|
|
34
|
+
from .api import EEGDashDataset as base_class # lazy import
|
|
35
|
+
|
|
36
|
+
summary_path = Path(summary_file)
|
|
37
|
+
namespace = namespace if namespace is not None else globals()
|
|
38
|
+
registered: Dict[str, type] = {}
|
|
39
|
+
|
|
40
|
+
with summary_path.open() as f:
|
|
41
|
+
reader = csv.reader(f)
|
|
42
|
+
for row in reader:
|
|
43
|
+
if not row:
|
|
44
|
+
continue
|
|
45
|
+
dataset_id = row[0].strip()
|
|
46
|
+
if not dataset_id or dataset_id.startswith("#"):
|
|
47
|
+
continue
|
|
48
|
+
class_name = dataset_id.upper()
|
|
49
|
+
|
|
50
|
+
def __init__(
|
|
51
|
+
self,
|
|
52
|
+
cache_dir: str,
|
|
53
|
+
query: dict | None = None,
|
|
54
|
+
s3_bucket: str | None = None,
|
|
55
|
+
**kwargs,
|
|
56
|
+
):
|
|
57
|
+
q = {"dataset": self._dataset}
|
|
58
|
+
if query:
|
|
59
|
+
q.update(query)
|
|
60
|
+
super().__init__(
|
|
61
|
+
query=q, cache_dir=cache_dir, s3_bucket=s3_bucket, **kwargs
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
cls = type(
|
|
65
|
+
class_name,
|
|
66
|
+
(base_class,),
|
|
67
|
+
{"_dataset": dataset_id, "__init__": __init__},
|
|
68
|
+
)
|
|
69
|
+
namespace[class_name] = cls
|
|
70
|
+
registered[class_name] = cls
|
|
71
|
+
|
|
72
|
+
return registered
|
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eegdash
|
|
3
|
-
Version: 0.3.3.
|
|
3
|
+
Version: 0.3.3.dev178374711
|
|
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
|
-
License:
|
|
7
|
-
|
|
8
|
-
Copyright (C) 2024-2025
|
|
9
|
-
|
|
10
|
-
Young Truong, UCSD, dt.young112@gmail.com
|
|
11
|
-
Arnaud Delorme, UCSD, adelorme@ucsd.edu
|
|
12
|
-
Aviv Dotan, BGU, avivdot@bgu.post.ac.il
|
|
13
|
-
Oren Shriki, BGU, shrikio@bgu.ac.il
|
|
14
|
-
Bruno Aristimunha, b.aristimunha@gmail.com
|
|
15
|
-
|
|
16
|
-
This program is free software; you can redistribute it and/or modify
|
|
17
|
-
it under the terms of the GNU General Public License as published by
|
|
18
|
-
the Free Software Foundation; either version 2 of the License, or
|
|
19
|
-
(at your option) any later version.
|
|
20
|
-
|
|
21
|
-
This program is distributed in the hope that it will be useful,
|
|
22
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
23
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
24
|
-
GNU General Public License for more details.
|
|
25
|
-
|
|
26
|
-
You should have received a copy of the GNU General Public License
|
|
27
|
-
along with this program; if not, write to the Free Software
|
|
28
|
-
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1.07 USA
|
|
29
|
-
|
|
6
|
+
License-Expression: GPL-3.0-only
|
|
30
7
|
Project-URL: Homepage, https://github.com/sccn/EEG-Dash-Data
|
|
31
8
|
Project-URL: Issues, https://github.com/sccn/EEG-Dash-Data/issues
|
|
32
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
33
9
|
Classifier: Operating System :: OS Independent
|
|
34
10
|
Classifier: Intended Audience :: Science/Research
|
|
35
11
|
Classifier: Intended Audience :: Developers
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
eegdash/__init__.py,sha256=
|
|
1
|
+
eegdash/__init__.py,sha256=0mIAi_DrGf-_UAbzm9XTAKcQ7jivZPeCgzSHxHK_1w4,247
|
|
2
2
|
eegdash/api.py,sha256=OqOZ27GYURSAZwTQHSs0QcW_6Mq1i_5XHP6KMcihb8A,27295
|
|
3
3
|
eegdash/data_config.py,sha256=OS6ERO-jHrnEOfMJUehY7ieABdsRw_qWzOKJ4pzSfqw,1323
|
|
4
4
|
eegdash/data_utils.py,sha256=8Jb_94uVbdknNPpx3GBl4dCDYUIJNzl3zkLwbfH90N4,26052
|
|
5
|
-
eegdash/dataset.py,sha256=
|
|
5
|
+
eegdash/dataset.py,sha256=ooLoxMFy2I8BY9gJl6ncTp_Gz-Rq0Z-o4NJyyomxLcU,2670
|
|
6
6
|
eegdash/mongodb.py,sha256=GD3WgA253oFgpzOHrYaj4P1mRjNtDMT5Oj4kVvHswjI,2006
|
|
7
7
|
eegdash/preprocessing.py,sha256=7S_TTRKPKEk47tTnh2D6WExBt4cctAMxUxGDjJqq5lU,2221
|
|
8
|
+
eegdash/registry.py,sha256=u2TqnMZPhnhItFupPbV50QGemeImnuc18wnEkKzLtL8,2118
|
|
8
9
|
eegdash/utils.py,sha256=wU9CBQZLW_LIQIBwhgQm5bU4X-rSsVNPdeF2iE4QGJ4,410
|
|
9
10
|
eegdash/features/__init__.py,sha256=BXNhjvL4_SSFAY1lcP9nyGpkbJNtoOMH4AHlF6OyABo,4078
|
|
10
11
|
eegdash/features/datasets.py,sha256=kU1DO70ArSIy-LF1hHD2NN4iT-kJrI0mVpSkyV_OSeI,18301
|
|
@@ -21,8 +22,8 @@ eegdash/features/feature_bank/dimensionality.py,sha256=j_Ds71Y1AbV2uLFQj8EuXQ4kz
|
|
|
21
22
|
eegdash/features/feature_bank/signal.py,sha256=3Tb8z9gX7iZipxQJ9DSyy30JfdmW58kgvimSyZX74p8,3404
|
|
22
23
|
eegdash/features/feature_bank/spectral.py,sha256=bNB7skusePs1gX7NOU6yRlw_Gr4UOCkO_ylkCgybzug,3319
|
|
23
24
|
eegdash/features/feature_bank/utils.py,sha256=DGh-Q7-XFIittP7iBBxvsJaZrlVvuY5mw-G7q6C-PCI,1237
|
|
24
|
-
eegdash-0.3.3.
|
|
25
|
-
eegdash-0.3.3.
|
|
26
|
-
eegdash-0.3.3.
|
|
27
|
-
eegdash-0.3.3.
|
|
28
|
-
eegdash-0.3.3.
|
|
25
|
+
eegdash-0.3.3.dev178374711.dist-info/licenses/LICENSE,sha256=asisR-xupy_NrQBFXnx6yqXeZcYWLvbAaiETl25iXT0,931
|
|
26
|
+
eegdash-0.3.3.dev178374711.dist-info/METADATA,sha256=YNAvqMETaTVuhHSR05-XHA1jqmIm7jhFqZCYAipV9Ao,10347
|
|
27
|
+
eegdash-0.3.3.dev178374711.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
28
|
+
eegdash-0.3.3.dev178374711.dist-info/top_level.txt,sha256=zavO69HQ6MyZM0aQMR2zUS6TAFc7bnN5GEpDpOpFZzU,8
|
|
29
|
+
eegdash-0.3.3.dev178374711.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|