42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
%% define a new subject
|
|
s(1) = PDSubject('/Users/marsman/Documents/Werk/NIC/Teaching/Studenten/Nora_Parigi/data/Subject 5');
|
|
s(2) = PDSubject('/Users/marsman/Documents/Werk/NIC/Teaching/Studenten/Nora_Parigi/data/Subject 4')
|
|
%% load data
|
|
|
|
s(1) = s(1).loadData();
|
|
s(2) = s(2).loadData();
|
|
|
|
|
|
%% define trial markers
|
|
s = s.setPattern('trial start', 'Fixation6s starting');
|
|
s = s.setPatternRelativeToPattern('trial start', 'trial end', +10.5e3); % dependency of trial_start
|
|
|
|
%s = s.setPattern('trial end', 'Fixation15s starting');
|
|
s = s.setPattern('stimulus onset', 'Stimulus Presentation');
|
|
s = s.setPattern('stimulus offset', 'Fixation15s ending');
|
|
|
|
s = s.setLabel('information', 'Valence %s');
|
|
s = s.setLabel('information', 'TRIAL_VAR stim %s');
|
|
|
|
% s = s.setPattern('baseline start');
|
|
% s = s.setPattern('baseline end');
|
|
|
|
%% parse trials
|
|
s = s.rebuild;
|
|
|
|
|
|
% baseline is defined based on minimum value for baseline signal
|
|
|
|
e = PDExperiment(s, 'Min');
|
|
|
|
% baseline is defined based on average value for baseline signal
|
|
% e = PDExperiment(s, 'Average');
|
|
|
|
% calculate baseline corrected and filtered signals
|
|
e = PDExperiment(s, 'Average');
|
|
e = e.preprocess();
|
|
|
|
|
|
plot(e); %% plot trials of the experiment
|
|
|
|
e = build_averages(e); |