eegdash 0.0.1__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.

Files changed (77) hide show
  1. eegdash-0.0.1/EEGDash.egg-info/PKG-INFO +72 -0
  2. eegdash-0.0.1/EEGDash.egg-info/SOURCES.txt +79 -0
  3. eegdash-0.0.1/EEGDash.egg-info/dependency_links.txt +1 -0
  4. eegdash-0.0.1/EEGDash.egg-info/top_level.txt +1 -0
  5. eegdash-0.0.1/LICENSE +20 -0
  6. eegdash-0.0.1/PKG-INFO +72 -0
  7. eegdash-0.0.1/README.md +37 -0
  8. eegdash-0.0.1/eegdash/SignalStore/__init__.py +0 -0
  9. eegdash-0.0.1/eegdash/SignalStore/signalstore/__init__.py +3 -0
  10. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/abstract_read_adapter.py +13 -0
  11. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/domain_modeling/schema_read_adapter.py +16 -0
  12. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/domain_modeling/vocabulary_read_adapter.py +19 -0
  13. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/handmade_records/excel_study_organizer_read_adapter.py +114 -0
  14. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/axona/axona_read_adapter.py +912 -0
  15. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/ReadIntanSpikeFile.py +140 -0
  16. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/intan_read_adapter.py +29 -0
  17. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/__init__.py +0 -0
  18. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/data_to_result.py +62 -0
  19. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/get_bytes_per_data_block.py +36 -0
  20. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/notch_filter.py +50 -0
  21. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/qstring.py +41 -0
  22. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/read_header.py +135 -0
  23. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/read_one_data_block.py +45 -0
  24. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/load_intan_rhd_format.py +204 -0
  25. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/__init__.py +0 -0
  26. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/data_to_result.py +60 -0
  27. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/get_bytes_per_data_block.py +37 -0
  28. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/notch_filter.py +50 -0
  29. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/qstring.py +41 -0
  30. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/read_header.py +153 -0
  31. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/read_one_data_block.py +47 -0
  32. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/load_intan_rhs_format.py +213 -0
  33. eegdash-0.0.1/eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/neurodata_without_borders/neurodata_without_borders_read_adapter.py +14 -0
  34. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/__init__.py +4 -0
  35. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/handler_executor.py +22 -0
  36. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/handler_factory.py +41 -0
  37. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/handlers/base_handler.py +44 -0
  38. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/handlers/domain/property_model_handlers.py +79 -0
  39. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/handlers/domain/schema_handlers.py +3 -0
  40. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/helpers/abstract_helper.py +17 -0
  41. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/helpers/neuroscikit_extractor.py +33 -0
  42. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/helpers/neuroscikit_rawio.py +165 -0
  43. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/helpers/spikeinterface_helper.py +100 -0
  44. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/helpers/wrappers/neo_wrappers.py +21 -0
  45. eegdash-0.0.1/eegdash/SignalStore/signalstore/operations/helpers/wrappers/nwb_wrappers.py +27 -0
  46. eegdash-0.0.1/eegdash/SignalStore/signalstore/store/__init__.py +8 -0
  47. eegdash-0.0.1/eegdash/SignalStore/signalstore/store/data_access_objects.py +1181 -0
  48. eegdash-0.0.1/eegdash/SignalStore/signalstore/store/datafile_adapters.py +131 -0
  49. eegdash-0.0.1/eegdash/SignalStore/signalstore/store/repositories.py +928 -0
  50. eegdash-0.0.1/eegdash/SignalStore/signalstore/store/store_errors.py +68 -0
  51. eegdash-0.0.1/eegdash/SignalStore/signalstore/store/unit_of_work.py +97 -0
  52. eegdash-0.0.1/eegdash/SignalStore/signalstore/store/unit_of_work_provider.py +67 -0
  53. eegdash-0.0.1/eegdash/SignalStore/signalstore/utilities/data_adapters/spike_interface_adapters/si_recording.py +1 -0
  54. eegdash-0.0.1/eegdash/SignalStore/signalstore/utilities/data_adapters/spike_interface_adapters/si_sorter.py +1 -0
  55. eegdash-0.0.1/eegdash/SignalStore/signalstore/utilities/testing/data_mocks.py +513 -0
  56. eegdash-0.0.1/eegdash/SignalStore/signalstore/utilities/tools/dataarrays.py +49 -0
  57. eegdash-0.0.1/eegdash/SignalStore/signalstore/utilities/tools/mongo_records.py +25 -0
  58. eegdash-0.0.1/eegdash/SignalStore/signalstore/utilities/tools/operation_response.py +78 -0
  59. eegdash-0.0.1/eegdash/SignalStore/signalstore/utilities/tools/purge_orchestration_response.py +21 -0
  60. eegdash-0.0.1/eegdash/SignalStore/signalstore/utilities/tools/quantities.py +15 -0
  61. eegdash-0.0.1/eegdash/SignalStore/signalstore/utilities/tools/strings.py +38 -0
  62. eegdash-0.0.1/eegdash/SignalStore/signalstore/utilities/tools/time.py +17 -0
  63. eegdash-0.0.1/eegdash/SignalStore/tests/conftest.py +799 -0
  64. eegdash-0.0.1/eegdash/SignalStore/tests/data/valid_data/data_arrays/make_fake_data.py +59 -0
  65. eegdash-0.0.1/eegdash/SignalStore/tests/unit/store/conftest.py +0 -0
  66. eegdash-0.0.1/eegdash/SignalStore/tests/unit/store/test_data_access_objects.py +1235 -0
  67. eegdash-0.0.1/eegdash/SignalStore/tests/unit/store/test_repositories.py +1309 -0
  68. eegdash-0.0.1/eegdash/SignalStore/tests/unit/store/test_unit_of_work.py +7 -0
  69. eegdash-0.0.1/eegdash/SignalStore/tests/unit/test_ci_cd.py +8 -0
  70. eegdash-0.0.1/eegdash/__init__.py +1 -0
  71. eegdash-0.0.1/eegdash/aws_ingest.py +29 -0
  72. eegdash-0.0.1/eegdash/data_utils.py +213 -0
  73. eegdash-0.0.1/eegdash/main.py +17 -0
  74. eegdash-0.0.1/eegdash/signalstore_data_utils.py +280 -0
  75. eegdash-0.0.1/pyproject.toml +24 -0
  76. eegdash-0.0.1/setup.cfg +4 -0
  77. eegdash-0.0.1/tests/__init__.py +3 -0
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.1
2
+ Name: eegdash
3
+ Version: 0.0.1
4
+ Summary: EEG data for machine learning
5
+ Author-email: Young Truong <dt.young112@gmail.com>, Arnaud Delorme <adelorme@gmail.com>
6
+ License: GNU General Public License
7
+
8
+ Copyright (C) 2024-2025
9
+
10
+ Young Truong, UCSD, dt.young112@gmail.com
11
+ Arnaud Delorme, UCSD, adelorme@ucsd.edu
12
+
13
+ This program is free software; you can redistribute it and/or modify
14
+ it under the terms of the GNU General Public License as published by
15
+ the Free Software Foundation; either version 2 of the License, or
16
+ (at your option) any later version.
17
+
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
+
23
+ You should have received a copy of the GNU General Public License
24
+ along with this program; if not, write to the Free Software
25
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1.07 USA
26
+
27
+ Project-URL: Homepage, https://github.com/sccn/EEG-Dash-Data
28
+ Project-URL: Issues, https://github.com/sccn/EEG-Dash-Data/issues
29
+ Classifier: Programming Language :: Python :: 3
30
+ Classifier: License :: OSI Approved :: MIT License
31
+ Classifier: Operating System :: OS Independent
32
+ Requires-Python: >=3.8
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+
36
+ # EEG-Dash
37
+ 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.
38
+
39
+ ## Data source
40
+ The data in EEG-DaSh originates from a collaboration involving 25 laboratories, encompassing 27,053 participants. This extensive collection includes MEEG data, which is a combination of EEG and MEG signals. The data is sourced from various studies conducted by these labs, involving both healthy subjects and clinical populations with conditions such as ADHD, depression, schizophrenia, dementia, autism, and psychosis. Additionally, data spans different mental states like sleep, meditation, and cognitive tasks. In addition, EEG-DaSh will also incorporate data converted from NEMAR, which includes a subset of the 330 MEEG BIDS-formatted datasets available on OpenNeuro, further expanding the archive with well-curated, standardized neuroelectromagnetic data.
41
+
42
+ ## Data formatting
43
+ The data in EEG-DaSh is formatted to facilitate machine learning (ML) and deep learning (DL) applications by using a simplified structure commonly adopted by these communities. This will involve converting raw MEEG data into a matrix format, where samples (e.g., individual EEG or MEG recordings) are represented by rows, and values (such as time or channel data) are represented by columns. The data is also divided into training and testing sets, with 80% of the data allocated for training and 20% for testing, ensuring a balanced representation of relevant labels across sets. Hierarchical Event Descriptor (HED) tags will be used to annotate labels, which will be stored in a text table, and detailed metadata, including dataset origins and methods. This formatting process will ensure that data is ready for ML/DL models, allowing for efficient training and testing of algorithms while preserving data integrity and reusability.
44
+
45
+ ![Screenshot 2024-10-03 at 09 07 28](https://github.com/user-attachments/assets/b30a79bb-0d94-410a-843c-44c3fcea01fc)
46
+
47
+ ## Data access
48
+ The data in EEG-DaSh is formatted to facilitate machine learning (ML) and deep learning (DL) applications by using a simplified structure commonly adopted by these communities. This will involve converting raw MEEG data into a matrix format, where samples (e.g., individual EEG or MEG recordings) are represented by rows, and values (such as time or channel data) are represented by columns. The data is also divided into training and testing sets, with 80% of the data allocated for training and 20% for testing, ensuring a balanced representation of relevant labels across sets. Hierarchical Event Descriptor (HED) tags will be used to annotate labels, which will be stored in a text table, and detailed metadata, including dataset origins and methods. This formatting process will ensure that data is ready for ML/DL models, allowing for efficient training and testing of algorithms while preserving data integrity and reusability.
49
+
50
+ The data in EEG-DaSh is accessed through Python and MATLAB libraries specifically designed for this platform. These libraries will use objects compatible with deep learning data storage formats in each language, such as <i>Torchvision.dataset</i> in Python and <i>DataStore</i> in MATLAB. Users can dynamically fetch data from the EEG-DaSh server which is then cached locally.
51
+
52
+ ### AWS S3
53
+
54
+ Coming soon...
55
+
56
+ ### EEG-Dash API
57
+
58
+ Coming soon...
59
+
60
+ ## Education
61
+
62
+ We organize workshops and educational events to foster cross-cultural education and student training, offering both online and in-person opportunities in collaboration with US and Israeli partners. There is no event planned for 2024. Events for 2025 will be advertised on the EEGLABNEWS mailing list so make sure to [subscribe](https://sccn.ucsd.edu/mailman/listinfo/eeglabnews).
63
+
64
+ ## About EEG-DaSh
65
+
66
+ EEG-DaSh is a collaborative initiative between the United States and Israel, supported by the National Science Foundation (NSF). The partnership brings together experts from the Swartz Center for Computational Neuroscience (SCCN) at the University of California San Diego (UCSD) and Ben-Gurion University (BGU) in Israel.
67
+
68
+ ![Screenshot 2024-10-03 at 09 14 06](https://github.com/user-attachments/assets/327639d3-c3b4-46b1-9335-37803209b0d3)
69
+
70
+
71
+
72
+
@@ -0,0 +1,79 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ EEGDash.egg-info/PKG-INFO
5
+ EEGDash.egg-info/SOURCES.txt
6
+ EEGDash.egg-info/dependency_links.txt
7
+ EEGDash.egg-info/top_level.txt
8
+ eegdash/__init__.py
9
+ eegdash/aws_ingest.py
10
+ eegdash/data_utils.py
11
+ eegdash/main.py
12
+ eegdash/signalstore_data_utils.py
13
+ eegdash.egg-info/PKG-INFO
14
+ eegdash.egg-info/SOURCES.txt
15
+ eegdash.egg-info/dependency_links.txt
16
+ eegdash.egg-info/top_level.txt
17
+ eegdash/SignalStore/__init__.py
18
+ eegdash/SignalStore/signalstore/__init__.py
19
+ eegdash/SignalStore/signalstore/adapters/read_adapters/abstract_read_adapter.py
20
+ eegdash/SignalStore/signalstore/adapters/read_adapters/domain_modeling/schema_read_adapter.py
21
+ eegdash/SignalStore/signalstore/adapters/read_adapters/domain_modeling/vocabulary_read_adapter.py
22
+ eegdash/SignalStore/signalstore/adapters/read_adapters/handmade_records/excel_study_organizer_read_adapter.py
23
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/axona/axona_read_adapter.py
24
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/ReadIntanSpikeFile.py
25
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/intan_read_adapter.py
26
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/load_intan_rhd_format.py
27
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/__init__.py
28
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/data_to_result.py
29
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/get_bytes_per_data_block.py
30
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/notch_filter.py
31
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/qstring.py
32
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/read_header.py
33
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhd_format/intanutil/read_one_data_block.py
34
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/load_intan_rhs_format.py
35
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/__init__.py
36
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/data_to_result.py
37
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/get_bytes_per_data_block.py
38
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/notch_filter.py
39
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/qstring.py
40
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/read_header.py
41
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/intan/load_intan_rhs_format/intanutil/read_one_data_block.py
42
+ eegdash/SignalStore/signalstore/adapters/read_adapters/recording_acquisitions/neurodata_without_borders/neurodata_without_borders_read_adapter.py
43
+ eegdash/SignalStore/signalstore/operations/__init__.py
44
+ eegdash/SignalStore/signalstore/operations/handler_executor.py
45
+ eegdash/SignalStore/signalstore/operations/handler_factory.py
46
+ eegdash/SignalStore/signalstore/operations/handlers/base_handler.py
47
+ eegdash/SignalStore/signalstore/operations/handlers/domain/property_model_handlers.py
48
+ eegdash/SignalStore/signalstore/operations/handlers/domain/schema_handlers.py
49
+ eegdash/SignalStore/signalstore/operations/helpers/abstract_helper.py
50
+ eegdash/SignalStore/signalstore/operations/helpers/neuroscikit_extractor.py
51
+ eegdash/SignalStore/signalstore/operations/helpers/neuroscikit_rawio.py
52
+ eegdash/SignalStore/signalstore/operations/helpers/spikeinterface_helper.py
53
+ eegdash/SignalStore/signalstore/operations/helpers/wrappers/neo_wrappers.py
54
+ eegdash/SignalStore/signalstore/operations/helpers/wrappers/nwb_wrappers.py
55
+ eegdash/SignalStore/signalstore/store/__init__.py
56
+ eegdash/SignalStore/signalstore/store/data_access_objects.py
57
+ eegdash/SignalStore/signalstore/store/datafile_adapters.py
58
+ eegdash/SignalStore/signalstore/store/repositories.py
59
+ eegdash/SignalStore/signalstore/store/store_errors.py
60
+ eegdash/SignalStore/signalstore/store/unit_of_work.py
61
+ eegdash/SignalStore/signalstore/store/unit_of_work_provider.py
62
+ eegdash/SignalStore/signalstore/utilities/data_adapters/spike_interface_adapters/si_recording.py
63
+ eegdash/SignalStore/signalstore/utilities/data_adapters/spike_interface_adapters/si_sorter.py
64
+ eegdash/SignalStore/signalstore/utilities/testing/data_mocks.py
65
+ eegdash/SignalStore/signalstore/utilities/tools/dataarrays.py
66
+ eegdash/SignalStore/signalstore/utilities/tools/mongo_records.py
67
+ eegdash/SignalStore/signalstore/utilities/tools/operation_response.py
68
+ eegdash/SignalStore/signalstore/utilities/tools/purge_orchestration_response.py
69
+ eegdash/SignalStore/signalstore/utilities/tools/quantities.py
70
+ eegdash/SignalStore/signalstore/utilities/tools/strings.py
71
+ eegdash/SignalStore/signalstore/utilities/tools/time.py
72
+ eegdash/SignalStore/tests/conftest.py
73
+ eegdash/SignalStore/tests/data/valid_data/data_arrays/make_fake_data.py
74
+ eegdash/SignalStore/tests/unit/test_ci_cd.py
75
+ eegdash/SignalStore/tests/unit/store/conftest.py
76
+ eegdash/SignalStore/tests/unit/store/test_data_access_objects.py
77
+ eegdash/SignalStore/tests/unit/store/test_repositories.py
78
+ eegdash/SignalStore/tests/unit/store/test_unit_of_work.py
79
+ tests/__init__.py
@@ -0,0 +1 @@
1
+ eegdash
eegdash-0.0.1/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ GNU General Public License
2
+
3
+ Copyright (C) 2024-2025
4
+
5
+ Young Truong, UCSD, dt.young112@gmail.com
6
+ Arnaud Delorme, UCSD, adelorme@ucsd.edu
7
+
8
+ This program is free software; you can redistribute it and/or modify
9
+ it under the terms of the GNU General Public License as published by
10
+ the Free Software Foundation; either version 2 of the License, or
11
+ (at your option) any later version.
12
+
13
+ This program is distributed in the hope that it will be useful,
14
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ GNU General Public License for more details.
17
+
18
+ You should have received a copy of the GNU General Public License
19
+ along with this program; if not, write to the Free Software
20
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1.07 USA
eegdash-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.1
2
+ Name: eegdash
3
+ Version: 0.0.1
4
+ Summary: EEG data for machine learning
5
+ Author-email: Young Truong <dt.young112@gmail.com>, Arnaud Delorme <adelorme@gmail.com>
6
+ License: GNU General Public License
7
+
8
+ Copyright (C) 2024-2025
9
+
10
+ Young Truong, UCSD, dt.young112@gmail.com
11
+ Arnaud Delorme, UCSD, adelorme@ucsd.edu
12
+
13
+ This program is free software; you can redistribute it and/or modify
14
+ it under the terms of the GNU General Public License as published by
15
+ the Free Software Foundation; either version 2 of the License, or
16
+ (at your option) any later version.
17
+
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
+
23
+ You should have received a copy of the GNU General Public License
24
+ along with this program; if not, write to the Free Software
25
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1.07 USA
26
+
27
+ Project-URL: Homepage, https://github.com/sccn/EEG-Dash-Data
28
+ Project-URL: Issues, https://github.com/sccn/EEG-Dash-Data/issues
29
+ Classifier: Programming Language :: Python :: 3
30
+ Classifier: License :: OSI Approved :: MIT License
31
+ Classifier: Operating System :: OS Independent
32
+ Requires-Python: >=3.8
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+
36
+ # EEG-Dash
37
+ 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.
38
+
39
+ ## Data source
40
+ The data in EEG-DaSh originates from a collaboration involving 25 laboratories, encompassing 27,053 participants. This extensive collection includes MEEG data, which is a combination of EEG and MEG signals. The data is sourced from various studies conducted by these labs, involving both healthy subjects and clinical populations with conditions such as ADHD, depression, schizophrenia, dementia, autism, and psychosis. Additionally, data spans different mental states like sleep, meditation, and cognitive tasks. In addition, EEG-DaSh will also incorporate data converted from NEMAR, which includes a subset of the 330 MEEG BIDS-formatted datasets available on OpenNeuro, further expanding the archive with well-curated, standardized neuroelectromagnetic data.
41
+
42
+ ## Data formatting
43
+ The data in EEG-DaSh is formatted to facilitate machine learning (ML) and deep learning (DL) applications by using a simplified structure commonly adopted by these communities. This will involve converting raw MEEG data into a matrix format, where samples (e.g., individual EEG or MEG recordings) are represented by rows, and values (such as time or channel data) are represented by columns. The data is also divided into training and testing sets, with 80% of the data allocated for training and 20% for testing, ensuring a balanced representation of relevant labels across sets. Hierarchical Event Descriptor (HED) tags will be used to annotate labels, which will be stored in a text table, and detailed metadata, including dataset origins and methods. This formatting process will ensure that data is ready for ML/DL models, allowing for efficient training and testing of algorithms while preserving data integrity and reusability.
44
+
45
+ ![Screenshot 2024-10-03 at 09 07 28](https://github.com/user-attachments/assets/b30a79bb-0d94-410a-843c-44c3fcea01fc)
46
+
47
+ ## Data access
48
+ The data in EEG-DaSh is formatted to facilitate machine learning (ML) and deep learning (DL) applications by using a simplified structure commonly adopted by these communities. This will involve converting raw MEEG data into a matrix format, where samples (e.g., individual EEG or MEG recordings) are represented by rows, and values (such as time or channel data) are represented by columns. The data is also divided into training and testing sets, with 80% of the data allocated for training and 20% for testing, ensuring a balanced representation of relevant labels across sets. Hierarchical Event Descriptor (HED) tags will be used to annotate labels, which will be stored in a text table, and detailed metadata, including dataset origins and methods. This formatting process will ensure that data is ready for ML/DL models, allowing for efficient training and testing of algorithms while preserving data integrity and reusability.
49
+
50
+ The data in EEG-DaSh is accessed through Python and MATLAB libraries specifically designed for this platform. These libraries will use objects compatible with deep learning data storage formats in each language, such as <i>Torchvision.dataset</i> in Python and <i>DataStore</i> in MATLAB. Users can dynamically fetch data from the EEG-DaSh server which is then cached locally.
51
+
52
+ ### AWS S3
53
+
54
+ Coming soon...
55
+
56
+ ### EEG-Dash API
57
+
58
+ Coming soon...
59
+
60
+ ## Education
61
+
62
+ We organize workshops and educational events to foster cross-cultural education and student training, offering both online and in-person opportunities in collaboration with US and Israeli partners. There is no event planned for 2024. Events for 2025 will be advertised on the EEGLABNEWS mailing list so make sure to [subscribe](https://sccn.ucsd.edu/mailman/listinfo/eeglabnews).
63
+
64
+ ## About EEG-DaSh
65
+
66
+ EEG-DaSh is a collaborative initiative between the United States and Israel, supported by the National Science Foundation (NSF). The partnership brings together experts from the Swartz Center for Computational Neuroscience (SCCN) at the University of California San Diego (UCSD) and Ben-Gurion University (BGU) in Israel.
67
+
68
+ ![Screenshot 2024-10-03 at 09 14 06](https://github.com/user-attachments/assets/327639d3-c3b4-46b1-9335-37803209b0d3)
69
+
70
+
71
+
72
+
@@ -0,0 +1,37 @@
1
+ # EEG-Dash
2
+ 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.
3
+
4
+ ## Data source
5
+ The data in EEG-DaSh originates from a collaboration involving 25 laboratories, encompassing 27,053 participants. This extensive collection includes MEEG data, which is a combination of EEG and MEG signals. The data is sourced from various studies conducted by these labs, involving both healthy subjects and clinical populations with conditions such as ADHD, depression, schizophrenia, dementia, autism, and psychosis. Additionally, data spans different mental states like sleep, meditation, and cognitive tasks. In addition, EEG-DaSh will also incorporate data converted from NEMAR, which includes a subset of the 330 MEEG BIDS-formatted datasets available on OpenNeuro, further expanding the archive with well-curated, standardized neuroelectromagnetic data.
6
+
7
+ ## Data formatting
8
+ The data in EEG-DaSh is formatted to facilitate machine learning (ML) and deep learning (DL) applications by using a simplified structure commonly adopted by these communities. This will involve converting raw MEEG data into a matrix format, where samples (e.g., individual EEG or MEG recordings) are represented by rows, and values (such as time or channel data) are represented by columns. The data is also divided into training and testing sets, with 80% of the data allocated for training and 20% for testing, ensuring a balanced representation of relevant labels across sets. Hierarchical Event Descriptor (HED) tags will be used to annotate labels, which will be stored in a text table, and detailed metadata, including dataset origins and methods. This formatting process will ensure that data is ready for ML/DL models, allowing for efficient training and testing of algorithms while preserving data integrity and reusability.
9
+
10
+ ![Screenshot 2024-10-03 at 09 07 28](https://github.com/user-attachments/assets/b30a79bb-0d94-410a-843c-44c3fcea01fc)
11
+
12
+ ## Data access
13
+ The data in EEG-DaSh is formatted to facilitate machine learning (ML) and deep learning (DL) applications by using a simplified structure commonly adopted by these communities. This will involve converting raw MEEG data into a matrix format, where samples (e.g., individual EEG or MEG recordings) are represented by rows, and values (such as time or channel data) are represented by columns. The data is also divided into training and testing sets, with 80% of the data allocated for training and 20% for testing, ensuring a balanced representation of relevant labels across sets. Hierarchical Event Descriptor (HED) tags will be used to annotate labels, which will be stored in a text table, and detailed metadata, including dataset origins and methods. This formatting process will ensure that data is ready for ML/DL models, allowing for efficient training and testing of algorithms while preserving data integrity and reusability.
14
+
15
+ The data in EEG-DaSh is accessed through Python and MATLAB libraries specifically designed for this platform. These libraries will use objects compatible with deep learning data storage formats in each language, such as <i>Torchvision.dataset</i> in Python and <i>DataStore</i> in MATLAB. Users can dynamically fetch data from the EEG-DaSh server which is then cached locally.
16
+
17
+ ### AWS S3
18
+
19
+ Coming soon...
20
+
21
+ ### EEG-Dash API
22
+
23
+ Coming soon...
24
+
25
+ ## Education
26
+
27
+ We organize workshops and educational events to foster cross-cultural education and student training, offering both online and in-person opportunities in collaboration with US and Israeli partners. There is no event planned for 2024. Events for 2025 will be advertised on the EEGLABNEWS mailing list so make sure to [subscribe](https://sccn.ucsd.edu/mailman/listinfo/eeglabnews).
28
+
29
+ ## About EEG-DaSh
30
+
31
+ EEG-DaSh is a collaborative initiative between the United States and Israel, supported by the National Science Foundation (NSF). The partnership brings together experts from the Swartz Center for Computational Neuroscience (SCCN) at the University of California San Diego (UCSD) and Ben-Gurion University (BGU) in Israel.
32
+
33
+ ![Screenshot 2024-10-03 at 09 14 06](https://github.com/user-attachments/assets/327639d3-c3b4-46b1-9335-37803209b0d3)
34
+
35
+
36
+
37
+
File without changes
@@ -0,0 +1,3 @@
1
+ from eegdash.SignalStore.signalstore.store.unit_of_work_provider import UnitOfWorkProvider
2
+
3
+ __all__ = ['UnitOfWorkProvider']
@@ -0,0 +1,13 @@
1
+ from abc import ABC, abstractmethod
2
+
3
+ class AbstractReadAdapter(ABC):
4
+
5
+ def __iter__(self):
6
+ return self.read().__iter__()
7
+
8
+ def __next__(self):
9
+ return self.read().__next__()
10
+
11
+ @abstractmethod
12
+ def read(self):
13
+ raise NotImplementedError('AbstractReadAdapter.read() not implemented.')
@@ -0,0 +1,16 @@
1
+ from signalstore.adapters.read_adapters.abstract_read_adapter import AbstractReadAdapter
2
+ import json
3
+ from upath import UPath
4
+
5
+ class SchemaReadAdapter(AbstractReadAdapter):
6
+ def __init__(self, directory):
7
+ self.dir = UPath(directory)
8
+
9
+ def read(self):
10
+ """Reads JSON files that conform to the Neuroscikit data model schemata.
11
+ """
12
+ for json_filepath in self.dir.glob('*.json'):
13
+ with open(json_filepath) as f:
14
+ yield dict(json.load(f))
15
+
16
+
@@ -0,0 +1,19 @@
1
+ from signalstore.adapters.read_adapters.abstract_read_adapter import AbstractReadAdapter
2
+
3
+ import yaml
4
+
5
+ class VocabularyReadAdapter(AbstractReadAdapter):
6
+ def __init__(self, filepath):
7
+ self.filepath = filepath
8
+
9
+ def read(self):
10
+ """Reads a YAML file and converts each data object into an xarray.DataArray with
11
+ the appropriate dimensions, coordinates and metadata attributes for the
12
+ Neuroscikit data model.
13
+ """
14
+ with open(self.filepath) as f:
15
+ yaml_dict = yaml.load(f, Loader=yaml.FullLoader)
16
+ for key, value in yaml_dict.items():
17
+ record = {"name": key}
18
+ record.update(value)
19
+ yield record
@@ -0,0 +1,114 @@
1
+ from signalstore.operations.importers.adapters.abstract_read_adapter import AbstractReadAdapter
2
+
3
+ import openpyxl as xl
4
+
5
+ class ExcelStudyOrganizerReadAdapter(AbstractReadAdapter):
6
+ def __init__(self, path):
7
+ self.path = path
8
+ self.wb = xl.load_workbook(path)
9
+ self.ws = self.wb.active
10
+ self.tables = [str(table) for table in self.wb.sheetnames]
11
+
12
+ def read(self):
13
+ for table in self.tables:
14
+ for record in self._get_table_records(table):
15
+ yield record
16
+
17
+ def read_records(self):
18
+ records = []
19
+ for table in self.tables:
20
+ records.extend(list(self._get_table_records(table)))
21
+ return records
22
+
23
+ def read_records_by_table(self):
24
+ records = {}
25
+ for table in self.tables:
26
+ records[str(table).lower()] = list(self._get_table_records(table))
27
+ return records
28
+
29
+ def _classify_table(self, table):
30
+ # check if name column is unique
31
+ has_unique_keys = self._has_unique_keys(table)
32
+
33
+ # check if the table columns include only the name column,
34
+ # an attribute column and a value column
35
+ is_attr_value_format = self._is_attr_value_format(table)
36
+
37
+ if not has_unique_keys and is_attr_value_format:
38
+ return 'attribute'
39
+ elif has_unique_keys and not is_attr_value_format:
40
+ return 'record'
41
+ else:
42
+ error_string = f'Could not classify table {table}.'
43
+ if not has_unique_keys:
44
+ error_string += '\nTable does not have unique keys.'
45
+ if not is_attr_value_format:
46
+ error_string += '\nTable is not in attribute-value format.'
47
+ raise StudyOrganizerKeyError(error_string)
48
+
49
+ def _has_unique_keys(self, table):
50
+ ws = self.wb[table]
51
+ keys = [str(cell.value).lower() for cell in ws['A'] if cell.value is not None]
52
+ return len(keys) == len(set(keys))
53
+
54
+ def _is_attr_value_format(self, table):
55
+ ws = self.wb[table]
56
+ columns = [str(cell.value).lower() for cell in ws[1]]
57
+ if columns[0] == f'name' and columns[1] == 'attribute' and columns[2] == 'value' and len(columns) == 3:
58
+ return True
59
+ else:
60
+ return False
61
+
62
+ def _get_table_records(self, table):
63
+ table_type = self._classify_table(table)
64
+ readers = {'record': self._get_simple_table_records,
65
+ 'attribute': self._get_attribute_table_records}
66
+ records = readers[table_type](table)
67
+ for record in records:
68
+ yield record
69
+
70
+ def _get_simple_table_records(self, table):
71
+ self.ws = self.wb[table]
72
+ columns = [str(cell.value).lower() for cell in self.ws[1]]
73
+ self._validate_columns(columns, table)
74
+ for row in self.ws.iter_rows(min_row=2):
75
+ record = {}
76
+ for i, column in enumerate(columns):
77
+ value = row[i].value
78
+ if value is not None:
79
+ record[column] = value
80
+ if record != {}:
81
+ record['type'] = table
82
+ yield record
83
+
84
+ def _get_attribute_table_records(self, table):
85
+ self.ws = self.wb[table]
86
+ columns = [str(cell.value).lower() for cell in self.ws[1]]
87
+ self._validate_columns(columns, table)
88
+ attr_records = []
89
+ for row in self.ws.iter_rows(min_row=2):
90
+ record = {}
91
+ for i, column in enumerate(columns):
92
+ record[column] = row[i].value
93
+ attr_records.append(record)
94
+ records = {}
95
+ for attr_record in attr_records:
96
+ rkey = attr_record['name']
97
+ if rkey not in records.keys() and rkey is not None:
98
+ records[rkey] = {'name': rkey, 'type': table}
99
+ if attr_record['value'] is not None:
100
+ records[rkey][attr_record['attribute']] = attr_record['value']
101
+ for record in records.values():
102
+ if record != {}:
103
+ yield record
104
+
105
+ def _validate_columns(self, columns, table_name):
106
+ if not self._first_column_is_key(columns, table_name):
107
+ raise StudyOrganizerKeyError(f'First column must be a "name" column, but is {columns[0]}.')
108
+
109
+ def _first_column_is_key(self, columns, table_name):
110
+ return str(columns[0]) == f'name'
111
+
112
+
113
+ class StudyOrganizerKeyError(KeyError):
114
+ pass