46 lines
1.4 KiB
Matlab
46 lines
1.4 KiB
Matlab
function[obj] = askForBaseline(obj)
|
|
|
|
bl_types = {'None',...
|
|
'Average', ...
|
|
'Min', ...
|
|
'Lowest n% average', ...
|
|
'Offset (fitted line)',...
|
|
'Fixed point'};
|
|
|
|
np_types = [10 15 20 25 50];
|
|
np_labels= {'10%',...
|
|
'15%', ...
|
|
'20%', ...
|
|
'25%', ...
|
|
'50%',...
|
|
'Other'};
|
|
|
|
[s,OkClicked] = listdlg('PromptString','Select a baseline correction:',...
|
|
'SelectionMode','single',...
|
|
'ListString',bl_types, 'ListSize', [150 75]);
|
|
|
|
if OkClicked
|
|
if (s == 4)
|
|
[s2,OkClicked] = listdlg('PromptString','Select a percentile:',...
|
|
'SelectionMode','single',...
|
|
'ListString',np_labels, 'ListSize', [150 75]);
|
|
|
|
if (s2 == 6)
|
|
wrong_answer =1;
|
|
while wrong_answer
|
|
line = inputdlg({'Other percentile :'}, 'Percentile', 1, {'25'});
|
|
answer = str2num(line{1});
|
|
wrong_answer = ~((answer > 0) && (answer < 100));
|
|
end
|
|
percentile = answer;
|
|
else
|
|
percentile = np_types(s2);
|
|
end
|
|
|
|
obj.settings.BaselineCorrection = [s-1 percentile];
|
|
else
|
|
obj.settings.BaselineCorrection = [s-1];
|
|
end
|
|
end
|
|
|