-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSRMR1_02_esg_prepro.m~
71 lines (54 loc) · 1.92 KB
/
SRMR1_02_esg_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
60
61
62
63
64
65
66
67
68
69
70
% Author: Birgit Nierula
%% SRMR1: ESG preprocessing - wrapper script
clear; clc
%% variables that need to be changed
% loop
for loop_number = 1:2
% subject index
subject_idx = [];
%% define variables and paths
% experiment
srmr_nr = 1;
% conditions
if loop_number < 3
conditions = 1:3;
else
conditions = 2:3;
end
% subjects
subjects = 1:36;
if ~isempty(subject_idx)
new_subjects = subjects(subject_idx);
else
new_subjects = subjects;
end
subjects = new_subjects
% sampling rate
sampling_rate = 1000;
% set paths
datadir = '/data/p_02068/SRMR1_experiment/analyzed_data/';
anadir = '/data/pt_02068/analysis/final/';
bidsdir = '/data/p_02068/SRMR1_experiment/bids/';
setenv('CFGDIR', '/data/pt_02068/analysis/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 'tmp_data/']) % analysis directory
setenv('ESGDIR', [datadir 'esg/']);
setenv('EEGDIR', [datadir 'prepro_eeg_icaclean/'])
setenv('BSDIR', [datadir 'bs/']);
setenv('OTHERDIR', [datadir 'other/']);
setenv('ZIMDIR', '/data/pt_02068/doc/LabBook_SRMR1/SRMR1/EXPERIMENT/preprocessing_ESG/');
% settings for figures
set(0, 'DefaulttextInterpreter', 'none')
% add toolboxes and other sources for scripts
addpath('/data/pt_02068/toolboxes/eeglab14_1_2b/') % eeglab toolbox
eeglab % start eeglab and close gui
close
% scripts
functions_path = '/data/pt_02068/analysis/manuscript_sep/scripts/functions/';
addpath(genpath(functions_path)) % scripts
delete(gcp('nocreate')) % clear parallel pool
%% preprocessing loops
esg_preprocessing_loops(loop_number, subjects, conditions, srmr_nr, sampling_rate)
end