-
Notifications
You must be signed in to change notification settings - Fork 9
/
GX_bids_export.m
750 lines (642 loc) · 39 KB
/
GX_bids_export.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
%% Convert GX Dataset to BIDS format
%This script is used to convert the GX dataset eeg files to BIDs format.
%Since there is no direct way to turn a CNT (eeprobe) file to EDF or Brain
%Vision format, that data are exported to a .set file and .fdt. The full
%dataset is also available in .mat format which can be used in matlab or
%python.
%
%For full details please see the the following publications:
% Main data repo: https://zenodo.org/record/4456079
% Data repo DOI: 10.5281/zenodo.4456079 (DOI may change with data updates)
% Data collection publication (working title): Dataset of Concurrent EEG, ECG, and Behavior with Multiple Doses of transcranial Electrical Stimulation
%
% This script is based of a BIDs template by A. Delorme - Jan 2019.
% Please note that the bids_export.m file in the BIDs conversion plugin to
% EEGlab was edited to accomadate conversion of eeprobe cnt files. Code
% from ANT neuro were used from here: http://download.ant-neuro.com/matlab/
% Specifically:
% Libeep EEGLAB plugin.
% Windows 64 bit : ANTeepimport1.13.zip 2017-02-23
%
% Other requirements:
% +Demographic info file:
% -GX_demog_info.mat
% +EEG channel location file:
% -Standard-10-10-Cap33_V6_BIDS.loc
%
%
%
% Author: Nigel Gebodh
% Date: May 2021
%
%% Clear Residuals
clear all
close all
%% Compile Subject Data
data = [];
% ----------------------------------
%01
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\0101\GX_01_2019-09-24_15-45-53.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0102\GX_01_2019-09-27_17-11-55.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0103\GX_01_2019-10-11_17-18-47.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0104\GX_01_2019-10-11_19-04-28.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0105\GX_01_2019-10-22_17-47-33.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0106\GX_01_2019-10-22_19-16-54.cnt'};
data(end).session = [1 2 3 4 5 6];
data(end).run = [1 1 1 1 1 1];
data(end).notes = {strcat('File: 0101 ;',...
'Date, Start,Stop:9/24/19 3:46:44 PM 4:56:44 PM;',...
'Montages:M30, F30, F0;',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes: F0 was only triggered once due to trigger error'),...
strcat('File: 0102 ;',...
'Date, Start,Stop:9/27/19 5:01:55 PM 6:11:55 PM;',...
'Montages:M30, F30, F0; ',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: F0 was only triggered once due to trigger error'),...
strcat('File: 0103 ;',...
'Date, Start,Stop:10/11/19 5:20:11 PM 6:30:11 PM;',...
'Montages:P30, P0, P5; ',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: '),...
strcat('File: 0104 ;',...
'Date, Start,Stop:10/11/19 7:05:11 PM 8:15:11 PM;',...
'Montages:F5, M5, M0; ',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: '),...
strcat('File: 0105 ;',...
'Date, Start,Stop:10/22/19 5:48:16 PM 6:58:16 PM;',...
'Montages:F5, M5, M0; ',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes: '),...
strcat('File: 0106 ;',...
'Date, Start,Stop:10/22/19 7:17:31 PM 8:27:31 PM;',...
'Montages:P30, P0, P5; ',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes: ')}
%02
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\0201\GX_02_2019-10-15_13-58-04.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0202\GX_02_2019-10-15_15-34-45.cnt'}
data(end).session = [1 2 ];
data(end).run = [1 1 ];
data(end).notes = {strcat('File: 0201 ;',...
'Date, Start,Stop:10/15/19 1:58:57 PM 3:08:57 PM;',...
'Montages:F30, F5, P30;',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: Participant was very sleepy and fell asleep a few times'),...
strcat('File: 0202 ;',...
'Date, Start,Stop:10/15/19 3:35:28 PM 4:45:28 PM;',...
'Montages:P0, M5, M30; ',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: Participant was very sleepy and fell asleep a few times'),...
}
%03
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\0301\GX_03_2019-10-31_15-00-34.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0302\GX_03_2019-10-31_16-52-56.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0303\GX_03_2019-10-31_18-52-20.cnt'}
data(end).session = [1 2 3 ];
data(end).run = [1 1 1 ];
data(end).notes = {strcat('File: 0301 ;',...
'Date, Start,Stop:10/31/19 3:01:22 PM 4:11:22 PM;',...
'Montages:M0, P0, F30;',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: '),...
strcat('File: 0302 ;',...
'Date, Start,Stop:10/31/19 4:53:52 PM 6:03:52 PM;',...
'Montages:F5, P5, P30; ',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: F0 was only triggered once due to trigger error'),...
strcat('File: 0303 ;',...
'Date, Start,Stop:10/31/19 6:53:05 PM 8:03:05 PM;',...
'Montages:M5, F0, M30; ',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: '),...
}
%04
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\0401\GX_04_2019-11-05_15-35-30.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0402\GX_04_2019-11-05_18-04-19.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0403\GX_04_2019-11-05_19-52-17.cnt'};
data(end).session = [1 2 3];
data(end).run = [1 1 1];
data(end).notes = {strcat('File: 0401 ;',...
'Date, Start,Stop:11/05/19 3:36:16 PM 4:46:16 PM;',...
'Montages:P30, M30, F5;',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: '),...
strcat('File: 0402 ;',...
'Date, Start,Stop:11/05/19 6:05:03 PM 7:15:03 PM;',...
'Montages:P0, F0, M0; ',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes: F0 was only triggered once due to trigger error'),...
strcat('File: 0403 ;',...
'Date, Start,Stop:11/05/19 7:53:20 PM 9:03:20 PM;',...
'Montages:F30, M5, P5; ',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes: '),...
}
%05
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\0501\GX_05_2019-11-11_16-02-22.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0504\GX_05_2019-11-19_16-48-04.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0505\GX_05_2019-11-19_18-45-28.cnt'};
data(end).session = [1 2 3];
data(end).run = [1 1 1];
data(end).notes = {strcat('File: 0501 ;',...
'Date, Start,Stop:11/11/19 4:03:12 PM 5:13:12 PM;',...
'Montages:M5, P0, P5;',...
'Stim Amplitude(mA): 0.5, 1, 1;',...
'Notes: '),...
strcat('File: 0504 ;',...
'Date, Start,Stop:11/19/19 4:48:42 PM 5:58:42 PM;',...
'Montages:P30, M30, M0; ',...
'Stim Amplitude(mA): 1, 0.5, 0.5;',...
'Notes: '),...
strcat('File: 0505 ;',...
'Date, Start,Stop:11/19/19 6:46:11 PM 7:56:11 PM;',...
'Montages:F30, F0, F5; ',...
'Stim Amplitude(mA): 1, 1, 0.5;',...
'Notes: '),...
}
%06
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\0601\GX_06_2019-11-12_16-21-54.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0602\GX_06_2019-11-12_18-31-41.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0603\GX_06_2019-11-12_20-32-44.cnt'};
data(end).session = [1 2 3];
data(end).run = [1 1 1];
data(end).notes = {strcat('File: 0601 ;',...
'Date, Start,Stop:11/12/19 4:22:37 PM 5:32:37 PM;',...
'Montages:F0, F5, P5;',...
'Stim Amplitude(mA): 1, 0.5, 1;',...
'Notes: '),...
strcat('File: 0602 ;',...
'Date, Start,Stop:11/12/19 6:32:25 PM 7:42:25 PM;',...
'Montages:F30, M30, P30; ',...
'Stim Amplitude(mA): 0.5, 1, 1;',...
'Notes: '),...
strcat('File: 0603 ;',...
'Date, Start,Stop:11/12/19 8:33:34 PM 9:43:34 PM;',...
'Montages:P0, M5, M0; ',...
'Stim Amplitude(mA): 1, 1, 0.5;',...
'Notes: '),...
}
%07
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\0701\GX_07_2019-11-15_16-08-23.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0702\GX_07_2019-11-15_18-00-00.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0703\GX_07_2019-11-15_20-06-07.cnt'};
data(end).session = [1 2 3];
data(end).run = [1 1 1];
data(end).notes = {strcat('File: 0701 ;',...
'Date, Start,Stop:11/15/19 4:09:15 PM 5:19:15 PM;',...
'Montages:P5, F5, M5;',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: '),...
strcat('File: 0702 ;',...
'Date, Start,Stop:11/15/19 6:00:42 PM 7:10:42 PM;',...
'Montages:M0, P0, F0; ',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes:'),...
strcat('File: 0703 ;',...
'Date, Start,Stop:11/15/19 8:06:50 PM 9:16:50 PM;',...
'Montages:F30, P30, M30; ',...
'Stim Amplitude(mA): 0.5, 0.5, 0.5;',...
'Notes: '),...
}
%08
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\0801\GX_08_2019-11-21_15-55-48.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0802\GX_08_2019-11-21_17-56-19.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0803\GX_08_2019-11-21_20-21-56.cnt'};
data(end).session = [1 2 3];
data(end).run = [1 1 1];
data(end).notes = {strcat('File: 0801 ;',...
'Date, Start,Stop:11/21/19 3:56:37 PM 5:06:37 PM;',...
'Montages:F5, M30, M5;',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes: '),...
strcat('File: 0802 ;',...
'Date, Start,Stop:11/21/19 5:57:03 PM 7:07:03 PM;',...
'Montages:P30, F0, P0; ',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes:'),...
strcat('File: 0803 ;',...
'Date, Start,Stop:11/21/19 8:22:39 PM 9:32:39 PM;',...
'Montages:P5, F30, M0; ',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes: '),...
}
%09
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\0901\GX_09_2019-11-25_17-03-31.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0902\GX_09_2019-11-25_19-11-23.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\0903\GX_09_2019-11-25_20-54-28.cnt'};
data(end).session = [1 2 3];
data(end).run = [1 1 1];
data(end).notes = {strcat('File: 0901 ;',...
'Date, Start,Stop:11/25/19 5:04:21 PM 6:14:21 PM;',...
'Montages:P30, F5, F0;',...
'Stim Amplitude(mA): 0.5, 0.5, 1;',...
'Notes: '),...
strcat('File: 0902 ;',...
'Date, Start,Stop:11/26/19 7:12:09 PM 8:22:09 PM;',...
'Montages:M5, F30, P0; ',...
'Stim Amplitude(mA): 0.5, 1, 1;',...
'Notes:'),...
strcat('File: 0903 ;',...
'Date, Start,Stop:11/27/19 8:55:18 PM 10:05:18 PM;',...
'Montages:P5, M0, M30; ',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes: '),...
}
%10
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\1001\GX_10_2019-11-26_15-30-43.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\1002\GX_10_2019-11-26_17-22-24.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\1003\GX_10_2019-11-26_19-02-14.cnt'};
data(end).session = [1 2 3];
data(end).run = [1 1 1];
data(end).notes = {strcat('File: 1001 ;',...
'Date, Start,Stop:11/26/19 3:31:30 PM 4:41:30 PM;',...
'Montages:M0, P0, M5;',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes: '),...
strcat('File: 1002 ;',...
'Date, Start,Stop:11/26/19 5:23:10 PM 6:33:10 PM;',...
'Montages:F0, P30, F30; ',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes:'),...
strcat('File: 1003 ;',...
'Date, Start,Stop:11/26/19 7:03:04 PM 8:13:04 PM;',...
'Montages:F5, M30, P5; ',...
'Stim Amplitude(mA): 1, 1, 1;',...
'Notes: '),...
}
%11
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\1101\GX_11_2020-01-08_15-57-42.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\1102\GX_11_2020-01-08_18-03-01.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 1101 ;',...
'Date, Start,Stop:1/8/20 2:47:42 PM 3:57:42 PM;',...
'Montages:F30;',...
'Stim Amplitude(mA): 1;',...
'Notes: There was an extra stimulation trial in this data making 21 trials, triggers may be shifted.'),...
strcat('File: 1102 ;',...
'Date, Start,Stop:1/8/20 4:53:01 PM 6:03:01 PM;',...
'Montages:M30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: '),...
}
%12
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\1201\GX_12_2020-01-09_15-59-37.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\1202\GX_12_2020-01-09_17-55-28.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 1201 ;',...
'Date, Start,Stop:1/9/20 2:49:37 PM 3:59:37 PM;',...
'Montages:M30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 19'),...
strcat('File: 1202 ;',...
'Date, Start,Stop:1/9/20 4:45:28 PM 5:55:28 PM;',...
'Montages:F30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 19'),...
}
%13
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\1301\GX_13_2020-01-14_14-40-26.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\1302\GX_13_2020-01-14_16-36-24.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 1301 ;',...
'Date, Start,Stop:1/14/20 1:30:26 PM 2:40:26 PM;',...
'Montages:F30;',...
'Stim Amplitude(mA): 1;',...
'Notes: '),...
strcat('File: 1302 ;',...
'Date, Start,Stop:1/14/20 3:26:24 PM 4:36:24 PM;',...
'Montages:M30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: '),...
}
%14
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\1401\GX_14_2020-01-15_14-34-33.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\1402\GX_14_2020-01-15_16-18-03.cnt'};
data(end).session = [1 2 ];
data(end).run = [1 1];
data(end).notes = {strcat('File: 1401 ;',...
'Date, Start,Stop:1/15/20 1:24:33 PM 2:34:33 PM;',...
'Montages:M30;',...
'Stim Amplitude(mA): 1;',...
'Notes: '),...
strcat('File: 1402 ;',...
'Date, Start,Stop:1/15/20 3:08:03 PM 4:18:03 PM;',...
'Montages:F30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: '),...
}
%15
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\1501\GX_15_2020-01-16_16-49-17.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\1502\GX_15_2020-01-16_18-48-52.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 1501 ;',...
'Date, Start,Stop:1/16/20 3:39:17 PM 4:49:17 PM;',...
'Montages:F30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 18'),...
strcat('File: 1502 ;',...
'Date, Start,Stop:1/16/20 5:38:52 PM 6:48:52 PM;',...
'Montages:M30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 18'),...
}
%16
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\1601\GX_16_2020-01-21_15-12-31.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\1602\GX_16_2020-01-21_17-03-55.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 1601 ;',...
'Date, Start,Stop:1/21/20 2:02:31 PM 3:12:31 PM;',...
'Montages:M30;',...
'Stim Amplitude(mA): 1;',...
'Notes: '),...
strcat('File: 1602 ;',...
'Date, Start,Stop:1/21/20 3:53:55 PM 5:03:55 PM;',...
'Montages:F30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: '),...
}
%17
data(end+1).file = {''
''};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 1701 ;',...
'Date, Start,Stop:1/22/20;',...
'Montages:F30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Experiment stopped, participant was not following instructions and was not performing task'),...
strcat('File: 1702 ;',...
'Date, Start,Stop: NA;',...
'Montages:M30; ',...
'Stim Amplitude(mA): NA;',...
'Notes: Session/experiment was not completed'),...
}
%18
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\1801\GX_18_2020-01-23_15-30-19.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\1802\GX_18_2020-01-23_17-21-48.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 1801 ;',...
'Date, Start,Stop:1/23/20 2:20:19 PM 3:30:19 PM;',...
'Montages:M30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 15'),...
strcat('File: 1802 ;',...
'Date, Start,Stop:1/23/20 4:11:48 PM 5:21:48 PM;',...
'Montages:F30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 15'),...
}
%19
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\1901\GX_19_2020-01-24_15-31-53.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\1902\GX_19_2020-01-24_17-25-09.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 1901 ;',...
'Date, Start,Stop:1/24/20 2:21:53 PM 3:31:53 PM;',...
'Montages:F30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 12'),...
strcat('File: 1902 ;',...
'Date, Start,Stop:1/24/20 4:15:09 PM 5:25:09 PM;',...
'Montages:M30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 12'),...
}
%20
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\2001\GX_20_2020-02-04_14-32-17.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\2002\GX_20_2020-02-04_16-15-32.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 2001 ;',...
'Date, Start,Stop:2/4/20 1:22:17 PM 2:32:17 PM;',...
'Montages:F30;',...
'Stim Amplitude(mA): 1;',...
'Notes: '),...
strcat('File: 2002 ;',...
'Date, Start,Stop:2/4/20 3:05:32 PM 4:15:32 PM;',...
'Montages:M30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: '),...
}
%21
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\2101\GX_21_2020-02-10_14-42-35.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\2102\GX_21_2020-02-10_16-19-16.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 2101 ;',...
'Date, Start,Stop:2/10/20 1:32:35 PM 2:42:35 PM;',...
'Montages:F30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 25, 26'),...
strcat('File: 2102 ;',...
'Date, Start,Stop:2/10/20 3:09:16 PM 4:19:16 PM;',...
'Montages:M30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 25, 26'),...
}
%22
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\2201\GX_22_2020-02-11_15-43-22.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\2202\GX_22_2020-02-11_17-31-44.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 2201 ;',...
'Date, Start,Stop:2/11/20 2:33:22 PM 3:43:22 PM;',...
'Montages:M30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 23, 24'),...
strcat('File: 2202 ;',...
'Date, Start,Stop:2/11/20 4:21:44 PM 5:31:44 PM;',...
'Montages:F30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 23, 24'),...
}
%23
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\2301\GX_23_2020-02-24_14-54-23.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\2302\GX_23_2020-02-24_16-35-00.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 2301 ;',...
'Date, Start,Stop:2/24/20 1:44:23 PM 2:54:23 PM;',...
'Montages:F30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 22, 24'),...
strcat('File: 2302 ;',...
'Date, Start,Stop:2/24/20 3:25:00 PM 4:35:00 PM;',...
'Montages:M30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 22, 24'),...
}
%24
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\2401\GX_24_2020-02-25_15-00-29.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\2402\GX_24_2020-02-25_16-42-47.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 2401 ;',...
'Date, Start,Stop:2/25/20 1:50:29 PM 3:00:29 PM;',...
'Montages:M30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 22, 23'),...
strcat('File: 2402 ;',...
'Date, Start,Stop:2/25/20 3:32:47 PM 4:42:47 PM;',...
'Montages:F30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 22, 23'),...
}
%25
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\2501\GX_25_2020-02-27_14-47-44.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\2502\GX_25_2020-02-27_16-32-08.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 2501 ;',...
'Date, Start,Stop:2/27/20 1:37:44 PM 2:47:44 PM;',...
'Montages:F30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 21, 26'),...
strcat('File: 2402 ;',...
'Date, Start,Stop:2/27/20 3:22:08 PM 4:32:08 PM;',...
'Montages:M30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 21, 26'),...
}
%26
data(end+1).file = {'C:\Users\13474\Documents\Projects\GX\Data\2601\GX_26_2020-03-02_14-52-31.cnt'
'C:\Users\13474\Documents\Projects\GX\Data\2602\GX_26_2020-03-02_16-39-39.cnt'};
data(end).session = [1 2];
data(end).run = [1 1];
data(end).notes = {strcat('File: 2601 ;',...
'Date, Start,Stop:3/2/20 1:42:31 PM 2:52:31 PM;',...
'Montages:F30;',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 21, 25'),...
strcat('File: 2602 ;',...
'Date, Start,Stop:3/2/20 3:29:39 PM 4:39:39 PM;',...
'Montages:M30; ',...
'Stim Amplitude(mA): 1;',...
'Notes: Same participant as 21, 25'),...
}
%}
%% Add General File Info
% general information for dataset_description.json file
% -----------------------------------------------------
generalInfo.Name = 'GX Dataset-tES CTT Vigilance Attention ';
generalInfo.ReferencesAndLinks = { "Publication title:Dataset of Concurrent EEG, ECG, and Behavior with Multiple Doses of transcranial Electrical Stimulation" "DataSet Link: https://zenodo.org/record/4456079#.YKyxAbVKiF4" };
generalInfo.License = 'CC0';
generalInfo.Authors={'Nigel Gebodh'};
% participant information for participants.tsv file
% -------------------------------------------------
dummy =load('GX_demog_info_V1.mat');
pInfo = dummy.GX_demog_info;%Copied from the Subject info and Behavioral Spreadsheet
clear dummy
% participant column description for participants.json file
% ---------------------------------------------------------
pInfoDesc.participant_id.Description = 'Participant number';
pInfoDesc.age.Description = 'Participants age in years';
pInfoDesc.age.Units = 'years';
pInfoDesc.gender.Description = 'Participants gender';
pInfoDesc.gender.Levels.M = 'male';
pInfoDesc.gender.Levels.F = 'female';
pInfoDesc.Height.Description = 'Participants height';
pInfoDesc.Height.Units = 'centimeters';
pInfoDesc.Weight.Description = 'Participants weight';
pInfoDesc.Weight.Units = 'kilograms';
pInfoDesc.Ethnicity.Description = 'Participants ethnicity';
pInfoDesc.Ethnicity.Levels.Non = 'Non-Hispanic/Latino';
pInfoDesc.Ethnicity.Levels.His = 'Hispanic/Latino';
pInfoDesc.Race.Description = 'Participants race';
pInfoDesc.Education.Description = 'Participants education level';
pInfoDesc.Education.Units = 'years';
pInfoDesc.Handedness.Description = 'Participants handedness-Right handed or left handed';
pInfoDesc.Handedness.Levels.right = 'Rigth handed';
pInfoDesc.Handedness.Levels.left = 'Left handed';
pInfoDesc.Language.Description = 'Is English your first language';
pInfoDesc.Language.Levels.yes = 'Yes English is my first language';
pInfoDesc.Language.Levels.no = 'No English is not my first language';
pInfoDesc.Prof.Description = 'How proficient in English are you';
pInfoDesc.Exercise.Description = 'Do you exercise';
pInfoDesc.Exercise.Levels.yes = 'Yes';
pInfoDesc.Exercise.Levels.no = 'No';
pInfoDesc.Exercisehours.Description = 'About how many hours a week do you exercise';
pInfoDesc.Exercisehours.Units = 'hours/week (Max hrs/wk taken if range was given here)';
pInfoDesc.Stim.Description = 'Have you ever had electrical stimulation before';
pInfoDesc.Stim.Levels.yes = 'Yes';
pInfoDesc.Stim.Levels.no = 'No';
pInfoDesc.RepeatParticipants.Description = 'Matching letters indicate participants who returned to repeat the experiment';
pInfoDesc.Stim.Levels.a = 'Indicates participant 12 and 19 are the same person';
pInfoDesc.Stim.Levels.b = 'Indicates participant 15 and 18 are the same person';
pInfoDesc.Stim.Levels.c = 'Indicates participant 21,25,and 26 are the same person';
pInfoDesc.Stim.Levels.d = 'Indicates participant 22,23,and 24 are the same person';
pInfoDesc.ParticipantNote.Description = 'General notes about repeated or excluded participants';
% event column description for xxx-events.json file (only one such file)
% ----------------------------------------------------------------------
eInfo ={'onset' 'latency';
'sample' 'latency';
'value' 'type'};
eInfoDesc.latency.Description = 'Event Latency';
eInfoDesc.onset.Units = 'seconds';
eInfoDesc.sample.Description = 'Event sample starting at time 0 (Matlab convention starting at 1)';
eInfoDesc.stim_file.Description = 'Event marker code: 2-Block Start, 16-Stimulation Start, 32-Stimulation Stop';
eInfoDesc.duration.Description = 'Event duration';
eInfoDesc.duration.Units = 'second';
% Content for README file
% -----------------------
README = sprintf( [ 'This tES/EEG/CTT/Vigilance experiment contains 19 unique participants (some repeated experiments).\n'...
'Over a 70 min period EEG/ECG/EOG were recorded concurrently with a CTT task\n' ...
'where participants maintained a ball at the center of the screen.\n'...
'and were periodically stimulated for 30 secs with combinations of 9 stimulation montages.\n'...
'For the raw data please see: https://zenodo.org/record/4456079 \n'...
'For methodological details please see corresponding article of the same name.\n\n'...
'- Nigel Gebodh (May 26th, 2021)' ]);
% Content for CHANGES file
% ------------------------
CHANGES = sprintf([ 'Revision history for GX dataset\n\n' ...
'version 1.0 beta - May 21st 2020\n' ...
' - Initial release\n' ...
'\n' ...
'version 2.0 - 9 Jan 2021\n' ...
' - Updated dataset to exclude info suggested by journal editors.\n' ...
'\n' ...
'Version 3.0 - 20 June 2021\n' ...
' - Add additional data formatting and more information.\n' ]);
% List of stimuli to be copied to the stimuli folder
% --------------------------------------------------
% For full list of stimuli please go to: https://zenodo.org/record/4456079 and
% follow links to latest Github repo.
stimuli = {};
% List of script to run the experiment
% ------------------------------------
% For full list of code please go to: https://zenodo.org/record/4456079 and
% follow links to latest Github repo.
code = {};
% Task information for xxxx-eeg.json file
% ---------------------------------------
tInfo.InstitutionAddress = 'Center for Discovery and Innovation, 85 St Nicholas Terrace, New York, NY 10031';
tInfo.InstitutionName = 'The City College of New York, CUNY';
tInfo.InstitutionalDepartmentName = 'Department of Biomedical Engineering';
tInfo.PowerLineFrequency = 60;
tInfo.ManufacturersModelName = 'ANT Neuro-eego Wavegaurd Cap, eego Amplifier, 32 EEG chans + 3 external(ECG/EOG/RESP), Ref Input Range: 150-1000 mV pp';
tInfo.TaskName = 'Compensatory Tracking Task (CTT)';
tInfo.EEGReference = 'CPz';
tInfo.EEGChannelCount =32;
tInfo.ECGChannelCount =1;
tInfo.EOGChannelCount =1;
% Trial types correspondance with event types/values
% BIDS allows for both trial types and event values
% --------------------------------------------------
trialTypes = { '2' 'Block Start';
'16' 'Stimulation Start';
'32' 'Stimulation Stop'};
% channel location file
% ---------------------
chanlocs = 'Standard-10-10-Cap33_V6_BIDS.loc';
% call to the export function
% ---------------------------
bids_export(data, 'targetdir', 'C:\Users\13474\Documents\Projects\GX\GX_Dataset', 'taskName', 'GXtESCTT', 'trialtype', trialTypes, 'gInfo', generalInfo, 'pInfo', pInfo, 'pInfoDesc', pInfoDesc, 'eInfoDesc', eInfoDesc, 'README', README, 'CHANGES', CHANGES, 'tInfo', tInfo,'chanlocs', chanlocs,'copydata',1);
%% END