eegdash 0.3.8__py3-none-any.whl → 0.3.9.dev170082126__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
@@ -7,4 +7,4 @@ _init_mongo_client()
7
7
 
8
8
  __all__ = ["EEGDash", "EEGDashDataset", "EEGChallengeDataset", "preprocessing"]
9
9
 
10
- __version__ = "0.3.8"
10
+ __version__ = "0.3.9.dev170082126"
eegdash/api.py CHANGED
@@ -92,16 +92,13 @@ class EEGDash:
92
92
  ) -> list[Mapping[str, Any]]:
93
93
  """Find records in the MongoDB collection.
94
94
 
95
- This method supports four usage patterns:
96
- 1. With a pre-built MongoDB query dictionary (positional argument):
97
- >>> eegdash.find({"dataset": "ds002718", "subject": {"$in": ["012", "013"]}})
98
- 2. With user-friendly keyword arguments for simple and multi-value queries:
99
- >>> eegdash.find(dataset="ds002718", subject="012")
100
- >>> eegdash.find(dataset="ds002718", subject=["012", "013"])
101
- 3. With an explicit empty query to return all documents:
102
- >>> eegdash.find({}) # fetches all records (use with care)
103
- 4. By combining a raw query with kwargs (merged via logical AND):
104
- >>> eegdash.find({"dataset": "ds002718"}, subject=["012", "013"]) # yields {"$and":[{"dataset":"ds002718"}, {"subject":{"$in":["012","013"]}}]}
95
+ Examples
96
+ --------
97
+ >>> eegdash.find({"dataset": "ds002718", "subject": {"$in": ["012", "013"]}}) # pre-built query
98
+ >>> eegdash.find(dataset="ds002718", subject="012") # keyword filters
99
+ >>> eegdash.find(dataset="ds002718", subject=["012", "013"]) # sequence -> $in
100
+ >>> eegdash.find({}) # fetch all (use with care)
101
+ >>> eegdash.find({"dataset": "ds002718"}, subject=["012", "013"]) # combine query + kwargs (AND)
105
102
 
106
103
  Parameters
107
104
  ----------
@@ -641,8 +638,8 @@ class EEGDashDataset(BaseConcatDataset, metaclass=NumpyDocstringInheritanceInitM
641
638
  and dataset name. An EEGDashDataset is pooled collection of EEGDashBaseDataset
642
639
  instances (individual recordings) and is a subclass of braindecode's BaseConcatDataset.
643
640
 
644
- Querying Examples:
645
- ------------------
641
+ Examples
642
+ --------
646
643
  # Find by single subject
647
644
  >>> ds = EEGDashDataset(dataset="ds005505", subject="NDARCA153NKE")
648
645
 
@@ -695,10 +692,11 @@ class EEGDashDataset(BaseConcatDataset, metaclass=NumpyDocstringInheritanceInitM
695
692
  a new client is created on demand, not used in the case of no download.
696
693
  **kwargs : dict
697
694
  Additional keyword arguments serving two purposes:
698
- - Filtering: any keys present in ``ALLOWED_QUERY_FIELDS`` are treated
699
- as query filters (e.g., ``dataset``, ``subject``, ``task``, ...).
700
- - Dataset options: remaining keys are forwarded to the
701
- ``EEGDashBaseDataset`` constructor.
695
+
696
+ - Filtering: any keys present in ``ALLOWED_QUERY_FIELDS`` are treated as
697
+ query filters (e.g., ``dataset``, ``subject``, ``task``, ...).
698
+ - Dataset options: remaining keys are forwarded to
699
+ ``EEGDashBaseDataset``.
702
700
 
703
701
  """
704
702
 
@@ -12,6 +12,31 @@ logger = logging.getLogger("eegdash")
12
12
 
13
13
 
14
14
  class EEGChallengeDataset(EEGDashDataset):
15
+ """EEG 2025 Challenge dataset helper.
16
+
17
+ This class provides a convenient wrapper around :class:`EEGDashDataset`
18
+ configured for the EEG 2025 Challenge releases. It maps a given
19
+ ``release`` to its corresponding OpenNeuro dataset and optionally restricts
20
+ to the official "mini" subject subset.
21
+
22
+ Parameters
23
+ ----------
24
+ release : str
25
+ Release name. One of ["R1", ..., "R11"].
26
+ cache_dir : str
27
+ Local cache directory for data files.
28
+ mini : bool, default True
29
+ If True, restrict subjects to the challenge mini subset.
30
+ query : dict | None
31
+ Additional MongoDB-style filters to AND with the release selection.
32
+ Must not contain the key ``dataset``.
33
+ s3_bucket : str | None, default "s3://nmdatasets/NeurIPS25"
34
+ Base S3 bucket used to locate the challenge data.
35
+ **kwargs
36
+ Passed through to :class:`EEGDashDataset`.
37
+
38
+ """
39
+
15
40
  def __init__(
16
41
  self,
17
42
  release: str,
@@ -21,31 +46,6 @@ class EEGChallengeDataset(EEGDashDataset):
21
46
  s3_bucket: str | None = "s3://nmdatasets/NeurIPS25",
22
47
  **kwargs,
23
48
  ):
24
- """Create a new EEGDashDataset from a given query or local BIDS dataset directory
25
- and dataset name. An EEGDashDataset is pooled collection of EEGDashBaseDataset
26
- instances (individual recordings) and is a subclass of braindecode's BaseConcatDataset.
27
-
28
- Parameters
29
- ----------
30
- release: str
31
- Release name. Can be one of ["R1", ..., "R11"]
32
- mini: bool, default True
33
- Whether to use the mini-release version of the dataset. It is recommended
34
- to use the mini version for faster training and evaluation.
35
- query : dict | None
36
- Optionally a dictionary that specifies a query to be executed,
37
- in addition to the dataset (automatically inferred from the release argument).
38
- See EEGDash.find() for details on the query format.
39
- cache_dir : str
40
- A directory where the dataset will be cached locally.
41
- s3_bucket : str | None
42
- An optional S3 bucket URI to use instead of the
43
- default OpenNeuro bucket for loading data files.
44
- kwargs : dict
45
- Additional keyword arguments to be passed to the EEGDashDataset
46
- constructor.
47
-
48
- """
49
49
  self.release = release
50
50
  self.mini = mini
51
51
 
@@ -25,8 +25,8 @@ def register_openneuro_datasets(
25
25
 
26
26
  df = pd.read_csv(summary_path, comment="#", skip_blank_lines=True)
27
27
  for _, row_series in df.iterrows():
28
- row = row_series.tolist()
29
- dataset_id = str(row[0]).strip()
28
+ # Use the explicit 'dataset' column, not the CSV index.
29
+ dataset_id = str(row_series.get("dataset", "")).strip()
30
30
  if not dataset_id:
31
31
  continue
32
32
 
@@ -61,20 +61,9 @@ def register_openneuro_datasets(
61
61
 
62
62
  {_markdown_table(row_series)}
63
63
 
64
- Parameters
65
- ----------
66
- cache_dir : str
67
- Local cache directory.
68
- query : dict | None
69
- Extra Mongo query merged with ``{{'dataset': '{dataset_id}'}}``.
70
- s3_bucket : str | None
71
- Optional S3 bucket name.
72
- subject : str | None
73
- Optional subject identifier.
74
- task : str | None
75
- Optional task identifier.
76
- **kwargs
77
- Passed through to {base_class.__name__}.
64
+ This class is a thin convenience wrapper for the dataset ``{dataset_id}``.
65
+ Constructor arguments are forwarded to :class:`{base_class.__name__}`; see the
66
+ base class documentation for parameter details and examples.
78
67
  """
79
68
 
80
69
  # init.__doc__ = doc
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eegdash
3
- Version: 0.3.8
3
+ Version: 0.3.9.dev170082126
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
@@ -63,6 +63,7 @@ Requires-Dist: memory_profiler; extra == "docs"
63
63
  Requires-Dist: ipython; extra == "docs"
64
64
  Requires-Dist: lightgbm; extra == "docs"
65
65
  Requires-Dist: plotly; extra == "docs"
66
+ Requires-Dist: nbformat; extra == "docs"
66
67
  Provides-Extra: all
67
68
  Requires-Dist: eegdash[docs]; extra == "all"
68
69
  Requires-Dist: eegdash[dev]; extra == "all"
@@ -1,5 +1,5 @@
1
- eegdash/__init__.py,sha256=i7v1mHVxMkRTcAuf2bt0COJ12jmgUmFF5aZBNvMY154,277
2
- eegdash/api.py,sha256=fzZ69wC8Rn0yP3RGQR08k7tQwNxFz-B8UYvEUJ_9hfg,40585
1
+ eegdash/__init__.py,sha256=3XwLMBTwj7QLjXJZns9vcKBJy6gvnZeqBIV-1TSAswk,290
2
+ eegdash/api.py,sha256=xuNi5mP8zFmTETbRkYajSS7ba320HaDeX7XzcR_t3ZU,40216
3
3
  eegdash/bids_eeg_metadata.py,sha256=LZrGPGVdnGUbZlD4M_aAW4kEItzwTTeZFicH-jyqDyc,9712
4
4
  eegdash/const.py,sha256=qdFBEL9kIrsj9CdxbXhBkR61R3CrTGSaj5Iq0YOACIs,7313
5
5
  eegdash/data_utils.py,sha256=DZ-B03VleA9-mOUzGXcS4N18dVC2uFkFGXMFsKK8nUc,34166
@@ -7,9 +7,9 @@ eegdash/mongodb.py,sha256=GD3WgA253oFgpzOHrYaj4P1mRjNtDMT5Oj4kVvHswjI,2006
7
7
  eegdash/paths.py,sha256=246xkectTxDAYcREs1Qma_F1Y-oSmLlb0hn0F2Za5Ss,866
8
8
  eegdash/utils.py,sha256=7TfQ9D0LrAJ7FgnSXEvWgeHWK2QqaqS-_WcWXD86ObQ,408
9
9
  eegdash/dataset/__init__.py,sha256=Qmzki5G8GaFlzTb10e4SmC3WkKuJyo1Ckii15tCEHAo,157
10
- eegdash/dataset/dataset.py,sha256=5ku9I-JTC8DNult_m1Dgem1OQnSPazp_Xdktq4s_2s4,6829
10
+ eegdash/dataset/dataset.py,sha256=YuyzmqN5M0itimzUD1NF1hcDwkb6fg91dRZtK6HbYOc,6521
11
11
  eegdash/dataset/dataset_summary.csv,sha256=XF0vdHz77DFyVLTaET8lL5gQQ4r-q1xAfSDWH5GTPLA,23655
12
- eegdash/dataset/registry.py,sha256=4L8KHlCrY7LT2SDAjKSiEuwklZVKbP-KZceoMDM3zO4,4332
12
+ eegdash/dataset/registry.py,sha256=genOqAuf9cQBnHhPqRwfLP7S1XsnkLot6sLyJozPtf4,4150
13
13
  eegdash/features/__init__.py,sha256=BXNhjvL4_SSFAY1lcP9nyGpkbJNtoOMH4AHlF6OyABo,4078
14
14
  eegdash/features/datasets.py,sha256=kU1DO70ArSIy-LF1hHD2NN4iT-kJrI0mVpSkyV_OSeI,18301
15
15
  eegdash/features/decorators.py,sha256=v0qaJz_dcX703p1fvFYbAIXmwK3d8naYGlq7fRVKn_w,1313
@@ -28,8 +28,8 @@ eegdash/features/feature_bank/utils.py,sha256=DGh-Q7-XFIittP7iBBxvsJaZrlVvuY5mw-
28
28
  eegdash/hbn/__init__.py,sha256=U8mK64napnKU746C5DOwkX7W7sg3iW5kb_cVv2pfFq0,394
29
29
  eegdash/hbn/preprocessing.py,sha256=7S_TTRKPKEk47tTnh2D6WExBt4cctAMxUxGDjJqq5lU,2221
30
30
  eegdash/hbn/windows.py,sha256=DU_QruLOHQOttZbXCgtO4mjKaG3E5STWjMQ0_s-g0gw,9929
31
- eegdash-0.3.8.dist-info/licenses/LICENSE,sha256=asisR-xupy_NrQBFXnx6yqXeZcYWLvbAaiETl25iXT0,931
32
- eegdash-0.3.8.dist-info/METADATA,sha256=BGXm7_rvJvGlDTbL-Zifh_-CeuIqdFyT4evdSeEkTMY,10294
33
- eegdash-0.3.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
- eegdash-0.3.8.dist-info/top_level.txt,sha256=zavO69HQ6MyZM0aQMR2zUS6TAFc7bnN5GEpDpOpFZzU,8
35
- eegdash-0.3.8.dist-info/RECORD,,
31
+ eegdash-0.3.9.dev170082126.dist-info/licenses/LICENSE,sha256=asisR-xupy_NrQBFXnx6yqXeZcYWLvbAaiETl25iXT0,931
32
+ eegdash-0.3.9.dev170082126.dist-info/METADATA,sha256=JCBkJgWi7XWeiJx1_kfhtlU4af9hxuMSCp7Enczz_UQ,10348
33
+ eegdash-0.3.9.dev170082126.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
+ eegdash-0.3.9.dev170082126.dist-info/top_level.txt,sha256=zavO69HQ6MyZM0aQMR2zUS6TAFc7bnN5GEpDpOpFZzU,8
35
+ eegdash-0.3.9.dev170082126.dist-info/RECORD,,