Added trimming of rims
This commit is contained in:
parent
ea0e8256d5
commit
6aa126fdc3
@ -59,22 +59,35 @@ d.FontSize = 0.6;
|
|||||||
d.Tag = 'Done';
|
d.Tag = 'Done';
|
||||||
d.Callback = @FieldDoneButtonPushed;
|
d.Callback = @FieldDoneButtonPushed;
|
||||||
|
|
||||||
%create input field
|
%create input fields
|
||||||
p = uicontrol(fig,'Style','edit');
|
p1 = uicontrol(fig,'Style','edit');
|
||||||
p.String = 'No. points baseline';
|
p1.String = 'No. points baseline';
|
||||||
p.Units = 'Normalized';
|
p1.Units = 'Normalized';
|
||||||
p.Position = [.01 .01 .5 .05];
|
p1.Position = [.01 .01 .24 .05];
|
||||||
p.HorizontalAlignment = 'left';
|
p1.HorizontalAlignment = 'left';
|
||||||
p.FontUnits = 'Normalized';
|
p1.FontUnits = 'Normalized';
|
||||||
p.FontSize = 0.6;
|
p1.FontSize = 0.6;
|
||||||
p.Tag = 'FieldPoints';
|
p1.Tag = 'FieldPoints';
|
||||||
|
|
||||||
uicontrol(p); %passes focus to input
|
p2 = uicontrol(fig,'Style','edit');
|
||||||
|
p2.String = 'No. points to cut';
|
||||||
|
p2.Units = 'Normalized';
|
||||||
|
p2.Position = [.26 .01 .24 .05];
|
||||||
|
p2.HorizontalAlignment = 'left';
|
||||||
|
p2.FontUnits = 'Normalized';
|
||||||
|
p2.FontSize = 0.6;
|
||||||
|
p2.Tag = 'FieldPoints';
|
||||||
|
|
||||||
|
uicontrol(p1); %passes focus to input
|
||||||
uiwait(fig)
|
uiwait(fig)
|
||||||
|
|
||||||
%% Callback functions
|
%% Callback functions
|
||||||
function FieldApplyButtonPushed(src,event)
|
function FieldApplyButtonPushed(src,event)
|
||||||
field_baseline = str2double(get(p,'String'));
|
field_baseline = str2double(get(p1,'String'));
|
||||||
|
field_cut = str2double(get(p2,'String'));
|
||||||
|
%field baseline CUTTING
|
||||||
|
dataIN(:,1:field_cut) = [];
|
||||||
|
dataIN(:,end-field_cut:end) = [];
|
||||||
%field baseline CORRECTING
|
%field baseline CORRECTING
|
||||||
data_size = size(dataIN);
|
data_size = size(dataIN);
|
||||||
dataOUT = zeros(data_size);
|
dataOUT = zeros(data_size);
|
||||||
@ -89,6 +102,7 @@ uiwait(fig)
|
|||||||
plot(ax,dataOUT_transp)
|
plot(ax,dataOUT_transp)
|
||||||
axis tight
|
axis tight
|
||||||
%writing parameter
|
%writing parameter
|
||||||
|
params.No_field_cut_pts = field_cut;
|
||||||
params.No_field_basline_pts = field_baseline;
|
params.No_field_basline_pts = field_baseline;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user