eegdash 0.3.3.dev61__py3-none-any.whl → 0.5.0.dev180784713__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.
Files changed (45) hide show
  1. eegdash/__init__.py +19 -6
  2. eegdash/api.py +336 -539
  3. eegdash/bids_eeg_metadata.py +495 -0
  4. eegdash/const.py +349 -0
  5. eegdash/dataset/__init__.py +28 -0
  6. eegdash/dataset/base.py +311 -0
  7. eegdash/dataset/bids_dataset.py +641 -0
  8. eegdash/dataset/dataset.py +692 -0
  9. eegdash/dataset/dataset_summary.csv +255 -0
  10. eegdash/dataset/registry.py +287 -0
  11. eegdash/downloader.py +197 -0
  12. eegdash/features/__init__.py +15 -13
  13. eegdash/features/datasets.py +329 -138
  14. eegdash/features/decorators.py +105 -13
  15. eegdash/features/extractors.py +233 -63
  16. eegdash/features/feature_bank/__init__.py +12 -12
  17. eegdash/features/feature_bank/complexity.py +22 -20
  18. eegdash/features/feature_bank/connectivity.py +27 -28
  19. eegdash/features/feature_bank/csp.py +3 -1
  20. eegdash/features/feature_bank/dimensionality.py +6 -6
  21. eegdash/features/feature_bank/signal.py +29 -30
  22. eegdash/features/feature_bank/spectral.py +40 -44
  23. eegdash/features/feature_bank/utils.py +8 -0
  24. eegdash/features/inspect.py +126 -15
  25. eegdash/features/serialization.py +58 -17
  26. eegdash/features/utils.py +90 -16
  27. eegdash/hbn/__init__.py +28 -0
  28. eegdash/hbn/preprocessing.py +105 -0
  29. eegdash/hbn/windows.py +428 -0
  30. eegdash/logging.py +54 -0
  31. eegdash/mongodb.py +55 -24
  32. eegdash/paths.py +52 -0
  33. eegdash/utils.py +29 -1
  34. eegdash-0.5.0.dev180784713.dist-info/METADATA +121 -0
  35. eegdash-0.5.0.dev180784713.dist-info/RECORD +38 -0
  36. eegdash-0.5.0.dev180784713.dist-info/licenses/LICENSE +29 -0
  37. eegdash/data_config.py +0 -34
  38. eegdash/data_utils.py +0 -687
  39. eegdash/dataset.py +0 -69
  40. eegdash/preprocessing.py +0 -63
  41. eegdash-0.3.3.dev61.dist-info/METADATA +0 -192
  42. eegdash-0.3.3.dev61.dist-info/RECORD +0 -28
  43. eegdash-0.3.3.dev61.dist-info/licenses/LICENSE +0 -23
  44. {eegdash-0.3.3.dev61.dist-info → eegdash-0.5.0.dev180784713.dist-info}/WHEEL +0 -0
  45. {eegdash-0.3.3.dev61.dist-info → eegdash-0.5.0.dev180784713.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,255 @@
1
+ ,dataset,n_records,n_subjects,n_tasks,nchans_set,sampling_freqs,duration_hours_total,size,size_bytes,s3_item_count,DatasetID,Type Subject,10-20 system,modality of exp,type of exp,record_modality
2
+ 0,ds002718,18,18,1,74,250,14.844,4.31 GB,4624315408,0,ds002718,Healthy,other,Visual,Perception,"EEG, MRI"
3
+ 1,ds005505,1342,136,10,129,500,125.366,103.11 GB,110708824369,0,,,,,,EEG
4
+ 2,ds004745,6,6,1,,1000,0.0,242.08 MB,253839725,0,,,,,,EEG
5
+ 3,ds005514,2885,295,10,129,500,213.008,185.03 GB,198677728665,0,,,,,,EEG
6
+ 4,ds005512,2320,257,10,129,500,196.205,157.19 GB,168778507427,0,,,,,,EEG
7
+ 5,ds005510,1227,135,10,129,500,112.464,90.80 GB,97492961757,0,,,,,,EEG
8
+ 6,ds005511,3100,381,10,"6,129",500,285.629,244.83 GB,262883881898,0,,,,,,EEG
9
+ 7,ds005509,3326,330,10,129,500,274.559,224.17 GB,240701124393,0,,,,,,EEG
10
+ 8,ds005508,3342,324,10,129,500,269.281,229.81 GB,246753736933,0,,,,,,EEG
11
+ 9,ds005507,1812,184,10,129,500,168.649,139.37 GB,149646718160,0,,,,,,EEG
12
+ 10,ds005506,1405,150,10,129,500,127.896,111.88 GB,120126449650,0,,,,,,EEG
13
+ 12,ds004854,1,1,1,64,128,0.535,79.21 MB,83057080,0,,,,,,EEG
14
+ 13,ds004853,1,1,1,64,128,0.535,79.21 MB,83057080,0,,,,,,EEG
15
+ 14,ds004844,68,17,1,64,1024,21.252,22.33 GB,23976121966,0,ds004844,,,Multisensory,Decision-making,EEG
16
+ 15,ds004843,92,14,1,64,256,29.834,7.66 GB,8229205795,0,ds004843,,,Visual,Attention,EEG
17
+ 16,ds004842,102,14,1,64,256,20.102,5.21 GB,5589054270,0,ds004842,,,Multisensory,Attention,EEG
18
+ 17,ds004852,1,1,1,64,128,0.535,79.21 MB,83057106,0,,,,,,EEG
19
+ 18,ds004851,1,1,1,64,128,0.535,56.59 GB,60765064414,0,,,,,,EEG
20
+ 19,ds004850,1,1,1,64,128,0.535,79.21 MB,83057078,0,,,,,,EEG
21
+ 20,ds004855,1,1,1,64,128,0.535,79.21 MB,83057076,0,,,,,,EEG
22
+ 21,ds004849,1,1,1,64,128,0.535,79.21 MB,83057084,0,,,,,,EEG
23
+ 22,ds004841,147,20,1,64,256,29.054,7.31 GB,7846934401,0,ds004841,,10-20,Multisensory,Attention,EEG
24
+ 23,ds004661,17,17,1,64,128,10.137,1.40 GB,1505577392,0,ds004661,,10-20,Multisensory,Memory,EEG
25
+ 24,ds004660,42,21,1,32,"2048,512",23.962,7.25 GB,7782408710,0,ds004660,Healthy,10-20,Multisensory,Attention,EEG
26
+ 25,ds004657,119,24,1,64,"1024,8192",27.205,43.06 GB,46237302701,0,ds004657,,10-20,Motor,Decision-making,EEG
27
+ 26,ds004362,1526,109,1,64,"128,160",48.592,11.14 GB,11961862159,0,ds004362,Healthy,10-20,Visual,Motor,EEG
28
+ 27,ds004010,24,24,1,64,1000,26.457,23.14 GB,24844863976,0,ds004010,Healthy,other,Multisensory,Attention,EEG
29
+ 28,ds002181,226,226,1,125,500,7.676,150.89 MB,158222084,0,,,,,,"CHANNELS, EEG, EVENTS"
30
+ 29,ds004554,16,16,1,99,1000,0.024,8.79 GB,9432865762,0,ds004554,Healthy,10-20,Visual,Decision-making,EEG
31
+ 30,ds005697,50,50,1,"65,69",1000,77.689,66.58 GB,71486411402,0,,,,,,EEG
32
+ 31,ds004350,240,24,5,64,256,41.265,26.83 GB,28810754598,0,ds004350,Healthy,other,Visual,Memory,EEG
33
+ 32,ds004785,17,17,1,32,500,0.019,351.17 MB,368224136,0,ds004785,Healthy,,Motor,Motor,EEG
34
+ 33,ds004504,88,88,1,19,500,19.608,5.38 GB,5780997160,0,ds004504,Dementia,10-20,Resting State,Clinical/Intervention,EEG
35
+ 34,ds004635,55,55,1,129,1000,20.068,30.56 GB,32817659781,0,ds004635,Healthy,other,Multisensory,Attention,EEG
36
+ 35,ds005787,448,19,1,"64,66","1000,500",23.733,27.09 GB,29087512003,0,,,,,,EEG
37
+ 36,ds005079,60,1,15,65,500,3.25,1.68 GB,1809231997,0,ds005079,Healthy,,Multisensory,Affect,EEG
38
+ 37,ds005342,32,32,1,17,250,33.017,2.03 GB,2181610593,0,ds005342,Healthy,,Visual,Motor,EEG
39
+ 38,ds005034,100,25,2,129,1000,37.525,61.36 GB,65885315479,0,ds005034,Healthy,,Visual,Memory,EEG
40
+ 39,ds002680,350,14,1,31,1000,21.244,9.22 GB,9902152149,0,ds002680,Healthy,10-20,Visual,Motor,EEG
41
+ 40,ds003805,1,1,1,19,500,0.033,16.96 MB,17781347,0,ds003805,Healthy,10-20,Multisensory,Learning,EEG
42
+ 41,ds003838,130,65,2,63,1000,136.757,253.29 GB,271965704312,0,ds003838,Healthy,10-20,Auditory,Memory,EEG
43
+ 42,ds002691,20,20,1,32,250,6.721,776.76 MB,814491068,0,ds002691,Healthy,other,Visual,Attention,EEG
44
+ 43,ds003690,375,75,3,"64,66",500,46.771,21.46 GB,23043491552,0,ds003690,Healthy,10-20,Auditory,Decision-making,EEG
45
+ 44,ds004040,4,2,1,64,512,4.229,11.59 GB,12440304224,0,ds004040,Healthy,10-20,Auditory,Other,EEG
46
+ 45,ds003061,39,13,1,79,256,8.196,2.26 GB,2421951821,0,ds003061,,10-20,Auditory,Perception,EEG
47
+ 46,ds005672,3,3,1,"65,69",1000,4.585,4.23 GB,4545641306,0,,,,,,EEG
48
+ 47,ds005410,81,81,1,63,1000,22.976,19.76 GB,21213481224,0,,,,,,EEG
49
+ 48,ds003753,25,25,1,64,500,10.104,4.62 GB,4965253148,0,ds003753,Healthy,10-20,Visual,Learning,EEG
50
+ 49,ds005565,24,24,1,,500,11.436,2.62 GB,2816607296,0,,,,,,EEG
51
+ 50,ds002893,52,49,1,33,"250,250.0293378038558",36.114,7.70 GB,8263047991,0,ds002893,Healthy,10-20,Multisensory,Attention,EEG
52
+ 51,ds002578,2,2,1,256,256,1.455,1.33 GB,1429254677,0,ds002578,Healthy,10-20,Visual,Attention,"EEG, MRI"
53
+ 52,ds005089,36,36,1,63,1000,68.82,68.01 GB,73021312961,0,ds005089,Healthy,,Visual,Attention,EEG
54
+ 53,ds003822,25,25,1,64,500,12.877,5.82 GB,6248744522,0,ds003822,Healthy,10-20,Visual,Affect,EEG
55
+ 54,ds003670,62,25,1,32,2000,72.772,97.53 GB,104721234854,0,ds003670,,10-20,Visual,Attention,EEG
56
+ 55,ds005048,35,35,1,,250,5.203,355.91 MB,373200880,0,ds005048,Dementia,,Auditory,Attention,EEG
57
+ 56,ds004574,146,146,1,"63,64,66",500,31.043,13.48 GB,14470034208,0,ds004574,Parkinson's,10-20,Multisensory,Clinical/Intervention,EEG
58
+ 57,ds004519,40,40,1,62,250,0.067,12.56 GB,13486848019,0,ds004519,,10-20,Visual,Attention,EEG
59
+ 58,ds004602,546,182,3,128,"250,500",87.11,73.91 GB,79364456958,0,ds004602,Healthy,other,Visual,Perception,EEG
60
+ 59,ds004784,6,1,6,128,512,0.518,10.82 GB,11621460277,0,ds004784,Healthy,,Motor,Attention,EEG
61
+ 60,ds004771,61,61,1,34,256,0.022,1.36 GB,1462195517,0,ds004771,Healthy,10-20,Visual,Decision-making,EEG
62
+ 61,ds003518,137,110,1,64,500,89.888,39.51 GB,42423490194,0,ds003518,Healthy,10-20,Visual,Clinical/Intervention,EEG
63
+ 62,ds005207,39,20,1,"6,10,12,14,15,16,17,18","128,250",422.881,69.12 GB,74214619739,0,ds005207,Healthy,,Sleep,Sleep,EEG
64
+ 63,ds005866,60,60,1,,500,15.976,3.57 GB,3837211623,0,,,,,,EEG
65
+ 64,ds003523,221,91,1,64,500,84.586,37.54 GB,40304852370,0,ds003523,TBI,10-20,Visual,Memory,EEG
66
+ 65,ds004347,48,24,1,64,"128,512",6.389,2.69 GB,2890549319,0,ds004347,Healthy,10-20,Visual,Perception,EEG
67
+ 66,ds004588,42,42,1,24,300,4.957,601.76 MB,630994652,0,ds004588,Healthy,10-20,Visual,Decision-making,EEG
68
+ 67,ds005811,448,19,1,62,"1000,500",23.733,24.12 GB,25902600444,0,,,,,,EEG
69
+ 68,ds003987,69,23,1,64,500.0930232558139,52.076,26.41 GB,28362707915,0,ds003987,Healthy,10-20,Visual,Attention,EEG
70
+ 69,ds004317,50,50,1,60,500,37.767,18.29 GB,19639199743,0,ds004317,Healthy,10-20,Multisensory,Affect,EEG
71
+ 70,ds004033,36,18,2,64,500,42.645,19.81 GB,21270391452,0,ds004033,,10-20,Motor,Motor,EEG
72
+ 71,ds004315,50,50,1,60,500,21.104,9.81 GB,10532856899,0,ds004315,Healthy,10-20,Multisensory,Affect,EEG
73
+ 72,ds003474,122,122,1,64,500,36.61,16.64 GB,17867805967,0,ds003474,Healthy,10-20,Visual,Decision-making,EEG
74
+ 73,ds003509,84,56,1,64,500,48.535,22.34 GB,23988721823,0,ds003509,Parkinson's,10-20,Visual,Learning,EEG
75
+ 74,ds005868,48,48,1,,500,13.094,2.93 GB,3146417813,0,,,,,,EEG
76
+ 75,ds003516,25,25,1,47,500,22.57,13.46 GB,14451393616,0,ds003516,Healthy,other,Auditory,Attention,EEG
77
+ 76,ds004942,62,62,1,65,1000,28.282,25.05 GB,26899933549,0,ds004942,Healthy,,Visual,Memory,EEG
78
+ 77,ds004348,18,9,2,34,200,35.056,12.30 GB,13210476025,0,ds004348,Healthy,other,Sleep,Sleep,EEG
79
+ 78,ds004625,543,32,9,120,500,28.397,62.46 GB,67069111978,0,ds004625,,,Motor,Attention,EEG
80
+ 79,ds003517,34,17,1,64,500,13.273,6.48 GB,6952992399,0,ds003517,Healthy,10-20,Visual,Learning,EEG
81
+ 80,ds004368,40,39,1,63,128,0.033,997.14 MB,1045574811,0,ds004368,Schizophrenia/Psychosis,10-20,Visual,Perception,EEG
82
+ 81,ds004584,149,149,1,"63,64,66",500,6.641,2.87 GB,3078216874,0,ds004584,Parkinson's,10-20,Resting State,Clinical/Intervention,EEG
83
+ 82,ds003506,84,56,1,64,500,35.381,16.21 GB,17400039992,0,ds003506,Parkinson's,10-20,Visual,Decision-making,EEG
84
+ 83,ds003570,40,40,1,64,2048,26.208,36.12 GB,38783075272,0,ds003570,Healthy,10-20,Auditory,Decision-making,EEG
85
+ 84,ds003490,75,50,1,64,500,12.76,5.85 GB,6276775630,0,ds003490,Parkinson's,10-20,Auditory,Attention,EEG
86
+ 85,ds004117,85,23,1,69,"1000,250,500,500.059",15.941,5.80 GB,6230776574,0,ds004117,Healthy,10-20,Visual,Memory,EEG
87
+ 86,ds004505,25,25,1,120,250,30.398,522.56 GB,561092363916,0,ds004505,Healthy,10-20,Motor,Motor,"EEG, MRI"
88
+ 87,ds004580,147,147,1,"63,64,66",500,36.514,15.84 GB,17008438640,0,ds004580,Parkinson's,10-20,Visual,Decision-making,EEG
89
+ 88,ds004532,137,110,1,64,500,49.651,22.09 GB,23719572304,0,ds004532,Healthy,10-20,Visual,Learning,EEG
90
+ 89,ds004902,218,71,2,61,"500,5000",18.118,8.29 GB,8898600609,0,ds004902,Healthy,,Resting State,Resting state,"EEG, BEH"
91
+ 90,ds004295,26,26,1,66,"1024,512",34.313,31.51 GB,33831372141,0,ds004295,Healthy,10-20,Multisensory,Learning,EEG
92
+ 91,ds003519,54,27,1,64,500,20.504,8.96 GB,9623156762,0,ds003519,Healthy,10-20,Visual,Clinical/Intervention,EEG
93
+ 92,ds003458,23,23,1,64,500,10.447,4.72 GB,5065250805,0,ds003458,Healthy,10-20,Visual,Affect,EEG
94
+ 93,ds003004,34,34,1,"134,180,189,196,201,206,207,208,209,211,212,213,214,215,218,219,220,221,222,223,224,226,227,229,231,232,235",256,49.072,35.63 GB,38255333087,0,ds003004,Healthy,10-20,Auditory,Affect,EEG
95
+ 94,ds004200,20,20,1,37,1000,14.123,7.21 GB,7740555648,0,ds004200,Healthy,10-20,Multisensory,Attention,EEG
96
+ 95,ds004015,36,36,1,18,500,47.29,6.03 GB,6475870225,0,ds004015,Healthy,other,Auditory,Attention,EEG
97
+ 96,ds004595,53,53,1,64,500,17.078,7.89 GB,8470863296,0,ds004595,Other,10-20,Visual,Decision-making,EEG
98
+ 97,ds004626,52,52,1,68,1000,21.359,19.87 GB,21336341431,0,ds004626,Other,10-20,Visual,Attention,EEG
99
+ 98,ds004475,30,30,1,"113,115,118,119,120,122,123,124,125,126,127,128",512,26.899,112.74 GB,121053900746,0,ds004475,Healthy,other,Motor,Motor,"EEG, MRI"
100
+ 99,ds004515,54,54,1,64,500,20.61,9.48 GB,10177384081,0,ds004515,Other,10-20,Visual,Affect,EEG
101
+ 100,ds004883,516,172,3,128,500,137.855,122.80 GB,131858855599,0,ds004883,Healthy,,Visual,Decision-making,EEG
102
+ 101,ds003739,120,30,4,128,256,20.574,10.94 GB,11742611182,0,ds003739,Healthy,10-20,Motor,Perception,EEG
103
+ 102,ds004389,260,26,4,42,10000,30.932,376.50 GB,404264486093,0,,,,,,EEG
104
+ 103,ds004367,40,40,1,68,1200,24.81,27.98 GB,30039343808,0,ds004367,Schizophrenia/Psychosis,10-20,Visual,Perception,EEG
105
+ 104,ds004369,41,41,1,4,500,37.333,8.01 GB,8596739356,0,ds004369,Healthy,other,Auditory,Perception,EEG
106
+ 105,ds004579,139,139,1,"63,64,66",500,55.703,24.12 GB,25896737812,0,ds004579,Parkinson's,10-20,Visual,Decision-making,EEG
107
+ 106,ds005416,23,23,1,64,1000,24.68,21.30 GB,22869325264,0,,,,,,EEG
108
+ 107,ds001785,54,18,3,63,"1000,1024",14.644,27.86 GB,29915397068,0,ds001785,Healthy,10-20,Tactile,Perception,EEG
109
+ 108,ds001971,273,20,1,108,512,46.183,31.98 GB,34339201543,0,ds001971,Healthy,10-20,Auditory,Motor,EEG
110
+ 109,ds004388,399,40,3,67,10000,43.327,682.54 GB,732876226489,0,,,,,,EEG
111
+ 110,ds003478,243,122,1,64,500,23.57,10.65 GB,11430531312,0,ds003478,Healthy,10-20,Resting State,Resting state,EEG
112
+ 111,ds004306,15,12,1,124,1024,18.183,79.11 GB,84945921180,0,ds004306,Healthy,other,Multisensory,Perception,EEG
113
+ 112,ds005305,165,165,1,64,"2048,512",14.136,6.41 GB,6887595053,0,ds005305,Healthy,,Visual,Decision-making,EEG
114
+ 113,ds005114,223,91,1,64,500,125.701,56.47 GB,60630838923,0,ds005114,TBI,,Visual,Attention,EEG
115
+ 114,ds003039,16,16,1,64,500,14.82,7.82 GB,8401240820,0,ds003039,Healthy,10-20,Motor,Motor,EEG
116
+ 115,ds003602,699,118,6,35,1000,159.35,73.21 GB,78609742568,0,ds003602,Other,other,Visual,Decision-making,EEG
117
+ 116,ds003655,156,156,1,19,500,130.923,20.26 GB,21756905870,0,ds003655,Healthy,10-20,Visual,Memory,EEG
118
+ 117,ds003522,200,96,1,64,500,57.079,25.36 GB,27225424004,0,ds003522,TBI,10-20,Auditory,Decision-making,EEG
119
+ 118,ds003801,20,20,1,24,250,13.689,1.15 GB,1233075452,0,ds003801,Healthy,10-20,Auditory,Attention,EEG
120
+ 119,ds005296,62,62,1,,500,37.205,8.53 GB,9154623627,0,ds005296,Healthy,,Multisensory,Decision-making,EEG
121
+ 120,ds004561,23,23,1,62,10000,11.379,97.96 GB,105188606283,0,ds004561,Healthy,10-20,Motor,Perception,EEG
122
+ 121,ds005131,63,58,2,64,500,52.035,22.35 GB,23996524256,0,ds005131,Healthy,other,Auditory,Attention/Memory,EEG
123
+ 122,ds005028,66,11,3,,,0.0,1.46 GB,1563795662,0,ds005028,,other,Visual,Motor,EEG
124
+ 123,ds005170,225,5,1,,,0.0,261.77 GB,281068716313,0,ds005170,,10-20,Visual,other,EEG
125
+ 124,ds004840,51,9,3,8,"1024,256,512",11.306,1.75 GB,1876219715,0,ds004840,Other,10-20,Auditory,Clinical/Intervention,EEG
126
+ 125,ds004718,51,51,1,64,1000,21.836,108.98 GB,117013849037,0,ds004718,Healthy,,Auditory,Learning,"MRI, EEG"
127
+ 126,ds002725,105,21,5,30,1000,0.0,15.32 GB,16447829856,0,ds002725,Healthy,10-20,Auditory,Affect,"T1W, CHANNELS, EEG, EVENTS, BOLD"
128
+ 127,ds004408,380,19,1,128,512,20.026,18.70 GB,20083249915,0,ds004408,Healthy,other,Auditory,Other,EEG
129
+ 128,ds004796,235,79,3,,1000,0.0,240.21 GB,257923739221,0,ds004796,Other,,Visual/Resting State,Memory/Resting state,"MRI, EEG"
130
+ 129,ds004511,134,45,3,139,3000,48.922,202.28 GB,217194709208,0,,,,,,EEG
131
+ 130,ds004817,20,20,1,63,1000,0.0,25.34 GB,27207910489,0,ds004817,Healthy,,Visual,Attention,EEG
132
+ 131,ds003190,280,19,1,0,256,29.891,1.27 GB,1361816737,0,ds003190,,10-20,Visual,Perception,"CHANNELS, EEG, EVENTS"
133
+ 132,ds004917,24,24,1,,,0.0,36.47 GB,39162637090,0,ds004917,Healthy,other,Multisensory,Decision-making,"MRI, EEG"
134
+ 133,ds004357,16,16,1,63,1000,0.0,69.56 GB,74685825960,0,ds004357,Healthy,10-20,Visual,Perception,EEG
135
+ 134,ds005397,26,26,1,64,500,27.923,12.10 GB,12993735747,0,,,,,,EEG
136
+ 135,ds003846,60,19,1,64,500,24.574,11.36 GB,12193814091,0,ds003846,Healthy,other,Multisensory,Decision-making,EEG
137
+ 136,ds004024,497,13,3,64,20000,55.503,1021.22 GB,1096522006089,0,ds004024,Healthy,10-20,Visual,Clinical/Intervention,"EEG, MRI"
138
+ 137,ds005815,137,26,4,30,"1000,500",38.618,9.91 GB,10642000219,0,,,,,,EEG
139
+ 138,ds005429,61,15,3,64,"2500,5000",14.474,16.47 GB,17685373747,0,,,,,,EEG
140
+ 139,ds003702,47,47,1,61,500,0.0,60.93 GB,65421860496,0,ds003702,Healthy,10-20,Visual,Memory,EEG
141
+ 140,ds004577,130,103,1,"19,21,24",200,22.974,652.76 MB,684471843,0,ds004577,Healthy,10-20,Sleep,Clinical/Intervention,EEG
142
+ 141,ds003574,18,18,1,64,500,0.0,14.79 GB,15876358782,0,ds003574,Healthy,10-20,Visual,Affect,"MRI, EEG"
143
+ 142,ds005779,250,19,16,"64,67,70",5000,16.65,88.67 GB,95206991747,0,,,,,,EEG
144
+ 143,ds005185,356,20,3,8,500,0.0,783.25 GB,841005525524,0,,,,,,EEG
145
+ 144,ds001787,40,24,1,64,256,27.607,5.69 GB,6112379157,0,ds001787,Healthy,10-20,Auditory,Attention,EEG
146
+ 145,ds003505,37,19,2,128,2048,0.0,90.13 GB,96777780296,0,ds003505,Healthy,10-20,Visual,Perception,"EEG, MRI"
147
+ 146,ds005340,15,15,1,2,10000,35.297,19.14 GB,20556600898,0,,,,,,EEG
148
+ 147,ds005363,43,43,1,64,1000,43.085,17.71 GB,19011101429,0,,,,,,EEG
149
+ 148,ds005121,39,34,1,58,512,41.498,9.04 GB,9711092185,0,ds005121,Healthy,,Sleep,Memory,EEG
150
+ 149,ds004256,53,53,2,64,500,42.337,18.18 GB,19516271706,0,,,,,,EEG
151
+ 150,ds005420,72,37,2,20,500,5.485,372.11 MB,390189484,0,,,,,,EEG
152
+ 151,ds002034,167,14,4,64,512,37.248,10.10 GB,10842685551,0,ds002034,Healthy,10-20,Visual,Attention,EEG
153
+ 152,ds003825,50,50,1,"63,128",1000,0.0,55.34 GB,59421076202,0,ds003825,Healthy,10-20,Visual,Perception,EEG
154
+ 153,ds004587,114,103,1,59,10000,25.491,219.34 GB,235517890780,0,ds004587,Healthy,,Visual,Decision-making,EEG
155
+ 154,ds004598,20,9,1,,10000,0.0,26.66 GB,28629940214,0,,,,,,EEG
156
+ 155,ds005383,240,30,1,30,200,8.327,17.43 GB,18712238212,0,,,,,,EEG
157
+ 156,ds003195,20,10,2,19,200,4.654,121.08 MB,126957549,0,ds003195,Parkinson's,10-20,Resting State,Clinical/Intervention,EEG
158
+ 157,ds005403,32,32,1,62,10000,13.383,135.65 GB,145656630881,0,,,,,,EEG
159
+ 158,ds004621,167,42,4,,1000,0.0,77.39 GB,83096459121,0,ds004621,Healthy,,Visual,Decision-making,EEG
160
+ 159,ds005863,357,127,4,27,500,0.0,10.59 GB,11371790189,0,,,,,,EEG
161
+ 160,ds005594,16,16,1,64,1000,12.934,10.89 GB,11695589464,0,,,,,,EEG
162
+ 161,ds002336,54,10,6,,5000,0.0,17.98 GB,19300632853,0,ds002336,Healthy,other,Visual,Motor,"EEG, MRI"
163
+ 162,ds004043,20,20,1,63,1000,0.0,30.44 GB,32685724275,0,ds004043,Healthy,10-20,Visual,Attention,EEG
164
+ 163,ds005106,42,42,1,32,500,0.012,12.62 GB,13547440607,0,ds005106,Healthy,,Visual,Attention,EEG
165
+ 164,ds004284,18,18,1,129,1000,9.454,16.49 GB,17703523636,0,ds004284,Healthy,other,Visual,Decision-making,EEG
166
+ 165,ds005620,202,21,3,"64,65",5000,21.811,77.30 GB,83002663223,0,,,,,,EEG
167
+ 166,ds002720,165,18,10,19,1000,0.0,2.39 GB,2566221024,0,ds002720,Healthy,10-20,Auditory,Affect,EEG
168
+ 167,ds005307,73,7,1,"72,104",10000,1.335,18.59 GB,19956343711,0,,,,,,EEG
169
+ 168,ds002094,43,20,3,30,5000,18.593,39.45 GB,42356287674,0,ds002094,,10-20,Resting State,Resting state,"CHANNELS, EEG, EVENTS"
170
+ 169,ds002833,80,20,1,257,1000,11.604,39.77 GB,42698182133,0,ds002833,,10-20,Auditory,Decision-making,"CHANNELS, EEG, ELECTRODES, EVENTS"
171
+ 170,ds002218,18,18,1,0,256,16.52,1.95 GB,2089183870,0,ds002218,Healthy,10-20,Multisensory,Perception,EEG
172
+ 171,ds005021,36,36,1,64,1024,0.0,83.20 GB,89337424472,0,ds005021,Healthy,,Visual,Attention,EEG
173
+ 172,ds004264,21,21,1,31,1000,0.0,3.30 GB,3546307489,0,ds004264,Healthy,10-20,Visual,Learning,EEG
174
+ 173,ds004446,237,30,1,129,1000,33.486,29.23 GB,31382984441,0,ds004446,Healthy,other,Visual,Motor,EEG
175
+ 174,ds004980,17,17,1,64,"499.9911824,499.9912809,499.991385,499.9914353,499.9914553,499.9915179,499.9917272,499.9917286,499.9917378,499.9919292,499.9919367,499.9923017,499.9923795,500",36.846,15.82 GB,16989514798,0,ds004980,Healthy,,Visual,Perception,EEG
176
+ 175,ds002722,94,19,5,32,1000,0.0,6.10 GB,6545819602,0,ds002722,Healthy,10-20,Auditory,Affect,"CHANNELS, EEG, EVENTS"
177
+ 176,ds003944,82,82,1,61,"1000,3000.00030000003",6.999,6.15 GB,6606397067,0,ds003944,Schizophrenia/Psychosis,10-20,Resting State,Clinical/Intervention,EEG
178
+ 177,ds004279,60,56,1,64,1000,53.729,25.22 GB,27082275780,0,ds004279,Healthy,10-20,Auditory,Perception,EEG
179
+ 178,ds005876,29,29,1,32,1000,16.017,7.61 GB,8170007441,0,,,,,,"EEG, BEH"
180
+ 179,ds003816,1077,48,8,127,1000,159.313,53.97 GB,57953346429,0,ds003816,Healthy,10-20,Other,Affect,EEG
181
+ 180,ds005385,3264,608,2,64,1000,169.62,74.07 GB,79529430923,0,,,,,,EEG
182
+ 181,ds004572,516,52,10,58,1000,52.624,43.56 GB,46777273840,0,ds004572,,10-20,Auditory,Perception,EEG
183
+ 182,ds005095,48,48,1,63,1000,16.901,14.28 GB,15336165645,0,ds005095,Healthy,,Visual,Memory,EEG
184
+ 183,ds004460,40,20,1,160,1000,27.494,61.36 GB,65881325046,0,ds004460,Healthy,other,Visual,Perception,EEG
185
+ 184,ds005189,30,30,1,61,1000,0.0,17.03 GB,18283103870,0,ds005189,Healthy,,Visual,Memory,EEG
186
+ 185,ds005274,22,22,1,6,500,0.0,71.91 MB,75400374,0,ds005274,Healthy,,,,EEG
187
+ 186,ds004075,116,29,4,,1000,0.0,7.39 GB,7936060172,0,ds004075,,10-20,,,EEG
188
+ 187,ds004447,418,22,1,"128,129",1000,23.554,20.73 GB,22253514308,0,ds004447,Healthy,other,Visual,Motor,EEG
189
+ 188,ds004952,245,10,1,128,1000,123.411,696.72 GB,748095804444,0,ds004952,Healthy,,Visual,Attention,EEG
190
+ 189,ds002724,96,10,4,32,1000,0.0,8.52 GB,9150248444,0,ds002724,Healthy,10-20,Auditory,Affect,"CHANNELS, EEG, EVENTS"
191
+ 190,ds005571,45,24,2,64,5000,0.0,62.77 GB,67394456730,0,,,,,,"MRI, EEG"
192
+ 191,ds004262,21,21,1,31,1000,0.0,3.48 GB,3731654700,0,ds004262,Healthy,10-20,Visual,Learning,EEG
193
+ 192,ds005273,33,33,1,63,1000,58.055,44.42 GB,47690882240,0,ds005273,Healthy,,Visual,Decision-making,EEG
194
+ 193,ds004520,33,33,1,62,250,0.055,10.41 GB,11175908145,0,ds004520,,10-20,Visual,Memory,EEG
195
+ 194,ds004444,465,30,1,129,1000,55.687,48.62 GB,52204973958,0,ds004444,Healthy,other,Visual,Motor,EEG
196
+ 195,ds004582,73,73,1,59,10000,34.244,294.22 GB,315915939478,0,ds004582,Healthy,,Visual,Affect,EEG
197
+ 196,ds002723,44,8,6,32,1000,0.0,2.60 GB,2791985215,0,ds002723,Healthy,10-20,Auditory,Affect,"CHANNELS, EEG, EVENTS"
198
+ 197,ds003751,38,38,1,128,250,19.95,4.71 GB,5057922307,0,ds003751,Healthy,other,Multisensory,Affect,EEG
199
+ 198,ds003421,80,20,1,257,1000,11.604,76.77 GB,82433418198,0,ds003421,Healthy,10-20,Multisensory,Decision-making,EEG
200
+ 199,ds002158,117,20,1,,,0.0,428.59 GB,460190030981,0,ds002158,Healthy,10-20,Visual,Affect,"MRI, EEG"
201
+ 200,ds004951,23,11,1,63,1000,29.563,22.00 GB,23627352274,0,ds004951,,,Tactile,Learning,EEG
202
+ 201,ds004802,38,38,1,65,"2048,512",0.0,29.34 GB,31504070800,0,ds004802,Other,,Visual,Affect,EEG
203
+ 202,ds004816,20,20,1,63,1000,0.0,23.31 GB,25028989553,0,ds004816,Healthy,,Visual,Attention,EEG
204
+ 203,ds005873,2850,125,1,2,256,11935.09,117.21 GB,125851664268,0,,,,,,EEG
205
+ 204,ds003194,29,15,2,"19,21",200,7.178,189.15 MB,198333904,0,ds003194,Parkinson's,10-20,Resting State,Clinical/Intervention,EEG
206
+ 205,ds004356,24,22,1,34,10000,0.0,213.08 GB,228796286136,0,ds004356,Healthy,10-20,Auditory,Perception,EEG
207
+ 206,ds004381,437,18,1,"4,5,7,8,10",20000,11.965,12.36 GB,13275540742,0,ds004381,Surgery,10-20,Other,Other,EEG
208
+ 207,ds004196,4,4,1,64,512,1.511,9.33 GB,10022898106,0,ds004196,Healthy,10-20,Visual,Clinical/Intervention,"MRI, EEG"
209
+ 208,ds005692,59,30,1,24,5000,112.206,92.81 GB,99649237201,0,,,,,,EEG
210
+ 209,ds002338,85,17,4,,5000,0.0,25.89 GB,27802574037,0,ds002338,Healthy,other,Visual,Motor,"EEG, MRI"
211
+ 210,ds004022,21,7,1,"16,18",500,0.0,634.93 MB,665774359,0,ds004022,Other,10-20,Visual,Motor,EEG
212
+ 211,ds004603,37,37,1,64,1024,30.653,39.13 GB,42020115207,0,ds004603,Healthy,10-20,Visual,Perception,EEG
213
+ 212,ds004752,136,15,1,"0,8,10,19,20,21,23","200,2000,4000,4096",0.302,11.95 GB,12829882725,0,ds004752,Epilepsy,10-20,Auditory,Memory,"IEEG, EEG"
214
+ 213,ds003768,255,33,2,,,0.0,89.24 GB,95819107191,0,ds003768,Healthy,10-20,Sleep,Sleep,"EEG, MRI"
215
+ 214,ds003947,61,61,1,61,"1000,3000.00030000003",5.266,12.54 GB,13466591394,0,ds003947,Schizophrenia/Psychosis,10-20,Resting State,Clinical/Intervention,EEG
216
+ 215,ds005530,21,17,1,10,500,154.833,6.47 GB,6949642931,0,,,,,,"MRI, EEG, BEH"
217
+ 216,ds005555,256,128,1,"2,8,9,11,12,13",256,2002.592,33.45 GB,35921410419,0,,,,,,EEG
218
+ 217,ds004477,9,9,1,79,2048,13.557,22.34 GB,23990303639,0,ds004477,Healthy,10-20,Multisensory,Decision-making,EEG
219
+ 218,ds005688,89,20,5,4,"10000,20000",2.502,8.42 GB,9036021093,0,,,,,,EEG
220
+ 219,ds003766,124,31,4,129,1000,39.973,152.77 GB,164033759919,0,ds003766,Healthy,other,Visual,Decision-making,EEG
221
+ 220,ds005540,103,59,1,64,"1200,600",0.0,70.40 GB,75594345013,0,,,,,,"EEG, BEH"
222
+ 221,ds004152,21,21,1,31,1000,0.0,4.77 GB,5118976537,0,ds004152,Healthy,10-20,Multisensory,Learning,EEG
223
+ 222,ds003626,30,10,1,,,0.0,24.99 GB,26828585815,0,ds003626,Healthy,10-20,Visual,Motor,EEG
224
+ 223,ds002814,168,21,1,68,1200,0.0,48.57 GB,52151006842,0,ds002814,Healthy,10-20,Visual,Perception,"MRI, EEG"
225
+ 224,ds003645,108,18,1,,,0.0,105.89 GB,113698969765,0,ds003645,Healthy,other,Visual,Perception,"EEG, MEG, MRI"
226
+ 225,ds005586,23,23,1,60,1000,33.529,28.68 GB,30791089319,0,,,,,,EEG
227
+ 226,ds003810,50,10,1,15,125,0.0,69.31 MB,72674251,0,ds003810,Healthy,10-20,Motor,Clinical/Intervention,EEG
228
+ 227,ds003969,392,98,4,64,"1024,2048",66.512,54.46 GB,58479195149,0,ds003969,Healthy,10-20,Auditory,Attention,EEG
229
+ 228,ds004000,86,43,2,128,2048,0.0,22.50 GB,24161100810,0,ds004000,Schizophrenia/Psychosis,10-20,Multisensory,Decision-making,EEG
230
+ 229,ds004995,20,20,1,,,0.0,27.60 GB,29637643188,0,ds004995,,,Visual,Attention,EEG
231
+ 230,ds003638,57,57,1,64,512,40.597,16.31 GB,17516109722,0,ds003638,Healthy,10-20,Visual,Decision-making,EEG
232
+ 231,ds004521,34,34,1,62,250,0.057,10.68 GB,11470006201,0,ds004521,,10-20,Visual,Motor,EEG
233
+ 232,ds001849,120,20,1,30,5000,0.0,44.51 GB,47790431085,0,ds001849,Healthy,10-20,Multisensory,Clinical/Intervention,EEG
234
+ 233,ds004252,1,1,1,,,0.0,4.31 GB,4630172409,0,ds004252,Healthy,10-20,Visual,Perception,EEG
235
+ 234,ds004448,280,56,1,129,1000,43.732,38.17 GB,40980948240,0,ds004448,Healthy,other,Visual,Motor,EEG
236
+ 235,ds005795,39,34,2,72,500,0.0,6.43 GB,6902188541,0,,,,,,"EEG, MRI"
237
+ 236,ds004018,32,16,1,63,1000,0.0,10.56 GB,11334174765,0,ds004018,Healthy,10-20,Visual,Learning,EEG
238
+ 237,ds004324,26,26,1,28,500,19.216,2.46 GB,2637689107,0,ds004324,Healthy,10-20,Multisensory,Affect,EEG
239
+ 238,ds003887,24,24,1,128,1000,0.0,80.10 GB,86007307086,0,ds003887,Healthy,10-20,Visual,Perception,EEG
240
+ 239,ds004860,31,31,1,32,"2048,512",0.0,3.79 GB,4065632222,0,ds004860,Healthy,,Auditory,Decision-making,EEG
241
+ 240,ds002721,185,31,6,19,1000,0.0,3.35 GB,3598851749,0,ds002721,Healthy,10-20,Auditory,Affect,EEG
242
+ 241,ds003555,30,30,1,,1024,0.0,28.27 GB,30359240949,0,ds003555,Epilepsy,10-20,Resting State,Clinical/Intervention,EEG
243
+ 242,ds005486,445,159,1,,"25000,5000",0.0,371.04 GB,398401152773,0,,,,,,EEG
244
+ 243,ds005520,69,23,3,67,1000,60.73,275.98 GB,296326427308,0,,,,,,EEG
245
+ 244,ds005262,186,12,1,,,0.0,688.75 MB,722211079,0,ds005262,Healthy,,Visual,other,EEG
246
+ 245,ds002778,46,31,1,40,512,2.518,545.00 MB,571471228,0,ds002778,Parkinson's,10-20,Resting State,Resting state,EEG
247
+ 246,ds003885,24,24,1,128,1000,0.0,82.21 GB,88277188455,0,ds003885,Healthy,10-20,Visual,Perception,EEG
248
+ 247,ds005406,29,29,1,63,1000,15.452,13.26 GB,14241905076,0,,,,,,EEG
249
+ 248,ds003710,48,13,1,32,5000,9.165,10.18 GB,10934708022,0,ds003710,Healthy,10-20,Multisensory,Perception,EEG
250
+ 249,ds003343,59,20,1,16,500,6.551,663.50 MB,695729345,0,ds003343,Healthy,10-20,Tactile,Perception,EEG
251
+ 250,ds005345,26,26,1,64,500,0.0,405.13 GB,435000970369,0,,,,,,"MRI, EEG"
252
+ 251,ds004067,84,80,1,63,2000,0.0,100.79 GB,108218050644,0,ds004067,Healthy,10-20,Visual,Affect,EEG
253
+ 252,ds001810,263,47,1,64,512,91.205,109.70 GB,117790096766,0,ds001810,Healthy,10-20,Visual,Attention,"CHANNELS, EEG, EVENTS"
254
+ 253,ds005515,2516,533,8,129,500,198.849,160.55 GB,172385741878,0,,,,,,EEG
255
+ 254,ds005516,3397,430,8,129,500,256.932,219.39 GB,235564761634,0,,,,,,EEG
@@ -0,0 +1,287 @@
1
+ from __future__ import annotations
2
+
3
+ from pathlib import Path
4
+ from typing import Any, Dict
5
+
6
+ import pandas as pd
7
+ from tabulate import tabulate
8
+
9
+
10
+ def register_openneuro_datasets(
11
+ summary_file: str | Path,
12
+ *,
13
+ base_class=None,
14
+ namespace: Dict[str, Any] | None = None,
15
+ add_to_all: bool = True,
16
+ ) -> Dict[str, type]:
17
+ """Dynamically create and register dataset classes from a summary file.
18
+
19
+ This function reads a CSV file containing summaries of OpenNeuro datasets
20
+ and dynamically creates a Python class for each dataset. These classes
21
+ inherit from a specified base class and are pre-configured with the
22
+ dataset's ID.
23
+
24
+ Parameters
25
+ ----------
26
+ summary_file : str or pathlib.Path
27
+ The path to the CSV file containing the dataset summaries.
28
+ base_class : type, optional
29
+ The base class from which the new dataset classes will inherit. If not
30
+ provided, :class:`eegdash.api.EEGDashDataset` is used.
31
+ namespace : dict, optional
32
+ The namespace (e.g., `globals()`) into which the newly created classes
33
+ will be injected. Defaults to the local `globals()` of this module.
34
+ add_to_all : bool, default True
35
+ If True, the names of the newly created classes are added to the
36
+ `__all__` list of the target namespace, making them importable with
37
+ `from ... import *`.
38
+
39
+ Returns
40
+ -------
41
+ dict[str, type]
42
+ A dictionary mapping the names of the registered classes to the class
43
+ types themselves.
44
+
45
+ """
46
+ if base_class is None:
47
+ from ..api import EEGDashDataset as base_class # lazy import
48
+
49
+ summary_path = Path(summary_file)
50
+ namespace = namespace if namespace is not None else globals()
51
+ module_name = namespace.get("__name__", __name__)
52
+ registered: Dict[str, type] = {}
53
+
54
+ df = pd.read_csv(summary_path, comment="#", skip_blank_lines=True)
55
+ for _, row_series in df.iterrows():
56
+ # Use the explicit 'dataset' column, not the CSV index.
57
+ dataset_id = str(row_series.get("dataset", "")).strip()
58
+ if not dataset_id:
59
+ continue
60
+
61
+ class_name = dataset_id.upper()
62
+
63
+ # avoid zero-arg super() here
64
+ def make_init(_dataset: str):
65
+ def __init__(
66
+ self,
67
+ cache_dir: str,
68
+ query: dict | None = None,
69
+ s3_bucket: str | None = None,
70
+ **kwargs,
71
+ ):
72
+ q = {"dataset": _dataset}
73
+ if query:
74
+ q.update(query)
75
+ # call base_class.__init__ directly
76
+ base_class.__init__(
77
+ self,
78
+ query=q,
79
+ cache_dir=cache_dir,
80
+ s3_bucket=s3_bucket,
81
+ **kwargs,
82
+ )
83
+
84
+ return __init__
85
+
86
+ init = make_init(dataset_id)
87
+
88
+ # Generate rich docstring with dataset metadata
89
+ doc = _generate_rich_docstring(dataset_id, row_series, base_class)
90
+
91
+ # init.__doc__ = doc
92
+
93
+ cls = type(
94
+ class_name,
95
+ (base_class,),
96
+ {
97
+ "_dataset": dataset_id,
98
+ "__init__": init,
99
+ "__doc__": doc,
100
+ "__module__": module_name, #
101
+ },
102
+ )
103
+
104
+ namespace[class_name] = cls
105
+ registered[class_name] = cls
106
+
107
+ if add_to_all:
108
+ ns_all = namespace.setdefault("__all__", [])
109
+ if isinstance(ns_all, list) and class_name not in ns_all:
110
+ ns_all.append(class_name)
111
+
112
+ return registered
113
+
114
+
115
+ def _generate_rich_docstring(
116
+ dataset_id: str, row_series: pd.Series, base_class: type
117
+ ) -> str:
118
+ """Generate a comprehensive, well-formatted docstring for a dataset class.
119
+
120
+ Parameters
121
+ ----------
122
+ dataset_id : str
123
+ The identifier of the dataset (e.g., "ds002718").
124
+ row_series : pandas.Series
125
+ A pandas Series containing the metadata for the dataset, extracted
126
+ from the summary CSV file.
127
+ base_class : type
128
+ The base class from which the new dataset class inherits. Used to
129
+ generate the "See Also" section of the docstring.
130
+
131
+ Returns
132
+ -------
133
+ str
134
+ A formatted docstring.
135
+
136
+ """
137
+ # Extract metadata with safe defaults
138
+ n_subjects = row_series.get("n_subjects", "Unknown")
139
+ n_records = row_series.get("n_records", "Unknown")
140
+ n_tasks = row_series.get("n_tasks", "Unknown")
141
+ modality = row_series.get("modality of exp", "")
142
+ exp_type = row_series.get("type of exp", "")
143
+ subject_type = row_series.get("Type Subject", "")
144
+ duration = row_series.get("duration_hours_total", "Unknown")
145
+ size = row_series.get("size", "Unknown")
146
+
147
+ # Create description based on available metadata
148
+ description_parts = []
149
+ if modality and str(modality).strip():
150
+ description_parts.append(f"**Modality**: {modality}")
151
+ if exp_type and str(exp_type).strip():
152
+ description_parts.append(f"**Type**: {exp_type}")
153
+ if subject_type and str(subject_type).strip():
154
+ description_parts.append(f"**Subjects**: {subject_type}")
155
+
156
+ description = (
157
+ " | ".join(description_parts)
158
+ if description_parts
159
+ else "EEG dataset from OpenNeuro"
160
+ )
161
+
162
+ # Generate the docstring
163
+ docstring = f"""OpenNeuro dataset ``{dataset_id}``.
164
+
165
+ {description}
166
+
167
+ This dataset contains {n_subjects} subjects with {n_records} recordings across {n_tasks} tasks.
168
+ Total duration: {duration} hours. Dataset size: {size}.
169
+
170
+ {_markdown_table(row_series)}
171
+
172
+ This dataset class provides convenient access to the ``{dataset_id}`` dataset through the EEGDash interface.
173
+ It inherits all functionality from :class:`~{base_class.__module__}.{base_class.__name__}` with the dataset filter pre-configured.
174
+
175
+ Parameters
176
+ ----------
177
+ cache_dir : str
178
+ Directory to cache downloaded data.
179
+ query : dict, optional
180
+ Additional MongoDB-style filters to AND with the dataset selection.
181
+ Must not contain the key ``dataset``.
182
+ s3_bucket : str, optional
183
+ Base S3 bucket used to locate the data.
184
+ **kwargs
185
+ Additional arguments passed to the base dataset class.
186
+
187
+ Examples
188
+ --------
189
+ Basic usage:
190
+
191
+ >>> from eegdash.dataset import {dataset_id.upper()}
192
+ >>> dataset = {dataset_id.upper()}(cache_dir="./data")
193
+ >>> print(f"Number of recordings: {{len(dataset)}}")
194
+
195
+ Load a specific recording:
196
+
197
+ >>> if len(dataset) > 0:
198
+ ... recording = dataset[0]
199
+ ... raw = recording.load()
200
+ ... print(f"Sampling rate: {{raw.info['sfreq']}} Hz")
201
+ ... print(f"Number of channels: {{len(raw.ch_names)}}")
202
+
203
+ Filter by additional criteria:
204
+
205
+ >>> # Get subset with specific task or subject
206
+ >>> filtered_dataset = {dataset_id.upper()}(
207
+ ... cache_dir="./data",
208
+ ... query={{"task": "RestingState"}} # if applicable
209
+ ... )
210
+
211
+ Notes
212
+ -----
213
+ More details available in the `NEMAR documentation <https://nemar.org/dataexplorer/detail?dataset_id={dataset_id}>`__.
214
+
215
+ See Also
216
+ --------
217
+ {base_class.__name__} : Base dataset class with full API documentation
218
+ """
219
+
220
+ return docstring
221
+
222
+
223
+ def _markdown_table(row_series: pd.Series) -> str:
224
+ """Create a reStructuredText grid table from a pandas Series.
225
+
226
+ This helper function takes a pandas Series containing dataset metadata
227
+ and formats it into a reStructuredText grid table for inclusion in
228
+ docstrings.
229
+
230
+ Parameters
231
+ ----------
232
+ row_series : pandas.Series
233
+ A Series where each index is a metadata field and each value is the
234
+ corresponding metadata value.
235
+
236
+ Returns
237
+ -------
238
+ str
239
+ A string containing the formatted reStructuredText table.
240
+
241
+ """
242
+ if row_series.empty:
243
+ return ""
244
+ dataset_id = row_series["dataset"]
245
+
246
+ # Prepare the dataframe with user's suggested logic
247
+ df = (
248
+ row_series.to_frame()
249
+ .T.rename(
250
+ columns={
251
+ "n_subjects": "#Subj",
252
+ "nchans_set": "#Chan",
253
+ "n_tasks": "#Classes",
254
+ "sampling_freqs": "Freq(Hz)",
255
+ "duration_hours_total": "Duration(H)",
256
+ "size": "Size",
257
+ }
258
+ )
259
+ .reindex(
260
+ columns=[
261
+ "dataset",
262
+ "#Subj",
263
+ "#Chan",
264
+ "#Classes",
265
+ "Freq(Hz)",
266
+ "Duration(H)",
267
+ "Size",
268
+ ]
269
+ )
270
+ .infer_objects(copy=False)
271
+ .fillna("")
272
+ )
273
+
274
+ # Use tabulate for the final rst formatting
275
+ table = tabulate(df, headers="keys", tablefmt="rst", showindex=False)
276
+
277
+ # Add a caption for the table
278
+ # Use an anonymous external link (double underscore) to avoid duplicate
279
+ # target warnings when this docstring is repeated across many classes.
280
+ caption = (
281
+ f"Short overview of dataset {dataset_id} more details in the "
282
+ f"`NeMAR documentation <https://nemar.org/dataexplorer/detail?dataset_id={dataset_id}>`__."
283
+ )
284
+ # adding caption below the table
285
+ # Indent the table to fit within the admonition block
286
+ indented_table = "\n".join(" " + line for line in table.split("\n"))
287
+ return f"\n\n{indented_table}\n\n{caption}"