22 lines
587 B
Matlab
22 lines
587 B
Matlab
function[obj] = preprocess(obj, settings)
|
|
|
|
if strcmp(settings.Preprocessing.Type, 'trial')
|
|
|
|
for t = 1:length(obj.trials)
|
|
obj.trials(t) = obj.trials(t).preprocess(settings);
|
|
end
|
|
else
|
|
%% Session based preprocessing
|
|
obj = obj.remove_blinks(settings);
|
|
|
|
% Smooth the data
|
|
obj = obj.smooth(settings);
|
|
|
|
% Calculate logtransformed data
|
|
obj = obj.logtransform;
|
|
|
|
for t = 1:length(obj.trials)
|
|
obj.trials(t) = obj.trials(t).correct_for_baseline(settings);
|
|
obj.trials(t) = obj.trials(t).calculate_statistics;
|
|
end
|
|
end |