Minor corrections in documentation and function names

This commit is contained in:
sakul-45 2021-07-07 22:39:19 +02:00
parent f660db6d96
commit e8fa1adfa7

View File

@ -4,8 +4,8 @@ function [dataOUT] = correct_time_baseline(dataIN)
% Usage: [dataOUT] = CORRECT_TIME_BASELINE(dataIN), where dataIN is a % Usage: [dataOUT] = CORRECT_TIME_BASELINE(dataIN), where dataIN is a
% dataset loaded via the LOAD_MATLAB or LOAD_BRUKER function. % dataset loaded via the LOAD_MATLAB or LOAD_BRUKER function.
% %
% The function will show the raw data and offer an input field, where the % The function will show the input data and offer an input field, where
% number of pretrigger points should be set. By pressing "Apply" the % the number of pretrigger points should be set. By pressing "Apply" the
% correction will be executed and the graph changes to the corrected data. % correction will be executed and the graph changes to the corrected data.
% By pressing "Reset" the graph will return to show the original data. % By pressing "Reset" the graph will return to show the original data.
% Exit the function by pressing "Done". % Exit the function by pressing "Done".
@ -37,7 +37,7 @@ a.Position = [.52 .01 .15 .05];
a.FontUnits = 'Normalized'; a.FontUnits = 'Normalized';
a.FontSize = 0.6; a.FontSize = 0.6;
a.Tag = 'Apply'; a.Tag = 'Apply';
a.Callback = @ApplyButtonPushed; a.Callback = @TimeApplyButtonPushed;
r = uicontrol(fig,'Style','pushbutton'); r = uicontrol(fig,'Style','pushbutton');
r.String = 'Reset'; r.String = 'Reset';
@ -46,7 +46,7 @@ r.Position = [.68 .01 .15 .05];
r.FontUnits = 'Normalized'; r.FontUnits = 'Normalized';
r.FontSize = 0.6; r.FontSize = 0.6;
r.Tag = 'Reset'; r.Tag = 'Reset';
r.Callback = @ResetButtonPushed; r.Callback = @TimeResetButtonPushed;
d = uicontrol(fig,'Style','pushbutton'); d = uicontrol(fig,'Style','pushbutton');
d.String = 'Done'; d.String = 'Done';
@ -55,7 +55,7 @@ d.Position = [.84 .01 .15 .05];
d.FontUnits = 'Normalized'; d.FontUnits = 'Normalized';
d.FontSize = 0.6; d.FontSize = 0.6;
d.Tag = 'Done'; d.Tag = 'Done';
d.Callback = @DoneButtonPushed; d.Callback = @TimeDoneButtonPushed;
%create input field %create input field
inp = uicontrol(fig,'Style','edit'); inp = uicontrol(fig,'Style','edit');
@ -70,7 +70,7 @@ uicontrol(inp); %passes focus to input
uiwait(fig) uiwait(fig)
%% Callback functions %% Callback functions
function ApplyButtonPushed(src,event) function TimeApplyButtonPushed(src,event)
pretrigger = str2double(get(inp,'String')); pretrigger = str2double(get(inp,'String'));
%timeline CORRECTING %timeline CORRECTING
data_size = size(dataIN); data_size = size(dataIN);
@ -84,12 +84,12 @@ uiwait(fig)
axis tight axis tight
end end
function ResetButtonPushed(src,event) function TimeResetButtonPushed(src,event)
plot(ax,dataIN) plot(ax,dataIN)
axis tight axis tight
end end
function DoneButtonPushed(src,event) function TimeDoneButtonPushed(src,event)
close 'Correct Time Baseline' close 'Correct Time Baseline'
end end