Hello Francois,
I made a script to do block averaging. I first import the block in the database and mark the trial as bad depending on some criteria I have. This is working. However, when I then call baseline normalization. it's also considering the bad trials and not only the good ones. Is there something I am missing?
sTrials = bst_process('CallProcess', 'process_import_data_event', files, , ...
'subjectname', sub_name{:}, ...
'condition', '', ...
'eventname', 'Hard, Easy', ...
'timewindow', , ...
'epochtime', t_windows, ...
'createcond', 0, ...
'ignoreshort', 0, ...
'usectfcomp', 0, ...
'usessp', 0, ...
'freq', , ...
'baseline', );for iTrial = 1:length(sTrials) process_detectbad('SetTrialStatus', sTrials(iTrial).FileName, ~trial_status(iTrial)); end % Process: DC offset correction: [-10.000s,0.000s] sTrialsNorm = bst_process('CallProcess', 'process_baseline_norm', sTrials, [], ... 'baseline', t_baseline, ... 'sensortypes', 'NIRS', ... 'method', 'bl', ... % DC offset correction: x_std = x - μ 'overwrite', 0);% here sTrialsNorm also contains bad trials
Regards,
Edouard
. That'd probably be a good end solution. Not sure I'll be able to get to it in the near-term
.