eegdash 0.3.2.dev52__py3-none-any.whl → 0.3.3.dev58__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 CHANGED
@@ -5,4 +5,4 @@ from .utils import __init__mongo_client
5
5
  __init__mongo_client()
6
6
 
7
7
  __all__ = ["EEGDash", "EEGDashDataset", "EEGChallengeDataset"]
8
- __version__ = "0.3.2.dev52"
8
+ __version__ = "0.3.3.dev58"
eegdash/data_utils.py CHANGED
@@ -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.download(s3path, filepath)
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.2.dev52
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
+ [![PyPI version](https://img.shields.io/pypi/v/eegdash)](https://pypi.org/project/eegdash/)
104
+ [![Docs](https://img.shields.io/badge/docs-stable-brightgreen.svg)](https://sccn.github.io/eegdash)
105
+
106
+ [![License: GPL-2.0-or-later](https://img.shields.io/badge/License-GPL--2.0--or--later-blue.svg)](LICENSE)
107
+ [![Python versions](https://img.shields.io/pypi/pyversions/eegdash.svg)](https://pypi.org/project/eegdash/)
108
+ [![Downloads](https://pepy.tech/badge/eegdash)](https://pepy.tech/project/eegdash)
109
+ <!-- [![Coverage](https://img.shields.io/codecov/c/github/sccn/eegdash)](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": "RestingState", "subject": "NDARDB033FW5"}
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,7 +1,7 @@
1
- eegdash/__init__.py,sha256=Nfsbk31HxH9sVIE7p14a0SwBKJWCAbWc6pHCUzDy_VA,238
1
+ eegdash/__init__.py,sha256=Kj9Utn1GX3_PBPX9iOkMXepsLn4-u9yx8dFGTIkTb2c,238
2
2
  eegdash/api.py,sha256=lYCILa69Y_RRd4_13x1Ge77FDGswnEG2DEfdPzMygAY,26865
3
3
  eegdash/data_config.py,sha256=OS6ERO-jHrnEOfMJUehY7ieABdsRw_qWzOKJ4pzSfqw,1323
4
- eegdash/data_utils.py,sha256=h1FLCTjRj2JDn6IFnVgWrogDYnHFR4mcuDF23KNtLZI,24530
4
+ eegdash/data_utils.py,sha256=8Jb_94uVbdknNPpx3GBl4dCDYUIJNzl3zkLwbfH90N4,26052
5
5
  eegdash/dataset.py,sha256=GVELU-eXq9AQDzOeg6Lkykd-Pctyn42e5UEcAV0Go4s,2348
6
6
  eegdash/mongodb.py,sha256=GD3WgA253oFgpzOHrYaj4P1mRjNtDMT5Oj4kVvHswjI,2006
7
7
  eegdash/preprocessing.py,sha256=7S_TTRKPKEk47tTnh2D6WExBt4cctAMxUxGDjJqq5lU,2221
@@ -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.2.dev52.dist-info/licenses/LICENSE,sha256=asisR-xupy_NrQBFXnx6yqXeZcYWLvbAaiETl25iXT0,931
25
- eegdash-0.3.2.dev52.dist-info/METADATA,sha256=vlhnJbk-mBMlfsTen_2zpBRpm6VNZ_2gI3I2gprYAC0,10784
26
- eegdash-0.3.2.dev52.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- eegdash-0.3.2.dev52.dist-info/top_level.txt,sha256=zavO69HQ6MyZM0aQMR2zUS6TAFc7bnN5GEpDpOpFZzU,8
28
- eegdash-0.3.2.dev52.dist-info/RECORD,,
24
+ eegdash-0.3.3.dev58.dist-info/licenses/LICENSE,sha256=asisR-xupy_NrQBFXnx6yqXeZcYWLvbAaiETl25iXT0,931
25
+ eegdash-0.3.3.dev58.dist-info/METADATA,sha256=RRZw0l9aGFsfVZgS6qfQVTft6uBdVdRqTgsQ6HYjl9A,11483
26
+ eegdash-0.3.3.dev58.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ eegdash-0.3.3.dev58.dist-info/top_level.txt,sha256=zavO69HQ6MyZM0aQMR2zUS6TAFc7bnN5GEpDpOpFZzU,8
28
+ eegdash-0.3.3.dev58.dist-info/RECORD,,