This commit is contained in:
Jan-Bernard Marsman
2018-06-12 14:49:55 +02:00
parent 1edacb997d
commit d2cf032fab
230 changed files with 3192360 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
classdef PDSettings
properties
%% how to calculate the baseline value
BaselineCorrection
BaselineCorrectionPercentile
%% what type
BaselineType
FilterSize
BlinkExtension
MaximumBlinkSize
QualityThreshold
Statistics
baseline = struct('start_pattern', [], 'end_pattern',[], 'dependencies',[]);
trial = struct('start_pattern', [], 'end_pattern',[], 'dependencies',[]);
stimulus = struct('start_pattern', [],'end_pattern',[], 'dependencies',[]);
labels = struct('pattern',[], 'dependency', [], 'name',[]);
baselinecorrection_types = {'None',...
'Average', ...
'Min', ...
'Percentile', ...
'Offset (fitted line)'};
dependencies = struct;
Logfile;
end
end

View File

@@ -0,0 +1,31 @@
function[obj] = load(obj, varargin)
%% Load settings from file
% this can be
% a) PDExperiment file (*_PDExp.mat)
% b) PDSettings file (*_PDSet.mat)
if nargin == 1
[fromfile fromdir]= uigetfile;
source = [fromdir filesep fromfile];
if (strfind(source,'_PDExp'))
exp_obj = load(source)
obj_tmp = exp_obj.e.settings;
if (strcmp(class(obj_tmp), 'PDSettings'))
obj = obj_tmp;
else
fields = fieldnames(obj_tmp);
for f = 1:length(fields)
obj.(fields{f}) = obj_tmp.(fields{f});
end
end
return
end
if (strfind(source, '_PDSet.mat'))
obj = load(source);
return
end
warning(sprintf('Could not load settings from file : %s', source));
end