-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSRMR1_02_eeg_prepro.m
executable file
·59 lines (44 loc) · 1.77 KB
/
SRMR1_02_eeg_prepro.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
% Author: Birgit Nierula
%% EEG preprocessing wrapper script
clear; clc
delete(gcp('nocreate')) % clear parallel pool
%% variables that need to be changed
% loop
loop_number = 1
disp(['loop number = ' num2str(loop_number)])
% subject, condition, and block info
subject_idx = 1:36;
condition_idx = 2:3;
% ica info
chan_name = 'C4';
iso_latency = [20 39]; % latency of isopotnetial plots to stimulus
display_time = 2; % duration (in seconds) the continuous raw and ica data of one channel are displayed on the screen
%% define variables and paths
% experiment
srmr_nr = 1;
% conditions
conditions = 1:3;
% subjects
subjects = 1:36;
% set paths
datadir = '/data/p_02068/SRMR1_experiment/analyzed_data/';
anadir = '/data/pt_02068/analysis/';
bidsdir = '/data/p_02068/SRMR1_experiment/bids/';
setenv('CFGDIR', [anadir 'manuscript_sep/scripts/cfg_srmr1/'])
setenv('RAWDIR', bidsdir) % here is the raw data
setenv('RPKDIR', [datadir 'Rpeak_detected/']) % here R-peak detected data (holds only ECG channel and trigger info)
setenv('ANADIR', [anadir 'final/tmp_data/']) % analysis directory
setenv('EEGDIR', [datadir 'prepro_eeg_icaclean/'])
setenv('ZIMDIR', '/data/pt_02068/doc/LabBook_SRMR1/SRMR1/EXPERIMENT/preprocessing_EEG/');
% settings for figures
set(0, 'DefaulttextInterpreter', 'none')
% add toolboxes and other sources for scripts
addpath('/data/pt_02068/toolboxes/eeglab2019_1/') % eeglab toolbox
eeglab % start eeglab and close guiclear
close
% all scripts for shks are lying here (for both srmr experiments)
functions_path = '/data/pt_02068/analysis/manuscript_sep/scripts/functions/';
addpath(genpath(functions_path)) % scripts
eeg_preprocessing_loops(srmr_nr, loop_number, subjects, conditions, ...
subject_idx, condition_idx, chan_name, display_time, iso_latency)