eegdash 0.3.7.dev177024734__py3-none-any.whl → 0.3.8__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.

@@ -0,0 +1,256 @@
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
2
+ 0,ds002718,18,18,1,74,250,14.844,4.31 GB,4624315408,0,ds002718,Healthy,other,Visual,Perception
3
+ 1,ds005505,1342,136,10,129,500,125.366,103.11 GB,110708824369,0,,,,,
4
+ 2,ds004745,6,6,1,,1000,0.0,242.08 MB,253839725,0,,,,,
5
+ 3,ds005514,2885,295,10,129,500,213.008,185.03 GB,198677728665,0,,,,,
6
+ 4,ds005512,2320,257,10,129,500,196.205,157.19 GB,168778507427,0,,,,,
7
+ 5,ds005510,1227,135,10,129,500,112.464,90.80 GB,97492961757,0,,,,,
8
+ 6,ds005511,3100,381,10,"6,129",500,285.629,244.83 GB,262883881898,0,,,,,
9
+ 7,ds005509,3326,330,10,129,500,274.559,224.17 GB,240701124393,0,,,,,
10
+ 8,ds005508,3342,324,10,129,500,269.281,229.81 GB,246753736933,0,,,,,
11
+ 9,ds005507,1812,184,10,129,500,168.649,139.37 GB,149646718160,0,,,,,
12
+ 10,ds005506,1405,150,10,129,500,127.896,111.88 GB,120126449650,0,,,,,
13
+ 11,test,2,1,1,64,500,20.556,0 B,0,0,,,,,
14
+ 12,ds004854,1,1,1,64,128,0.535,79.21 MB,83057080,0,,,,,
15
+ 13,ds004853,1,1,1,64,128,0.535,79.21 MB,83057080,0,,,,,
16
+ 14,ds004844,68,17,1,64,1024,21.252,22.33 GB,23976121966,0,ds004844,,,Multisensory,Decision-making
17
+ 15,ds004843,92,14,1,64,256,29.834,7.66 GB,8229205795,0,ds004843,,,Visual,Attention
18
+ 16,ds004842,102,14,1,64,256,20.102,5.21 GB,5589054270,0,ds004842,,,Multisensory,Attention
19
+ 17,ds004852,1,1,1,64,128,0.535,79.21 MB,83057106,0,,,,,
20
+ 18,ds004851,1,1,1,64,128,0.535,56.59 GB,60765064414,0,,,,,
21
+ 19,ds004850,1,1,1,64,128,0.535,79.21 MB,83057078,0,,,,,
22
+ 20,ds004855,1,1,1,64,128,0.535,79.21 MB,83057076,0,,,,,
23
+ 21,ds004849,1,1,1,64,128,0.535,79.21 MB,83057084,0,,,,,
24
+ 22,ds004841,147,20,1,64,256,29.054,7.31 GB,7846934401,0,ds004841,,10-20,Multisensory,Attention
25
+ 23,ds004661,17,17,1,64,128,10.137,1.40 GB,1505577392,0,ds004661,,10-20,Multisensory,Memory
26
+ 24,ds004660,42,21,1,32,"2048,512",23.962,7.25 GB,7782408710,0,ds004660,Healthy,10-20,Multisensory,Attention
27
+ 25,ds004657,119,24,1,64,"1024,8192",27.205,43.06 GB,46237302701,0,ds004657,,10-20,Motor,Decision-making
28
+ 26,ds004362,1526,109,1,64,"128,160",48.592,11.14 GB,11961862159,0,ds004362,Healthy,10-20,Visual,Motor
29
+ 27,ds004010,24,24,1,64,1000,26.457,23.14 GB,24844863976,0,ds004010,Healthy,other,Multisensory,Attention
30
+ 28,ds002181,226,226,1,125,500,7.676,150.89 MB,158222084,0,,,,,
31
+ 29,ds004554,16,16,1,99,1000,0.024,8.79 GB,9432865762,0,ds004554,Healthy,10-20,Visual,Decision-making
32
+ 30,ds005697,50,50,1,"65,69",1000,77.689,66.58 GB,71486411402,0,,,,,
33
+ 31,ds004350,240,24,5,64,256,41.265,26.83 GB,28810754598,0,ds004350,Healthy,other,Visual,Memory
34
+ 32,ds004785,17,17,1,32,500,0.019,351.17 MB,368224136,0,ds004785,Healthy,,Motor,Motor
35
+ 33,ds004504,88,88,1,19,500,19.608,5.38 GB,5780997160,0,ds004504,Dementia,10-20,Resting State,Clinical/Intervention
36
+ 34,ds004635,55,55,1,129,1000,20.068,30.56 GB,32817659781,0,ds004635,Healthy,other,Multisensory,Attention
37
+ 35,ds005787,448,19,1,"64,66","1000,500",23.733,27.09 GB,29087512003,0,,,,,
38
+ 36,ds005079,60,1,15,65,500,3.25,1.68 GB,1809231997,0,ds005079,Healthy,,Multisensory,Affect
39
+ 37,ds005342,32,32,1,17,250,33.017,2.03 GB,2181610593,0,ds005342,Healthy,,Visual,Motor
40
+ 38,ds005034,100,25,2,129,1000,37.525,61.36 GB,65885315479,0,ds005034,Healthy,,Visual,Memory
41
+ 39,ds002680,350,14,1,31,1000,21.244,9.22 GB,9902152149,0,ds002680,Healthy,10-20,Visual,Motor
42
+ 40,ds003805,1,1,1,19,500,0.033,16.96 MB,17781347,0,ds003805,Healthy,10-20,Multisensory,Learning
43
+ 41,ds003838,130,65,2,63,1000,136.757,253.29 GB,271965704312,0,ds003838,Healthy,10-20,Auditory,Memory
44
+ 42,ds002691,20,20,1,32,250,6.721,776.76 MB,814491068,0,ds002691,Healthy,other,Visual,Attention
45
+ 43,ds003690,375,75,3,"64,66",500,46.771,21.46 GB,23043491552,0,ds003690,Healthy,10-20,Auditory,Decision-making
46
+ 44,ds004040,4,2,1,64,512,4.229,11.59 GB,12440304224,0,ds004040,Healthy,10-20,Auditory,Other
47
+ 45,ds003061,39,13,1,79,256,8.196,2.26 GB,2421951821,0,ds003061,,10-20,Auditory,Perception
48
+ 46,ds005672,3,3,1,"65,69",1000,4.585,4.23 GB,4545641306,0,,,,,
49
+ 47,ds005410,81,81,1,63,1000,22.976,19.76 GB,21213481224,0,,,,,
50
+ 48,ds003753,25,25,1,64,500,10.104,4.62 GB,4965253148,0,ds003753,Healthy,10-20,Visual,Learning
51
+ 49,ds005565,24,24,1,,500,11.436,2.62 GB,2816607296,0,,,,,
52
+ 50,ds002893,52,49,1,33,"250,250.0293378038558",36.114,7.70 GB,8263047991,0,ds002893,Healthy,10-20,Multisensory,Attention
53
+ 51,ds002578,2,2,1,256,256,1.455,1.33 GB,1429254677,0,ds002578,Healthy,10-20,Visual,Attention
54
+ 52,ds005089,36,36,1,63,1000,68.82,68.01 GB,73021312961,0,ds005089,Healthy,,Visual,Attention
55
+ 53,ds003822,25,25,1,64,500,12.877,5.82 GB,6248744522,0,ds003822,Healthy,10-20,Visual,Affect
56
+ 54,ds003670,62,25,1,32,2000,72.772,97.53 GB,104721234854,0,ds003670,,10-20,Visual,Attention
57
+ 55,ds005048,35,35,1,,250,5.203,355.91 MB,373200880,0,ds005048,Dementia,,Auditory,Attention
58
+ 56,ds004574,146,146,1,"63,64,66",500,31.043,13.48 GB,14470034208,0,ds004574,Parkinson's,10-20,Multisensory,Clinical/Intervention
59
+ 57,ds004519,40,40,1,62,250,0.067,12.56 GB,13486848019,0,ds004519,,10-20,Visual,Attention
60
+ 58,ds004602,546,182,3,128,"250,500",87.11,73.91 GB,79364456958,0,ds004602,Healthy,other,Visual,Perception
61
+ 59,ds004784,6,1,6,128,512,0.518,10.82 GB,11621460277,0,ds004784,Healthy,,Motor,Attention
62
+ 60,ds004771,61,61,1,34,256,0.022,1.36 GB,1462195517,0,ds004771,Healthy,10-20,Visual,Decision-making
63
+ 61,ds003518,137,110,1,64,500,89.888,39.51 GB,42423490194,0,ds003518,Healthy,10-20,Visual,Clinical/Intervention
64
+ 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
65
+ 63,ds005866,60,60,1,,500,15.976,3.57 GB,3837211623,0,,,,,
66
+ 64,ds003523,221,91,1,64,500,84.586,37.54 GB,40304852370,0,ds003523,TBI,10-20,Visual,Memory
67
+ 65,ds004347,48,24,1,64,"128,512",6.389,2.69 GB,2890549319,0,ds004347,Healthy,10-20,Visual,Perception
68
+ 66,ds004588,42,42,1,24,300,4.957,601.76 MB,630994652,0,ds004588,Healthy,10-20,Visual,Decision-making
69
+ 67,ds005811,448,19,1,62,"1000,500",23.733,24.12 GB,25902600444,0,,,,,
70
+ 68,ds003987,69,23,1,64,500.0930232558139,52.076,26.41 GB,28362707915,0,ds003987,Healthy,10-20,Visual,Attention
71
+ 69,ds004317,50,50,1,60,500,37.767,18.29 GB,19639199743,0,ds004317,Healthy,10-20,Multisensory,Affect
72
+ 70,ds004033,36,18,2,64,500,42.645,19.81 GB,21270391452,0,ds004033,,10-20,Motor,Motor
73
+ 71,ds004315,50,50,1,60,500,21.104,9.81 GB,10532856899,0,ds004315,Healthy,10-20,Multisensory,Affect
74
+ 72,ds003474,122,122,1,64,500,36.61,16.64 GB,17867805967,0,ds003474,Healthy,10-20,Visual,Decision-making
75
+ 73,ds003509,84,56,1,64,500,48.535,22.34 GB,23988721823,0,ds003509,Parkinson's,10-20,Visual,Learning
76
+ 74,ds005868,48,48,1,,500,13.094,2.93 GB,3146417813,0,,,,,
77
+ 75,ds003516,25,25,1,47,500,22.57,13.46 GB,14451393616,0,ds003516,Healthy,other,Auditory,Attention
78
+ 76,ds004942,62,62,1,65,1000,28.282,25.05 GB,26899933549,0,ds004942,Healthy,,Visual,Memory
79
+ 77,ds004348,18,9,2,34,200,35.056,12.30 GB,13210476025,0,ds004348,Healthy,other,Sleep,Sleep
80
+ 78,ds004625,543,32,9,120,500,28.397,62.46 GB,67069111978,0,ds004625,,,Motor,Attention
81
+ 79,ds003517,34,17,1,64,500,13.273,6.48 GB,6952992399,0,ds003517,Healthy,10-20,Visual,Learning
82
+ 80,ds004368,40,39,1,63,128,0.033,997.14 MB,1045574811,0,ds004368,Schizophrenia/Psychosis,10-20,Visual,Perception
83
+ 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
84
+ 82,ds003506,84,56,1,64,500,35.381,16.21 GB,17400039992,0,ds003506,Parkinson's,10-20,Visual,Decision-making
85
+ 83,ds003570,40,40,1,64,2048,26.208,36.12 GB,38783075272,0,ds003570,Healthy,10-20,Auditory,Decision-making
86
+ 84,ds003490,75,50,1,64,500,12.76,5.85 GB,6276775630,0,ds003490,Parkinson's,10-20,Auditory,Attention
87
+ 85,ds004117,85,23,1,69,"1000,250,500,500.059",15.941,5.80 GB,6230776574,0,ds004117,Healthy,10-20,Visual,Memory
88
+ 86,ds004505,25,25,1,120,250,30.398,522.56 GB,561092363916,0,ds004505,Healthy,10-20,Motor,Motor
89
+ 87,ds004580,147,147,1,"63,64,66",500,36.514,15.84 GB,17008438640,0,ds004580,Parkinson's,10-20,Visual,Decision-making
90
+ 88,ds004532,137,110,1,64,500,49.651,22.09 GB,23719572304,0,ds004532,Healthy,10-20,Visual,Learning
91
+ 89,ds004902,218,71,2,61,"500,5000",18.118,8.29 GB,8898600609,0,ds004902,Healthy,,Resting State,Resting state
92
+ 90,ds004295,26,26,1,66,"1024,512",34.313,31.51 GB,33831372141,0,ds004295,Healthy,10-20,Multisensory,Learning
93
+ 91,ds003519,54,27,1,64,500,20.504,8.96 GB,9623156762,0,ds003519,Healthy,10-20,Visual,Clinical/Intervention
94
+ 92,ds003458,23,23,1,64,500,10.447,4.72 GB,5065250805,0,ds003458,Healthy,10-20,Visual,Affect
95
+ 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
96
+ 94,ds004200,20,20,1,37,1000,14.123,7.21 GB,7740555648,0,ds004200,Healthy,10-20,Multisensory,Attention
97
+ 95,ds004015,36,36,1,18,500,47.29,6.03 GB,6475870225,0,ds004015,Healthy,other,Auditory,Attention
98
+ 96,ds004595,53,53,1,64,500,17.078,7.89 GB,8470863296,0,ds004595,Other,10-20,Visual,Decision-making
99
+ 97,ds004626,52,52,1,68,1000,21.359,19.87 GB,21336341431,0,ds004626,Other,10-20,Visual,Attention
100
+ 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
101
+ 99,ds004515,54,54,1,64,500,20.61,9.48 GB,10177384081,0,ds004515,Other,10-20,Visual,Affect
102
+ 100,ds004883,516,172,3,128,500,137.855,122.80 GB,131858855599,0,ds004883,Healthy,,Visual,Decision-making
103
+ 101,ds003739,120,30,4,128,256,20.574,10.94 GB,11742611182,0,ds003739,Healthy,10-20,Motor,Perception
104
+ 102,ds004389,260,26,4,42,10000,30.932,376.50 GB,404264486093,0,,,,,
105
+ 103,ds004367,40,40,1,68,1200,24.81,27.98 GB,30039343808,0,ds004367,Schizophrenia/Psychosis,10-20,Visual,Perception
106
+ 104,ds004369,41,41,1,4,500,37.333,8.01 GB,8596739356,0,ds004369,Healthy,other,Auditory,Perception
107
+ 105,ds004579,139,139,1,"63,64,66",500,55.703,24.12 GB,25896737812,0,ds004579,Parkinson's,10-20,Visual,Decision-making
108
+ 106,ds005416,23,23,1,64,1000,24.68,21.30 GB,22869325264,0,,,,,
109
+ 107,ds001785,54,18,3,63,"1000,1024",14.644,27.86 GB,29915397068,0,ds001785,Healthy,10-20,Tactile,Perception
110
+ 108,ds001971,273,20,1,108,512,46.183,31.98 GB,34339201543,0,ds001971,Healthy,10-20,Auditory,Motor
111
+ 109,ds004388,399,40,3,67,10000,43.327,682.54 GB,732876226489,0,,,,,
112
+ 110,ds003478,243,122,1,64,500,23.57,10.65 GB,11430531312,0,ds003478,Healthy,10-20,Resting State,Resting state
113
+ 111,ds004306,15,12,1,124,1024,18.183,79.11 GB,84945921180,0,ds004306,Healthy,other,Multisensory,Perception
114
+ 112,ds005305,165,165,1,64,"2048,512",14.136,6.41 GB,6887595053,0,ds005305,Healthy,,Visual,Decision-making
115
+ 113,ds005114,223,91,1,64,500,125.701,56.47 GB,60630838923,0,ds005114,TBI,,Visual,Attention
116
+ 114,ds003039,16,16,1,64,500,14.82,7.82 GB,8401240820,0,ds003039,Healthy,10-20,Motor,Motor
117
+ 115,ds003602,699,118,6,35,1000,159.35,73.21 GB,78609742568,0,ds003602,Other,other,Visual,Decision-making
118
+ 116,ds003655,156,156,1,19,500,130.923,20.26 GB,21756905870,0,ds003655,Healthy,10-20,Visual,Memory
119
+ 117,ds003522,200,96,1,64,500,57.079,25.36 GB,27225424004,0,ds003522,TBI,10-20,Auditory,Decision-making
120
+ 118,ds003801,20,20,1,24,250,13.689,1.15 GB,1233075452,0,ds003801,Healthy,10-20,Auditory,Attention
121
+ 119,ds005296,62,62,1,,500,37.205,8.53 GB,9154623627,0,ds005296,Healthy,,Multisensory,Decision-making
122
+ 120,ds004561,23,23,1,62,10000,11.379,97.96 GB,105188606283,0,ds004561,Healthy,10-20,Motor,Perception
123
+ 121,ds005131,63,58,2,64,500,52.035,22.35 GB,23996524256,0,ds005131,Healthy,other,Auditory,Attention/Memory
124
+ 122,ds005028,66,11,3,,,0.0,1.46 GB,1563795662,0,ds005028,,other,Visual,Motor
125
+ 123,ds005170,225,5,1,,,0.0,261.77 GB,281068716313,0,ds005170,,10-20,Visual,other
126
+ 124,ds004840,51,9,3,8,"1024,256,512",11.306,1.75 GB,1876219715,0,ds004840,Other,10-20,Auditory,Clinical/Intervention
127
+ 125,ds004718,51,51,1,64,1000,21.836,108.98 GB,117013849037,0,ds004718,Healthy,,Auditory,Learning
128
+ 126,ds002725,105,21,5,30,1000,0.0,15.32 GB,16447829856,0,ds002725,Healthy,10-20,Auditory,Affect
129
+ 127,ds004408,380,19,1,128,512,20.026,18.70 GB,20083249915,0,ds004408,Healthy,other,Auditory,Other
130
+ 128,ds004796,235,79,3,,1000,0.0,240.21 GB,257923739221,0,ds004796,Other,,Visual/Resting State,Memory/Resting state
131
+ 129,ds004511,134,45,3,139,3000,48.922,202.28 GB,217194709208,0,,,,,
132
+ 130,ds004817,20,20,1,63,1000,0.0,25.34 GB,27207910489,0,ds004817,Healthy,,Visual,Attention
133
+ 131,ds003190,280,19,1,0,256,29.891,1.27 GB,1361816737,0,ds003190,,10-20,Visual,Perception
134
+ 132,ds004917,24,24,1,,,0.0,36.47 GB,39162637090,0,ds004917,Healthy,other,Multisensory,Decision-making
135
+ 133,ds004357,16,16,1,63,1000,0.0,69.56 GB,74685825960,0,ds004357,Healthy,10-20,Visual,Perception
136
+ 134,ds005397,26,26,1,64,500,27.923,12.10 GB,12993735747,0,,,,,
137
+ 135,ds003846,60,19,1,64,500,24.574,11.36 GB,12193814091,0,ds003846,Healthy,other,Multisensory,Decision-making
138
+ 136,ds004024,497,13,3,64,20000,55.503,1021.22 GB,1096522006089,0,ds004024,Healthy,10-20,Visual,Clinical/Intervention
139
+ 137,ds005815,137,26,4,30,"1000,500",38.618,9.91 GB,10642000219,0,,,,,
140
+ 138,ds005429,61,15,3,64,"2500,5000",14.474,16.47 GB,17685373747,0,,,,,
141
+ 139,ds003702,47,47,1,61,500,0.0,60.93 GB,65421860496,0,ds003702,Healthy,10-20,Visual,Memory
142
+ 140,ds004577,130,103,1,"19,21,24",200,22.974,652.76 MB,684471843,0,ds004577,Healthy,10-20,Sleep,Clinical/Intervention
143
+ 141,ds003574,18,18,1,64,500,0.0,14.79 GB,15876358782,0,ds003574,Healthy,10-20,Visual,Affect
144
+ 142,ds005779,250,19,16,"64,67,70",5000,16.65,88.67 GB,95206991747,0,,,,,
145
+ 143,ds005185,356,20,3,8,500,0.0,783.25 GB,841005525524,0,,,,,
146
+ 144,ds001787,40,24,1,64,256,27.607,5.69 GB,6112379157,0,ds001787,Healthy,10-20,Auditory,Attention
147
+ 145,ds003505,37,19,2,128,2048,0.0,90.13 GB,96777780296,0,ds003505,Healthy,10-20,Visual,Perception
148
+ 146,ds005340,15,15,1,2,10000,35.297,19.14 GB,20556600898,0,,,,,
149
+ 147,ds005363,43,43,1,64,1000,43.085,17.71 GB,19011101429,0,,,,,
150
+ 148,ds005121,39,34,1,58,512,41.498,9.04 GB,9711092185,0,ds005121,Healthy,,Sleep,Memory
151
+ 149,ds004256,53,53,2,64,500,42.337,18.18 GB,19516271706,0,,,,,
152
+ 150,ds005420,72,37,2,20,500,5.485,372.11 MB,390189484,0,,,,,
153
+ 151,ds002034,167,14,4,64,512,37.248,10.10 GB,10842685551,0,ds002034,Healthy,10-20,Visual,Attention
154
+ 152,ds003825,50,50,1,"63,128",1000,0.0,55.34 GB,59421076202,0,ds003825,Healthy,10-20,Visual,Perception
155
+ 153,ds004587,114,103,1,59,10000,25.491,219.34 GB,235517890780,0,ds004587,Healthy,,Visual,Decision-making
156
+ 154,ds004598,20,9,1,,10000,0.0,26.66 GB,28629940214,0,,,,,
157
+ 155,ds005383,240,30,1,30,200,8.327,17.43 GB,18712238212,0,,,,,
158
+ 156,ds003195,20,10,2,19,200,4.654,121.08 MB,126957549,0,ds003195,Parkinson's,10-20,Resting State,Clinical/Intervention
159
+ 157,ds005403,32,32,1,62,10000,13.383,135.65 GB,145656630881,0,,,,,
160
+ 158,ds004621,167,42,4,,1000,0.0,77.39 GB,83096459121,0,ds004621,Healthy,,Visual,Decision-making
161
+ 159,ds005863,357,127,4,27,500,0.0,10.59 GB,11371790189,0,,,,,
162
+ 160,ds005594,16,16,1,64,1000,12.934,10.89 GB,11695589464,0,,,,,
163
+ 161,ds002336,54,10,6,,5000,0.0,17.98 GB,19300632853,0,ds002336,Healthy,other,Visual,Motor
164
+ 162,ds004043,20,20,1,63,1000,0.0,30.44 GB,32685724275,0,ds004043,Healthy,10-20,Visual,Attention
165
+ 163,ds005106,42,42,1,32,500,0.012,12.62 GB,13547440607,0,ds005106,Healthy,,Visual,Attention
166
+ 164,ds004284,18,18,1,129,1000,9.454,16.49 GB,17703523636,0,ds004284,Healthy,other,Visual,Decision-making
167
+ 165,ds005620,202,21,3,"64,65",5000,21.811,77.30 GB,83002663223,0,,,,,
168
+ 166,ds002720,165,18,10,19,1000,0.0,2.39 GB,2566221024,0,ds002720,Healthy,10-20,Auditory,Affect
169
+ 167,ds005307,73,7,1,"72,104",10000,1.335,18.59 GB,19956343711,0,,,,,
170
+ 168,ds002094,43,20,3,30,5000,18.593,39.45 GB,42356287674,0,ds002094,,10-20,Resting State,Resting state
171
+ 169,ds002833,80,20,1,257,1000,11.604,39.77 GB,42698182133,0,ds002833,,10-20,Auditory,Decision-making
172
+ 170,ds002218,18,18,1,0,256,16.52,1.95 GB,2089183870,0,ds002218,Healthy,10-20,Multisensory,Perception
173
+ 171,ds005021,36,36,1,64,1024,0.0,83.20 GB,89337424472,0,ds005021,Healthy,,Visual,Attention
174
+ 172,ds004264,21,21,1,31,1000,0.0,3.30 GB,3546307489,0,ds004264,Healthy,10-20,Visual,Learning
175
+ 173,ds004446,237,30,1,129,1000,33.486,29.23 GB,31382984441,0,ds004446,Healthy,other,Visual,Motor
176
+ 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
177
+ 175,ds002722,94,19,5,32,1000,0.0,6.10 GB,6545819602,0,ds002722,Healthy,10-20,Auditory,Affect
178
+ 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
179
+ 177,ds004279,60,56,1,64,1000,53.729,25.22 GB,27082275780,0,ds004279,Healthy,10-20,Auditory,Perception
180
+ 178,ds005876,29,29,1,32,1000,16.017,7.61 GB,8170007441,0,,,,,
181
+ 179,ds003816,1077,48,8,127,1000,159.313,53.97 GB,57953346429,0,ds003816,Healthy,10-20,Other,Affect
182
+ 180,ds005385,3264,608,2,64,1000,169.62,74.07 GB,79529430923,0,,,,,
183
+ 181,ds004572,516,52,10,58,1000,52.624,43.56 GB,46777273840,0,ds004572,,10-20,Auditory,Perception
184
+ 182,ds005095,48,48,1,63,1000,16.901,14.28 GB,15336165645,0,ds005095,Healthy,,Visual,Memory
185
+ 183,ds004460,40,20,1,160,1000,27.494,61.36 GB,65881325046,0,ds004460,Healthy,other,Visual,Perception
186
+ 184,ds005189,30,30,1,61,1000,0.0,17.03 GB,18283103870,0,ds005189,Healthy,,Visual,Memory
187
+ 185,ds005274,22,22,1,6,500,0.0,71.91 MB,75400374,0,ds005274,Healthy,,,
188
+ 186,ds004075,116,29,4,,1000,0.0,7.39 GB,7936060172,0,ds004075,,10-20,,
189
+ 187,ds004447,418,22,1,"128,129",1000,23.554,20.73 GB,22253514308,0,ds004447,Healthy,other,Visual,Motor
190
+ 188,ds004952,245,10,1,128,1000,123.411,696.72 GB,748095804444,0,ds004952,Healthy,,Visual,Attention
191
+ 189,ds002724,96,10,4,32,1000,0.0,8.52 GB,9150248444,0,ds002724,Healthy,10-20,Auditory,Affect
192
+ 190,ds005571,45,24,2,64,5000,0.0,62.77 GB,67394456730,0,,,,,
193
+ 191,ds004262,21,21,1,31,1000,0.0,3.48 GB,3731654700,0,ds004262,Healthy,10-20,Visual,Learning
194
+ 192,ds005273,33,33,1,63,1000,58.055,44.42 GB,47690882240,0,ds005273,Healthy,,Visual,Decision-making
195
+ 193,ds004520,33,33,1,62,250,0.055,10.41 GB,11175908145,0,ds004520,,10-20,Visual,Memory
196
+ 194,ds004444,465,30,1,129,1000,55.687,48.62 GB,52204973958,0,ds004444,Healthy,other,Visual,Motor
197
+ 195,ds004582,73,73,1,59,10000,34.244,294.22 GB,315915939478,0,ds004582,Healthy,,Visual,Affect
198
+ 196,ds002723,44,8,6,32,1000,0.0,2.60 GB,2791985215,0,ds002723,Healthy,10-20,Auditory,Affect
199
+ 197,ds003751,38,38,1,128,250,19.95,4.71 GB,5057922307,0,ds003751,Healthy,other,Multisensory,Affect
200
+ 198,ds003421,80,20,1,257,1000,11.604,76.77 GB,82433418198,0,ds003421,Healthy,10-20,Multisensory,Decision-making
201
+ 199,ds002158,117,20,1,,,0.0,428.59 GB,460190030981,0,ds002158,Healthy,10-20,Visual,Affect
202
+ 200,ds004951,23,11,1,63,1000,29.563,22.00 GB,23627352274,0,ds004951,?,,Tactile,Learning
203
+ 201,ds004802,38,38,1,65,"2048,512",0.0,29.34 GB,31504070800,0,ds004802,Other,,Visual,Affect
204
+ 202,ds004816,20,20,1,63,1000,0.0,23.31 GB,25028989553,0,ds004816,Healthy,,Visual,Attention
205
+ 203,ds005873,2850,125,1,2,256,11935.09,117.21 GB,125851664268,0,,,,,
206
+ 204,ds003194,29,15,2,"19,21",200,7.178,189.15 MB,198333904,0,ds003194,Parkinson's,10-20,Resting State,Clinical/Intervention
207
+ 205,ds004356,24,22,1,34,10000,0.0,213.08 GB,228796286136,0,ds004356,Healthy,10-20,Auditory,Perception
208
+ 206,ds004381,437,18,1,"4,5,7,8,10",20000,11.965,12.36 GB,13275540742,0,ds004381,Surgery,10-20,Other,Other
209
+ 207,ds004196,4,4,1,64,512,1.511,9.33 GB,10022898106,0,ds004196,Healthy,10-20,Visual,Clinical/Intervention
210
+ 208,ds005692,59,30,1,24,5000,112.206,92.81 GB,99649237201,0,,,,,
211
+ 209,ds002338,85,17,4,,5000,0.0,25.89 GB,27802574037,0,ds002338,Healthy,other,Visual,Motor
212
+ 210,ds004022,21,7,1,"16,18",500,0.0,634.93 MB,665774359,0,ds004022,Other,10-20,Visual,Motor
213
+ 211,ds004603,37,37,1,64,1024,30.653,39.13 GB,42020115207,0,ds004603,Healthy,10-20,Visual,Perception
214
+ 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
215
+ 213,ds003768,255,33,2,,,0.0,89.24 GB,95819107191,0,ds003768,Healthy,10-20,Sleep,Sleep
216
+ 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
217
+ 215,ds005530,21,17,1,10,500,154.833,6.47 GB,6949642931,0,,,,,
218
+ 216,ds005555,256,128,1,"2,8,9,11,12,13",256,2002.592,33.45 GB,35921410419,0,,,,,
219
+ 217,ds004477,9,9,1,79,2048,13.557,22.34 GB,23990303639,0,ds004477,Healthy,10-20,Multisensory,Decision-making
220
+ 218,ds005688,89,20,5,4,"10000,20000",2.502,8.42 GB,9036021093,0,,,,,
221
+ 219,ds003766,124,31,4,129,1000,39.973,152.77 GB,164033759919,0,ds003766,Healthy,other,Visual,Decision-making
222
+ 220,ds005540,103,59,1,64,"1200,600",0.0,70.40 GB,75594345013,0,,,,,
223
+ 221,ds004152,21,21,1,31,1000,0.0,4.77 GB,5118976537,0,ds004152,Healthy,10-20,Multisensory,Learning
224
+ 222,ds003626,30,10,1,,,0.0,24.99 GB,26828585815,0,ds003626,Healthy,10-20,Visual,Motor
225
+ 223,ds002814,168,21,1,68,1200,0.0,48.57 GB,52151006842,0,ds002814,Healthy,10-20,Visual,Perception
226
+ 224,ds003645,108,18,1,,,0.0,105.89 GB,113698969765,0,ds003645,Healthy,other,Visual,Perception
227
+ 225,ds005586,23,23,1,60,1000,33.529,28.68 GB,30791089319,0,,,,,
228
+ 226,ds003810,50,10,1,15,125,0.0,69.31 MB,72674251,0,ds003810,Healthy,10-20,Motor,Clinical/Intervention
229
+ 227,ds003969,392,98,4,64,"1024,2048",66.512,54.46 GB,58479195149,0,ds003969,Healthy,10-20,Auditory,Attention
230
+ 228,ds004000,86,43,2,128,2048,0.0,22.50 GB,24161100810,0,ds004000,Schizophrenia/Psychosis,10-20,Multisensory,Decision-making
231
+ 229,ds004995,20,20,1,,,0.0,27.60 GB,29637643188,0,ds004995,,,Visual,Attention
232
+ 230,ds003638,57,57,1,64,512,40.597,16.31 GB,17516109722,0,ds003638,Healthy,10-20,Visual,Decision-making
233
+ 231,ds004521,34,34,1,62,250,0.057,10.68 GB,11470006201,0,ds004521,,10-20,Visual,Motor
234
+ 232,ds001849,120,20,1,30,5000,0.0,44.51 GB,47790431085,0,ds001849,Healthy,10-20,Multisensory,Clinical/Intervention
235
+ 233,ds004252,1,1,1,,,0.0,4.31 GB,4630172409,0,ds004252,Healthy,10-20,Visual,Perception
236
+ 234,ds004448,280,56,1,129,1000,43.732,38.17 GB,40980948240,0,ds004448,Healthy,other,Visual,Motor
237
+ 235,ds005795,39,34,2,72,500,0.0,6.43 GB,6902188541,0,,,,,
238
+ 236,ds004018,32,16,1,63,1000,0.0,10.56 GB,11334174765,0,ds004018,Healthy,10-20,Visual,Learning
239
+ 237,ds004324,26,26,1,28,500,19.216,2.46 GB,2637689107,0,ds004324,Healthy,10-20,Multisensory,Affect
240
+ 238,ds003887,24,24,1,128,1000,0.0,80.10 GB,86007307086,0,ds003887,Healthy,10-20,Visual,Perception
241
+ 239,ds004860,31,31,1,32,"2048,512",0.0,3.79 GB,4065632222,0,ds004860,Healthy,,Auditory,Decision-making
242
+ 240,ds002721,185,31,6,19,1000,0.0,3.35 GB,3598851749,0,ds002721,Healthy,10-20,Auditory,Affect
243
+ 241,ds003555,30,30,1,,1024,0.0,28.27 GB,30359240949,0,ds003555,Epilepsy,10-20,Resting State,Clinical/Intervention
244
+ 242,ds005486,445,159,1,,"25000,5000",0.0,371.04 GB,398401152773,0,,,,,
245
+ 243,ds005520,69,23,3,67,1000,60.73,275.98 GB,296326427308,0,,,,,
246
+ 244,ds005262,186,12,1,,,0.0,688.75 MB,722211079,0,ds005262,Healthy,,Visual,other
247
+ 245,ds002778,46,31,1,40,512,2.518,545.00 MB,571471228,0,ds002778,Parkinson's,10-20,Resting State,Resting state
248
+ 246,ds003885,24,24,1,128,1000,0.0,82.21 GB,88277188455,0,ds003885,Healthy,10-20,Visual,Perception
249
+ 247,ds005406,29,29,1,63,1000,15.452,13.26 GB,14241905076,0,,,,,
250
+ 248,ds003710,48,13,1,32,5000,9.165,10.18 GB,10934708022,0,ds003710,Healthy,10-20,Multisensory,Perception
251
+ 249,ds003343,59,20,1,16,500,6.551,663.50 MB,695729345,0,ds003343,Healthy,10-20,Tactile,Perception
252
+ 250,ds005345,26,26,1,64,500,0.0,405.13 GB,435000970369,0,,,,,
253
+ 251,ds004067,84,80,1,63,2000,0.0,100.79 GB,108218050644,0,ds004067,Healthy,10-20,Visual,Affect
254
+ 252,ds001810,263,47,1,64,512,91.205,109.70 GB,117790096766,0,ds001810,Healthy,10-20,Visual,Attention
255
+ 253,ds005515,2516,533,8,129,500,198.849,160.55 GB,172385741878,0,,,,,
256
+ 254,ds005516,3397,430,8,129,500,256.932,219.39 GB,235564761634,0,,,,,
@@ -16,7 +16,7 @@ def register_openneuro_datasets(
16
16
  ) -> Dict[str, type]:
17
17
  """Dynamically create dataset classes from a summary file."""
18
18
  if base_class is None:
19
- from .api import EEGDashDataset as base_class # lazy import
19
+ from ..api import EEGDashDataset as base_class # lazy import
20
20
 
21
21
  summary_path = Path(summary_file)
22
22
  namespace = namespace if namespace is not None else globals()
@@ -59,7 +59,7 @@ def register_openneuro_datasets(
59
59
 
60
60
  doc = f"""OpenNeuro dataset ``{dataset_id}``.
61
61
 
62
- {markdown_table(row_series)}
62
+ {_markdown_table(row_series)}
63
63
 
64
64
  Parameters
65
65
  ----------
@@ -101,7 +101,7 @@ def register_openneuro_datasets(
101
101
  return registered
102
102
 
103
103
 
104
- def markdown_table(row_series: pd.Series) -> str:
104
+ def _markdown_table(row_series: pd.Series) -> str:
105
105
  """Create a reStructuredText grid table from a pandas Series."""
106
106
  if row_series.empty:
107
107
  return ""
@@ -0,0 +1,17 @@
1
+ from .preprocessing import hbn_ec_ec_reannotation
2
+ from .windows import (
3
+ add_aux_anchors,
4
+ add_extras_columns,
5
+ annotate_trials_with_target,
6
+ build_trial_table,
7
+ keep_only_recordings_with,
8
+ )
9
+
10
+ __all__ = [
11
+ "hbn_ec_ec_reannotation",
12
+ "build_trial_table",
13
+ "annotate_trials_with_target",
14
+ "add_aux_anchors",
15
+ "add_extras_columns",
16
+ "keep_only_recordings_with",
17
+ ]
eegdash/hbn/windows.py ADDED
@@ -0,0 +1,305 @@
1
+ import logging
2
+
3
+ import mne
4
+ import numpy as np
5
+ import pandas as pd
6
+ from mne_bids import get_bids_path_from_fname
7
+
8
+ from braindecode.datasets.base import BaseConcatDataset
9
+
10
+ logger = logging.getLogger("eegdash")
11
+
12
+
13
+ def build_trial_table(events_df: pd.DataFrame) -> pd.DataFrame:
14
+ """One row per contrast trial with stimulus/response metrics."""
15
+ events_df = events_df.copy()
16
+ events_df["onset"] = pd.to_numeric(events_df["onset"], errors="raise")
17
+ events_df = events_df.sort_values("onset", kind="mergesort").reset_index(drop=True)
18
+
19
+ trials = events_df[events_df["value"].eq("contrastTrial_start")].copy()
20
+ stimuli = events_df[events_df["value"].isin(["left_target", "right_target"])].copy()
21
+ responses = events_df[
22
+ events_df["value"].isin(["left_buttonPress", "right_buttonPress"])
23
+ ].copy()
24
+
25
+ trials = trials.reset_index(drop=True)
26
+ trials["next_onset"] = trials["onset"].shift(-1)
27
+ trials = trials.dropna(subset=["next_onset"]).reset_index(drop=True)
28
+
29
+ rows = []
30
+ for _, tr in trials.iterrows():
31
+ start = float(tr["onset"])
32
+ end = float(tr["next_onset"])
33
+
34
+ stim_block = stimuli[(stimuli["onset"] >= start) & (stimuli["onset"] < end)]
35
+ stim_onset = np.nan if stim_block.empty else float(stim_block.iloc[0]["onset"])
36
+
37
+ if not np.isnan(stim_onset):
38
+ resp_block = responses[
39
+ (responses["onset"] >= stim_onset) & (responses["onset"] < end)
40
+ ]
41
+ else:
42
+ resp_block = responses[
43
+ (responses["onset"] >= start) & (responses["onset"] < end)
44
+ ]
45
+
46
+ if resp_block.empty:
47
+ resp_onset = np.nan
48
+ resp_type = None
49
+ feedback = None
50
+ else:
51
+ resp_onset = float(resp_block.iloc[0]["onset"])
52
+ resp_type = resp_block.iloc[0]["value"]
53
+ feedback = resp_block.iloc[0]["feedback"]
54
+
55
+ rt_from_stim = (
56
+ (resp_onset - stim_onset)
57
+ if (not np.isnan(stim_onset) and not np.isnan(resp_onset))
58
+ else np.nan
59
+ )
60
+ rt_from_trial = (resp_onset - start) if not np.isnan(resp_onset) else np.nan
61
+
62
+ correct = None
63
+ if isinstance(feedback, str):
64
+ if feedback == "smiley_face":
65
+ correct = True
66
+ elif feedback == "sad_face":
67
+ correct = False
68
+
69
+ rows.append(
70
+ {
71
+ "trial_start_onset": start,
72
+ "trial_stop_onset": end,
73
+ "stimulus_onset": stim_onset,
74
+ "response_onset": resp_onset,
75
+ "rt_from_stimulus": rt_from_stim,
76
+ "rt_from_trialstart": rt_from_trial,
77
+ "response_type": resp_type,
78
+ "correct": correct,
79
+ }
80
+ )
81
+
82
+ return pd.DataFrame(rows)
83
+
84
+
85
+ # Aux functions to inject the annot
86
+ def _to_float_or_none(x):
87
+ return None if pd.isna(x) else float(x)
88
+
89
+
90
+ def _to_int_or_none(x):
91
+ if pd.isna(x):
92
+ return None
93
+ if isinstance(x, (bool, np.bool_)):
94
+ return int(bool(x))
95
+ if isinstance(x, (int, np.integer)):
96
+ return int(x)
97
+ try:
98
+ return int(x)
99
+ except Exception:
100
+ return None
101
+
102
+
103
+ def _to_str_or_none(x):
104
+ return None if (x is None or (isinstance(x, float) and np.isnan(x))) else str(x)
105
+
106
+
107
+ def annotate_trials_with_target(
108
+ raw,
109
+ target_field="rt_from_stimulus",
110
+ epoch_length=2.0,
111
+ require_stimulus=True,
112
+ require_response=True,
113
+ ):
114
+ """Create 'contrast_trial_start' annotations with float target in extras."""
115
+ fnames = raw.filenames
116
+ assert len(fnames) == 1, "Expected a single filename"
117
+ bids_path = get_bids_path_from_fname(fnames[0])
118
+ events_file = bids_path.update(suffix="events", extension=".tsv").fpath
119
+
120
+ events_df = (
121
+ pd.read_csv(events_file, sep="\t")
122
+ .assign(onset=lambda d: pd.to_numeric(d["onset"], errors="raise"))
123
+ .sort_values("onset", kind="mergesort")
124
+ .reset_index(drop=True)
125
+ )
126
+
127
+ trials = build_trial_table(events_df)
128
+
129
+ if require_stimulus:
130
+ trials = trials[trials["stimulus_onset"].notna()].copy()
131
+ if require_response:
132
+ trials = trials[trials["response_onset"].notna()].copy()
133
+
134
+ if target_field not in trials.columns:
135
+ raise KeyError(f"{target_field} not in computed trial table.")
136
+ targets = trials[target_field].astype(float)
137
+
138
+ onsets = trials["trial_start_onset"].to_numpy(float)
139
+ durations = np.full(len(trials), float(epoch_length), dtype=float)
140
+ descs = ["contrast_trial_start"] * len(trials)
141
+
142
+ extras = []
143
+ for i, v in enumerate(targets):
144
+ row = trials.iloc[i]
145
+
146
+ extras.append(
147
+ {
148
+ "target": _to_float_or_none(v),
149
+ "rt_from_stimulus": _to_float_or_none(row["rt_from_stimulus"]),
150
+ "rt_from_trialstart": _to_float_or_none(row["rt_from_trialstart"]),
151
+ "stimulus_onset": _to_float_or_none(row["stimulus_onset"]),
152
+ "response_onset": _to_float_or_none(row["response_onset"]),
153
+ "correct": _to_int_or_none(row["correct"]),
154
+ "response_type": _to_str_or_none(row["response_type"]),
155
+ }
156
+ )
157
+
158
+ new_ann = mne.Annotations(
159
+ onset=onsets,
160
+ duration=durations,
161
+ description=descs,
162
+ orig_time=raw.info["meas_date"],
163
+ extras=extras,
164
+ )
165
+ raw.set_annotations(new_ann, verbose=False)
166
+ return raw
167
+
168
+
169
+ def add_aux_anchors(raw, stim_desc="stimulus_anchor", resp_desc="response_anchor"):
170
+ ann = raw.annotations
171
+ mask = ann.description == "contrast_trial_start"
172
+ if not np.any(mask):
173
+ return raw
174
+
175
+ stim_onsets, resp_onsets = [], []
176
+ stim_extras, resp_extras = [], []
177
+
178
+ for idx in np.where(mask)[0]:
179
+ ex = ann.extras[idx] if ann.extras is not None else {}
180
+ t0 = float(ann.onset[idx])
181
+
182
+ stim_t = ex["stimulus_onset"]
183
+ resp_t = ex["response_onset"]
184
+
185
+ if stim_t is None or (isinstance(stim_t, float) and np.isnan(stim_t)):
186
+ rtt = ex["rt_from_trialstart"]
187
+ rts = ex["rt_from_stimulus"]
188
+ if rtt is not None and rts is not None:
189
+ stim_t = t0 + float(rtt) - float(rts)
190
+
191
+ if resp_t is None or (isinstance(resp_t, float) and np.isnan(resp_t)):
192
+ rtt = ex["rt_from_trialstart"]
193
+ if rtt is not None:
194
+ resp_t = t0 + float(rtt)
195
+
196
+ if (stim_t is not None) and not (
197
+ isinstance(stim_t, float) and np.isnan(stim_t)
198
+ ):
199
+ stim_onsets.append(float(stim_t))
200
+ stim_extras.append(dict(ex, anchor="stimulus"))
201
+ if (resp_t is not None) and not (
202
+ isinstance(resp_t, float) and np.isnan(resp_t)
203
+ ):
204
+ resp_onsets.append(float(resp_t))
205
+ resp_extras.append(dict(ex, anchor="response"))
206
+
207
+ new_onsets = np.array(stim_onsets + resp_onsets, dtype=float)
208
+ if len(new_onsets):
209
+ aux = mne.Annotations(
210
+ onset=new_onsets,
211
+ duration=np.zeros_like(new_onsets, dtype=float),
212
+ description=[stim_desc] * len(stim_onsets) + [resp_desc] * len(resp_onsets),
213
+ orig_time=raw.info["meas_date"],
214
+ extras=stim_extras + resp_extras,
215
+ )
216
+ raw.set_annotations(ann + aux, verbose=False)
217
+ return raw
218
+
219
+
220
+ def add_extras_columns(
221
+ windows_concat_ds,
222
+ original_concat_ds,
223
+ desc="contrast_trial_start",
224
+ keys=(
225
+ "target",
226
+ "rt_from_stimulus",
227
+ "rt_from_trialstart",
228
+ "stimulus_onset",
229
+ "response_onset",
230
+ "correct",
231
+ "response_type",
232
+ ),
233
+ ):
234
+ float_cols = {
235
+ "target",
236
+ "rt_from_stimulus",
237
+ "rt_from_trialstart",
238
+ "stimulus_onset",
239
+ "response_onset",
240
+ }
241
+
242
+ for win_ds, base_ds in zip(windows_concat_ds.datasets, original_concat_ds.datasets):
243
+ ann = base_ds.raw.annotations
244
+ idx = np.where(ann.description == desc)[0]
245
+ if idx.size == 0:
246
+ continue
247
+
248
+ per_trial = [
249
+ {
250
+ k: (
251
+ ann.extras[i][k]
252
+ if ann.extras is not None and k in ann.extras[i]
253
+ else None
254
+ )
255
+ for k in keys
256
+ }
257
+ for i in idx
258
+ ]
259
+
260
+ md = win_ds.metadata.copy()
261
+ first = md["i_window_in_trial"].to_numpy() == 0
262
+ trial_ids = first.cumsum() - 1
263
+ n_trials = trial_ids.max() + 1 if len(trial_ids) else 0
264
+ assert n_trials == len(per_trial), (
265
+ f"Trial mismatch: {n_trials} vs {len(per_trial)}"
266
+ )
267
+
268
+ for k in keys:
269
+ vals = [per_trial[t][k] if t < len(per_trial) else None for t in trial_ids]
270
+ if k == "correct":
271
+ ser = pd.Series(
272
+ [None if v is None else int(bool(v)) for v in vals],
273
+ index=md.index,
274
+ dtype="Int64",
275
+ )
276
+ elif k in float_cols:
277
+ ser = pd.Series(
278
+ [np.nan if v is None else float(v) for v in vals],
279
+ index=md.index,
280
+ dtype="Float64",
281
+ )
282
+ else: # response_type
283
+ ser = pd.Series(vals, index=md.index, dtype="string")
284
+
285
+ # Replace the whole column to avoid dtype conflicts
286
+ md[k] = ser
287
+
288
+ win_ds.metadata = md.reset_index(drop=True)
289
+ if hasattr(win_ds, "y"):
290
+ y_np = win_ds.metadata["target"].astype(float).to_numpy()
291
+ win_ds.y = y_np[:, None] # (N, 1)
292
+
293
+ return windows_concat_ds
294
+
295
+
296
+ def keep_only_recordings_with(desc, concat_ds):
297
+ kept = []
298
+ for ds in concat_ds.datasets:
299
+ if np.any(ds.raw.annotations.description == desc):
300
+ kept.append(ds)
301
+ else:
302
+ logging.warning(
303
+ f"Recording {ds.raw.filenames[0]} does not contain event '{desc}'"
304
+ )
305
+ return BaseConcatDataset(kept)
eegdash/paths.py ADDED
@@ -0,0 +1,28 @@
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ from pathlib import Path
5
+
6
+ from mne.utils import get_config as mne_get_config
7
+
8
+
9
+ def get_default_cache_dir() -> Path:
10
+ """Resolve a consistent default cache directory for EEGDash.
11
+
12
+ Priority order:
13
+ 1) Environment variable ``EEGDASH_CACHE_DIR`` if set.
14
+ 2) MNE config ``MNE_DATA`` if set (aligns with tests and ecosystem caches).
15
+ 3) ``.eegdash_cache`` under the current working directory.
16
+ """
17
+ # 1) Explicit env var wins
18
+ env_dir = os.environ.get("EEGDASH_CACHE_DIR")
19
+ if env_dir:
20
+ return Path(env_dir).expanduser().resolve()
21
+
22
+ # 2) Reuse MNE's data cache location if configured
23
+ mne_data = mne_get_config("MNE_DATA")
24
+ if mne_data:
25
+ return Path(mne_data).expanduser().resolve()
26
+
27
+ # 3) Default to a project-local hidden folder
28
+ return Path.cwd() / ".eegdash_cache"
eegdash/utils.py CHANGED
@@ -1,7 +1,7 @@
1
1
  from mne.utils import get_config, set_config, use_log_level
2
2
 
3
3
 
4
- def __init__mongo_client():
4
+ def _init_mongo_client():
5
5
  with use_log_level("ERROR"):
6
6
  if get_config("EEGDASH_DB_URI") is None:
7
7
  set_config(