-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSRMR2_02_bs_prepro.m
executable file
·65 lines (47 loc) · 1.67 KB
/
SRMR2_02_bs_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
% Author: Birgit Nierula
%% brainstem preprocessing wrapper script
clear; clc
delete(gcp('nocreate')) % clear parallel pool
%% variables that need to be changed
% loop
loop_number = 2
% subject, condition, and block info
subject_idx = [];
condition_idx = [];
%% define variables and paths
% experiment
srmr_nr = 2;
% conditions
conditions = 2:5;
if ~isempty(condition_idx)
conditions = conditions(condition_idx);
end
% subjects
subjects = 1:24;
if ~isempty(subject_idx)
subjects = subjects(subject_idx);
end
subjects
% set paths
datadir = '/data/p_02151/SRMR2_experiment/analyzed_data/';
anadir = '/data/pt_02151/analysis/';
bidsdir = '/data/p_02151/SRMR2_experiment/bids/';
setenv('CFGDIR', [anadir 'manuscript_sep/scripts/cfg_srmr2/'])
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('ESGDIR', [datadir 'esg/']);
setenv('BSDIR', [datadir 'bs/']);
setenv('ZIMDIR', '/data/pt_02151/doc/LabBook_SRMR2/EXPERIMENT/preprocessing_brainstem/');
% 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
bs_preprocessing_loops(srmr_nr, loop_number, subjects, conditions)