init
This commit is contained in:
38
PDToolkit/@PDSettings/PDSettings.m
Normal file
38
PDToolkit/@PDSettings/PDSettings.m
Normal 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
|
31
PDToolkit/@PDSettings/load.m
Normal file
31
PDToolkit/@PDSettings/load.m
Normal 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
|
Reference in New Issue
Block a user