-
Notifications
You must be signed in to change notification settings - Fork 0
/
visual_inspect_data.m
41 lines (28 loc) · 1.04 KB
/
visual_inspect_data.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
function [] = visual_inspect_data(experiment, participant, file, filter_boolean, continuous, channels)
cfg = initialize_participant_cfg(experiment, participant);
if strcmp(file, 'raw')
cfg.dataset = [cfg.subjectdir cfg.subjectstr '.bdf'];
data = ft_preprocessing(cfg);
cfg = rmfield(cfg, 'dataset');
else
cfg.inputfile = cfg.files.(file);
data = ft_preprocessing(cfg);
cfg = rmfield(cfg, 'inputfile');
end
if filter_boolean == 1
cfg.preproc.lpfilter = 'yes';
cfg.preproc.lpfreq = 30;
cfg.preproc.hpfilter = 'yes';
cfg.preproc.hpfreq = 1;
end
cfg.channel = channels;
if (continuous)
cfg.continuous = 'yes';
cfg.blocksize = 20; %seconds
else
cfg.continuous = 'no';
end
cfg.ylim = [-17 17];
cfg.viewmode = 'vertical';
ft_databrowser(cfg,data);
end