eegdash 0.3.2.dev52__tar.gz → 0.3.3.dev58__tar.gz
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-0.3.2.dev52 → eegdash-0.3.3.dev58}/PKG-INFO +15 -3
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/README.md +12 -2
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/__init__.py +1 -1
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/data_utils.py +41 -2
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash.egg-info/PKG-INFO +15 -3
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash.egg-info/SOURCES.txt +1 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash.egg-info/requires.txt +2 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/pyproject.toml +2 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/tests/test_dataset.py +1 -1
- eegdash-0.3.3.dev58/tests/test_functional.py +28 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/LICENSE +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/api.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/data_config.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/dataset.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/__init__.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/datasets.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/decorators.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/extractors.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/__init__.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/complexity.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/connectivity.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/csp.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/dimensionality.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/signal.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/spectral.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/utils.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/inspect.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/serialization.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/features/utils.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/mongodb.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/preprocessing.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash/utils.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash.egg-info/dependency_links.txt +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/eegdash.egg-info/top_level.txt +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/setup.cfg +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/tests/test_correctness.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/tests/test_eegdash.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/tests/test_init.py +0 -0
- {eegdash-0.3.2.dev52 → eegdash-0.3.3.dev58}/tests/test_mongo_connection.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eegdash
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3.dev58
|
|
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: GNU General Public License
|
|
@@ -60,6 +60,8 @@ Requires-Dist: s3fs
|
|
|
60
60
|
Requires-Dist: scipy
|
|
61
61
|
Requires-Dist: tqdm
|
|
62
62
|
Requires-Dist: xarray
|
|
63
|
+
Requires-Dist: h5io>=0.2.4
|
|
64
|
+
Requires-Dist: pymatreader
|
|
63
65
|
Provides-Extra: tests
|
|
64
66
|
Requires-Dist: pytest; extra == "tests"
|
|
65
67
|
Requires-Dist: pytest-cov; extra == "tests"
|
|
@@ -98,6 +100,14 @@ Dynamic: license-file
|
|
|
98
100
|
|
|
99
101
|
# EEG-Dash
|
|
100
102
|
|
|
103
|
+
[](https://pypi.org/project/eegdash/)
|
|
104
|
+
[](https://sccn.github.io/eegdash)
|
|
105
|
+
|
|
106
|
+
[](LICENSE)
|
|
107
|
+
[](https://pypi.org/project/eegdash/)
|
|
108
|
+
[](https://pepy.tech/project/eegdash)
|
|
109
|
+
<!-- [](https://codecov.io/gh/sccn/eegdash) -->
|
|
110
|
+
|
|
101
111
|
To leverage recent and ongoing advancements in large-scale computational methods and to ensure the preservation of scientific data generated from publicly funded research, the EEG-DaSh data archive will create a data-sharing resource for MEEG (EEG, MEG) data contributed by collaborators for machine learning (ML) and deep learning (DL) applications.
|
|
102
112
|
|
|
103
113
|
## Data source
|
|
@@ -143,7 +153,9 @@ To use the data from a single subject, enter:
|
|
|
143
153
|
from eegdash import EEGDashDataset
|
|
144
154
|
|
|
145
155
|
ds_NDARDB033FW5 = EEGDashDataset(
|
|
146
|
-
{"dataset": "ds005514", "task":
|
|
156
|
+
{"dataset": "ds005514", "task":
|
|
157
|
+
"RestingState", "subject": "NDARDB033FW5"},
|
|
158
|
+
cache_dir="."
|
|
147
159
|
)
|
|
148
160
|
```
|
|
149
161
|
|
|
@@ -155,7 +167,7 @@ To use the data from multiple subjects, enter:
|
|
|
155
167
|
from eegdash import EEGDashDataset
|
|
156
168
|
|
|
157
169
|
ds_ds005505rest = EEGDashDataset(
|
|
158
|
-
{"dataset": "ds005505", "task": "RestingState"}, target_name="sex"
|
|
170
|
+
{"dataset": "ds005505", "task": "RestingState"}, target_name="sex", cache_dir=".
|
|
159
171
|
)
|
|
160
172
|
```
|
|
161
173
|
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# EEG-Dash
|
|
2
2
|
|
|
3
|
+
[](https://pypi.org/project/eegdash/)
|
|
4
|
+
[](https://sccn.github.io/eegdash)
|
|
5
|
+
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://pypi.org/project/eegdash/)
|
|
8
|
+
[](https://pepy.tech/project/eegdash)
|
|
9
|
+
<!-- [](https://codecov.io/gh/sccn/eegdash) -->
|
|
10
|
+
|
|
3
11
|
To leverage recent and ongoing advancements in large-scale computational methods and to ensure the preservation of scientific data generated from publicly funded research, the EEG-DaSh data archive will create a data-sharing resource for MEEG (EEG, MEG) data contributed by collaborators for machine learning (ML) and deep learning (DL) applications.
|
|
4
12
|
|
|
5
13
|
## Data source
|
|
@@ -45,7 +53,9 @@ To use the data from a single subject, enter:
|
|
|
45
53
|
from eegdash import EEGDashDataset
|
|
46
54
|
|
|
47
55
|
ds_NDARDB033FW5 = EEGDashDataset(
|
|
48
|
-
{"dataset": "ds005514", "task":
|
|
56
|
+
{"dataset": "ds005514", "task":
|
|
57
|
+
"RestingState", "subject": "NDARDB033FW5"},
|
|
58
|
+
cache_dir="."
|
|
49
59
|
)
|
|
50
60
|
```
|
|
51
61
|
|
|
@@ -57,7 +67,7 @@ To use the data from multiple subjects, enter:
|
|
|
57
67
|
from eegdash import EEGDashDataset
|
|
58
68
|
|
|
59
69
|
ds_ds005505rest = EEGDashDataset(
|
|
60
|
-
{"dataset": "ds005505", "task": "RestingState"}, target_name="sex"
|
|
70
|
+
{"dataset": "ds005505", "task": "RestingState"}, target_name="sex", cache_dir=".
|
|
61
71
|
)
|
|
62
72
|
```
|
|
63
73
|
|
|
@@ -10,6 +10,7 @@ import numpy as np
|
|
|
10
10
|
import pandas as pd
|
|
11
11
|
import s3fs
|
|
12
12
|
from bids import BIDSLayout
|
|
13
|
+
from fsspec.callbacks import TqdmCallback
|
|
13
14
|
from joblib import Parallel, delayed
|
|
14
15
|
from mne._fiff.utils import _read_segments_file
|
|
15
16
|
from mne.io import BaseRaw
|
|
@@ -98,8 +99,27 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
98
99
|
self.s3file = re.sub(r"(^|/)ds\d{6}/", r"\1", self.s3file, count=1)
|
|
99
100
|
|
|
100
101
|
self.filecache.parent.mkdir(parents=True, exist_ok=True)
|
|
102
|
+
info = filesystem.info(self.s3file)
|
|
103
|
+
size = info.get("size") or info.get("Size")
|
|
104
|
+
|
|
105
|
+
callback = TqdmCallback(
|
|
106
|
+
size=size,
|
|
107
|
+
tqdm_kwargs=dict(
|
|
108
|
+
desc=f"Downloading {Path(self.s3file).name}",
|
|
109
|
+
unit="B",
|
|
110
|
+
unit_scale=True,
|
|
111
|
+
unit_divisor=1024,
|
|
112
|
+
dynamic_ncols=True,
|
|
113
|
+
leave=True,
|
|
114
|
+
mininterval=0.2,
|
|
115
|
+
smoothing=0.1,
|
|
116
|
+
miniters=1,
|
|
117
|
+
bar_format="{desc}: {percentage:3.0f}%|{bar}| {n_fmt}/{total_fmt} "
|
|
118
|
+
"[{elapsed}<{remaining}, {rate_fmt}]",
|
|
119
|
+
),
|
|
120
|
+
)
|
|
121
|
+
filesystem.get(self.s3file, self.filecache, callback=callback)
|
|
101
122
|
|
|
102
|
-
filesystem.download(self.s3file, self.filecache)
|
|
103
123
|
self.filenames = [self.filecache]
|
|
104
124
|
|
|
105
125
|
def _download_dependencies(self) -> None:
|
|
@@ -119,7 +139,26 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
119
139
|
# in the case of the competition.
|
|
120
140
|
if not filepath.exists():
|
|
121
141
|
filepath.parent.mkdir(parents=True, exist_ok=True)
|
|
122
|
-
filesystem.
|
|
142
|
+
info = filesystem.info(s3path)
|
|
143
|
+
size = info.get("size") or info.get("Size")
|
|
144
|
+
|
|
145
|
+
callback = TqdmCallback(
|
|
146
|
+
size=size,
|
|
147
|
+
tqdm_kwargs=dict(
|
|
148
|
+
desc=f"Downloading {Path(s3path).name}",
|
|
149
|
+
unit="B",
|
|
150
|
+
unit_scale=True,
|
|
151
|
+
unit_divisor=1024,
|
|
152
|
+
dynamic_ncols=True,
|
|
153
|
+
leave=True,
|
|
154
|
+
mininterval=0.2,
|
|
155
|
+
smoothing=0.1,
|
|
156
|
+
miniters=1,
|
|
157
|
+
bar_format="{desc}: {percentage:3.0f}%|{bar}| {n_fmt}/{total_fmt} "
|
|
158
|
+
"[{elapsed}<{remaining}, {rate_fmt}]",
|
|
159
|
+
),
|
|
160
|
+
)
|
|
161
|
+
filesystem.get(s3path, filepath, callback=callback)
|
|
123
162
|
|
|
124
163
|
def get_raw_bids_args(self) -> dict[str, Any]:
|
|
125
164
|
"""Helper to restrict the metadata record to the fields needed to locate a BIDS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eegdash
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3.dev58
|
|
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: GNU General Public License
|
|
@@ -60,6 +60,8 @@ Requires-Dist: s3fs
|
|
|
60
60
|
Requires-Dist: scipy
|
|
61
61
|
Requires-Dist: tqdm
|
|
62
62
|
Requires-Dist: xarray
|
|
63
|
+
Requires-Dist: h5io>=0.2.4
|
|
64
|
+
Requires-Dist: pymatreader
|
|
63
65
|
Provides-Extra: tests
|
|
64
66
|
Requires-Dist: pytest; extra == "tests"
|
|
65
67
|
Requires-Dist: pytest-cov; extra == "tests"
|
|
@@ -98,6 +100,14 @@ Dynamic: license-file
|
|
|
98
100
|
|
|
99
101
|
# EEG-Dash
|
|
100
102
|
|
|
103
|
+
[](https://pypi.org/project/eegdash/)
|
|
104
|
+
[](https://sccn.github.io/eegdash)
|
|
105
|
+
|
|
106
|
+
[](LICENSE)
|
|
107
|
+
[](https://pypi.org/project/eegdash/)
|
|
108
|
+
[](https://pepy.tech/project/eegdash)
|
|
109
|
+
<!-- [](https://codecov.io/gh/sccn/eegdash) -->
|
|
110
|
+
|
|
101
111
|
To leverage recent and ongoing advancements in large-scale computational methods and to ensure the preservation of scientific data generated from publicly funded research, the EEG-DaSh data archive will create a data-sharing resource for MEEG (EEG, MEG) data contributed by collaborators for machine learning (ML) and deep learning (DL) applications.
|
|
102
112
|
|
|
103
113
|
## Data source
|
|
@@ -143,7 +153,9 @@ To use the data from a single subject, enter:
|
|
|
143
153
|
from eegdash import EEGDashDataset
|
|
144
154
|
|
|
145
155
|
ds_NDARDB033FW5 = EEGDashDataset(
|
|
146
|
-
{"dataset": "ds005514", "task":
|
|
156
|
+
{"dataset": "ds005514", "task":
|
|
157
|
+
"RestingState", "subject": "NDARDB033FW5"},
|
|
158
|
+
cache_dir="."
|
|
147
159
|
)
|
|
148
160
|
```
|
|
149
161
|
|
|
@@ -155,7 +167,7 @@ To use the data from multiple subjects, enter:
|
|
|
155
167
|
from eegdash import EEGDashDataset
|
|
156
168
|
|
|
157
169
|
ds_ds005505rest = EEGDashDataset(
|
|
158
|
-
{"dataset": "ds005505", "task": "RestingState"}, target_name="sex"
|
|
170
|
+
{"dataset": "ds005505", "task": "RestingState"}, target_name="sex", cache_dir=".
|
|
159
171
|
)
|
|
160
172
|
```
|
|
161
173
|
|
|
@@ -11,7 +11,7 @@ FILES_PER_RELEASE = [1342, 1405, 1812, 3342, 3326, 1227, 3100, 2320, 2885, 2516,
|
|
|
11
11
|
|
|
12
12
|
RELEASE_FILES = list(zip(RELEASES, FILES_PER_RELEASE))
|
|
13
13
|
|
|
14
|
-
CACHE_DIR = Path("
|
|
14
|
+
CACHE_DIR = (Path.home() / "mne_data" / "eeg_challenge_cache").resolve()
|
|
15
15
|
CACHE_DIR.mkdir(parents=True, exist_ok=True)
|
|
16
16
|
|
|
17
17
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import shutil
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from eegdash.dataset import EEGDashDataset
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def test_progress_bar_output(capsys, tmp_path):
|
|
8
|
+
temporary = (Path.home() / "mne_data" / "temp").resolve()
|
|
9
|
+
|
|
10
|
+
if temporary.exists():
|
|
11
|
+
shutil.rmtree(temporary)
|
|
12
|
+
|
|
13
|
+
temporary.mkdir(parents=True, exist_ok=True)
|
|
14
|
+
|
|
15
|
+
eegdash_dataset = EEGDashDataset(
|
|
16
|
+
query={
|
|
17
|
+
"dataset": "ds005514",
|
|
18
|
+
"task": "RestingState",
|
|
19
|
+
"subject": "NDARDB033FW5",
|
|
20
|
+
},
|
|
21
|
+
cache_dir=temporary,
|
|
22
|
+
)
|
|
23
|
+
_ = eegdash_dataset.datasets[0].raw
|
|
24
|
+
|
|
25
|
+
out = capsys.readouterr()
|
|
26
|
+
# tqdm uses carriage returns; just assert a stable fragment:
|
|
27
|
+
assert "Downloading" in out.err
|
|
28
|
+
assert out.err # non-empty
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|