-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd68e3b
commit cf63fc2
Showing
4 changed files
with
371 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
%Copyright © 2018- Sampsa Pursiainen & ZI Development Team | ||
%See: https://github.com/sampsapursiainen/zeffiro_interface | ||
function zef = zef_topography(zef) | ||
|
||
if nargin == 0 | ||
zef = evalin('base','zef'); | ||
end | ||
|
||
zef_topography_app; | ||
|
||
set(zef.h_topography,'Name','ZEFFIRO Interface: Topography tool'); | ||
set(findobj(zef.h_topography.Children,'-property','FontUnits'),'FontUnits','pixels') | ||
set(findobj(zef.h_topography.Children,'-property','FontSize'),'FontSize',9); | ||
zef_init_topography; | ||
if isfield(zef,'measurements') | ||
if iscell(zef.measurements) | ||
set(zef.h_top_data_segment,'enable','on'); | ||
end | ||
if not(iscell(zef.measurements)) | ||
set(zef.h_top_data_segment,'enable','off'); | ||
end | ||
end | ||
uistack(flipud([zef.h_top_regularization_parameter ; zef.h_top_sampling_frequency ; zef.h_top_low_cut_frequency ; | ||
zef.h_top_high_cut_frequency ; zef.h_top_time_1 ; zef.h_top_time_2; zef.h_top_number_of_frames; zef.h_top_time_3; zef.h_top_data_segment ; zef.h_top_cancel ; zef.h_top_normalize_data; | ||
zef.h_top_apply; zef.h_top_start ]),'top'); | ||
|
||
if nargout == 0 | ||
assignin('base','zef',zef); | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,337 @@ | ||
|
||
h1 = figure(... | ||
'PaperUnits',get(0,'defaultfigurePaperUnits'),... | ||
'Units','normalized',... | ||
'Position',[0.4325 0.754529914529915 0.184722222222222 0.271111111111111],... | ||
'Visible',get(0,'defaultfigureVisible'),... | ||
'Color',get(0,'defaultfigureColor'),... | ||
'IntegerHandle','off',... | ||
'Colormap',[0 0 0.5625;0 0 0.625;0 0 0.6875;0 0 0.75;0 0 0.8125;0 0 0.875;0 0 0.9375;0 0 1;0 0.0625 1;0 0.125 1;0 0.1875 1;0 0.25 1;0 0.3125 1;0 0.375 1;0 0.4375 1;0 0.5 1;0 0.5625 1;0 0.625 1;0 0.6875 1;0 0.75 1;0 0.8125 1;0 0.875 1;0 0.9375 1;0 1 1;0.0625 1 1;0.125 1 0.9375;0.1875 1 0.875;0.25 1 0.8125;0.3125 1 0.75;0.375 1 0.6875;0.4375 1 0.625;0.5 1 0.5625;0.5625 1 0.5;0.625 1 0.4375;0.6875 1 0.375;0.75 1 0.3125;0.8125 1 0.25;0.875 1 0.1875;0.9375 1 0.125;1 1 0.0625;1 1 0;1 0.9375 0;1 0.875 0;1 0.8125 0;1 0.75 0;1 0.6875 0;1 0.625 0;1 0.5625 0;1 0.5 0;1 0.4375 0;1 0.375 0;1 0.3125 0;1 0.25 0;1 0.1875 0;1 0.125 0;1 0.0625 0;1 0 0;0.9375 0 0;0.875 0 0;0.8125 0 0;0.75 0 0;0.6875 0 0;0.625 0 0;0.5625 0 0],... | ||
'MenuBar','none',... | ||
'ToolBar','none',... | ||
'Name','ZEFFIRO Interface: Topography tool',... | ||
'NumberTitle','off',... | ||
'HandleVisibility','off',... | ||
'Tag','figure1',... | ||
'UserData',[],... | ||
'Resize',get(0,'defaultfigureResize'),... | ||
'PaperPosition',get(0,'defaultfigurePaperPosition'),... | ||
'PaperSize',[20.99999864 29.69999902],... | ||
'PaperType',get(0,'defaultfigurePaperType'),... | ||
'InvertHardcopy',get(0,'defaultfigureInvertHardcopy'),... | ||
'ScreenPixelsPerInchMode','manual',... | ||
'CreateFcn', '' ); | ||
|
||
zef.h_topography = h1; | ||
|
||
% Regularization parameter | ||
h21 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','left',... | ||
'ListboxTop',0,... | ||
'String','Regularization parameter:',... | ||
'Style','text',... | ||
'Position',[0.0375 0.88 0.4699 0.0656],... | ||
'FontSize',0.4432); | ||
|
||
h31 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','right',... | ||
'ListboxTop',0,... | ||
'String','5',... | ||
'Style','edit',... | ||
'Position',[0.7857 0.88 0.1805 0.0738],... | ||
'BackgroundColor',[1 1 1],... | ||
'Callback','zef.top_regularization_parameter = str2num(get(gcbo,''string''));',... | ||
'FontSize',0.3978); | ||
|
||
zef.h_top_regularization_parameter = h31; | ||
|
||
% Sampling frequency | ||
h2 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','left',... | ||
'ListboxTop',0,... | ||
'String','Sampling frequency (Hz):',... | ||
'Style','text',... | ||
'Position',[0.0375 0.80 0.4699 0.0656],... | ||
'FontSize',0.4432); | ||
|
||
h3 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','right',... | ||
'ListboxTop',0,... | ||
'String','20000',... | ||
'Style','edit',... | ||
'Position',[0.7857 0.80 0.1805 0.0738],... | ||
'BackgroundColor',[1 1 1],... | ||
'Callback','zef.top_sampling_frequency = str2num(get(gcbo,''string''));',... | ||
'FontSize',0.3978); | ||
|
||
zef.h_top_sampling_frequency = h3; | ||
|
||
% Low-cut frequency | ||
h4 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','left',... | ||
'ListboxTop',0,... | ||
'String','Low-cut frequency (Hz):',... | ||
'Style','text',... | ||
'Position',[0.0375 0.72 0.4699 0.0656],... | ||
'FontSize',0.4432); | ||
|
||
h5 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','right',... | ||
'ListboxTop',0,... | ||
'String','0',... | ||
'Style','edit',... | ||
'Position',[0.7857 0.72 0.1805 0.0738],... | ||
'BackgroundColor',[1 1 1],... | ||
'Callback','zef.top_low_cut_frequency = str2num(get(gcbo,''string''));',... | ||
'FontSize',0.3978); | ||
|
||
zef.h_top_low_cut_frequency = h5; | ||
|
||
% High-cut frequency | ||
h6 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','left',... | ||
'ListboxTop',0,... | ||
'String','High-cut frequency (Hz):',... | ||
'Style','text',... | ||
'Position',[0.0375 0.64 0.4699 0.0656],... | ||
'FontSize',0.4432); | ||
|
||
h7 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','right',... | ||
'ListboxTop',0,... | ||
'String','0',... | ||
'Style','edit',... | ||
'Position',[0.7857 0.64 0.1805 0.0738],... | ||
'BackgroundColor',[1 1 1],... | ||
'Callback','zef.top_high_cut_frequency = str2num(get(gcbo,''string''));',... | ||
'FontSize',0.3978); | ||
|
||
zef.h_top_high_cut_frequency = h7; | ||
|
||
% Time interval start | ||
h13 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','left',... | ||
'ListboxTop',0,... | ||
'String','Time interval start (s):',... | ||
'Style','text',... | ||
'Position',[0.0375 0.56 0.4699 0.0656],... | ||
'FontSize',0.4432); | ||
|
||
h14 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','right',... | ||
'ListboxTop',0,... | ||
'String','0',... | ||
'Style','edit',... | ||
'Position',[0.7857 0.56 0.1805 0.0738],... | ||
'BackgroundColor',[1 1 1],... | ||
'Callback','zef.top_time_1 = str2num(get(gcbo,''string''));',... | ||
'FontSize',0.3978); | ||
|
||
zef.h_top_time_1 = h14; | ||
|
||
% Time window | ||
h15 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','left',... | ||
'ListboxTop',0,... | ||
'String','Time window (s):',... | ||
'Style','text',... | ||
'Position',[0.0375 0.48 0.4699 0.0656],... | ||
'FontSize',0.4432); | ||
|
||
h16 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','right',... | ||
'ListboxTop',0,... | ||
'String','0',... | ||
'Style','edit',... | ||
'Position',[0.7857 0.48 0.1805 0.0738],... | ||
'BackgroundColor',[1 1 1],... | ||
'Callback','zef.top_time_2 = str2num(get(gcbo,''string''));',... | ||
'FontSize',0.3978); | ||
|
||
zef.h_top_time_2 = h16; | ||
|
||
% Number of time steps | ||
h22 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','left',... | ||
'ListboxTop',0,... | ||
'String','Number of time steps:',... | ||
'Style','text',... | ||
'Position',[0.0375 0.40 0.4699 0.0656],... | ||
'FontSize',0.4432); | ||
|
||
h32 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','right',... | ||
'ListboxTop',0,... | ||
'String','40',... | ||
'Style','edit',... | ||
'Position',[0.7857 0.40 0.1805 0.0738],... | ||
'BackgroundColor',[1 1 1],... | ||
'Callback','zef.top_number_of_frames = str2num(get(gcbo,''string''));',... | ||
'FontSize',0.3978); | ||
|
||
zef.h_top_number_of_frames = h32; | ||
|
||
% Time step | ||
h151 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','left',... | ||
'ListboxTop',0,... | ||
'String','Time step (s):',... | ||
'Style','text',... | ||
'Position',[0.0375 0.32 0.4699 0.0656],... | ||
'FontSize',0.4432); | ||
|
||
h161 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','right',... | ||
'ListboxTop',0,... | ||
'String','7.25e-05',... | ||
'Style','edit',... | ||
'Position',[0.7857 0.32 0.1805 0.0738],... | ||
'BackgroundColor',[1 1 1],... | ||
'Callback','zef.top_time_3 = str2num(get(gcbo,''string''));',... | ||
'FontSize',0.3978); | ||
|
||
zef.h_top_time_3 = h161; | ||
|
||
% Data segment | ||
h17 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','left',... | ||
'ListboxTop',0,... | ||
'String','Data segment:',... | ||
'Style','text',... | ||
'Position',[0.0375 0.24 0.4699 0.0656],... | ||
'FontSize',0.4432); | ||
|
||
h18 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','right',... | ||
'ListboxTop',0,... | ||
'String','1',... | ||
'Style','edit',... | ||
'Position',[0.7857 0.24 0.1805 0.0738],... | ||
'BackgroundColor',[1 1 1],... | ||
'Callback','zef.top_data_segment = str2num(get(gcbo,''string''));',... | ||
'FontSize',0.3978); | ||
|
||
zef.h_top_data_segment = h18; | ||
|
||
% Data normalization | ||
h11 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'HorizontalAlignment','left',... | ||
'ListboxTop',0,... | ||
'String','Data normalization:',... | ||
'Style','text',... | ||
'Position',[0.0375 0.16 0.4699 0.0656],... | ||
'FontSize',0.4432); | ||
|
||
h12 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'String',{ 'Maximum entry'; 'Maximum column norm'; 'Average column norm'; 'None' },... | ||
'Style','popupmenu',... | ||
'Position',[0.5714 0.16 0.4023 0.0738],... | ||
'BackgroundColor',[1 1 1],... | ||
'Callback','zef.top_normalize_data = get(gcbo,''value'');',... | ||
'FontSize',0.3978); | ||
|
||
zef.h_top_normalize_data = h12; | ||
|
||
|
||
|
||
h9 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'String','Close',... | ||
'Position',[0.05 0.05 0.15 0.1],... | ||
'Callback','close(zef.h_topography);',... | ||
'Children',[],... | ||
'CreateFcn', '',... | ||
'Tag','pushbutton13',... | ||
'FontSize',0.28); | ||
|
||
zef.h_top_cancel = h9; | ||
|
||
h10 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'String','Apply',... | ||
'Position',[0.23 0.05 0.15 0.1],... | ||
'Callback','zef_update_topography;',... | ||
'Children',[],... | ||
'CreateFcn', '',... | ||
'Tag','pushbutton14',... | ||
'FontSize',0.28); | ||
|
||
zef.h_top_apply = h10; | ||
|
||
h8 = uicontrol(... | ||
'Parent',h1,... | ||
'Units','normalized',... | ||
'FontUnits','normalized',... | ||
'String','Start',... | ||
'Position',[0.41 0.05 0.15 0.1],... | ||
'Callback','zef_update_topography; zef.top_reconstruction = zef_evaluate_topography(zef);',... | ||
'Children',[],... | ||
'CreateFcn', '',... | ||
'Tag','pushbutton12',... | ||
'FontSize',0.28); | ||
|
||
zef.h_top_start = h8; |