From 790c4c6c62050d69898c0aa7840606e92d456fbe Mon Sep 17 00:00:00 2001 From: Thomas Friedrich Date: Thu, 19 Nov 2020 12:28:47 +0100 Subject: [PATCH 1/5] Add .gitignore file --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1e2baeb --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +Compiled +functions/startPath.txt +functions/datPath.txt From 1077e1d05ea463e9d8f8b4a1689a843b128265ff Mon Sep 17 00:00:00 2001 From: Thomas Friedrich Date: Thu, 19 Nov 2020 12:34:28 +0100 Subject: [PATCH 2/5] Remove necessity to manually set/unset compile-flag --- StatSTEM.m | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/StatSTEM.m b/StatSTEM.m index 2bc6f56..ad29409 100644 --- a/StatSTEM.m +++ b/StatSTEM.m @@ -16,19 +16,19 @@ function StatSTEM() % Contact: sandra.vanaert@uantwerpen.be %-------------------------------------------------------------------------- -forCompiling = 0; % Put to 1 when compiling - -% Load functions -path = mfilename('fullpath'); -path = path(1:end-9); -pathF = [path,filesep,'functions']; % Path for loading fit functions -pathG = [path,filesep,'GUI']; % Path for loading GUI functions -addpath([path,';',genpath(pathF),';',genpath(pathG)]) - % Start a splash screen -if forCompiling +if isdeployed splashImg = imread('splash.png'); + imgPan = imread('imgGui.png'); else + % Load functions + path = mfilename('fullpath'); + path = path(1:end-9); + pathF = [path,filesep,'functions']; % Path for loading fit functions + pathG = [path,filesep,'GUI']; % Path for loading GUI functions + + addpath([path,';',genpath(pathF),';',genpath(pathG)]) + imgPan = imread([pathG,filesep,'imgGui.png']); splashImg = imread([pathG,filesep,'splash.png']); spl = splash(splashImg); end @@ -70,21 +70,15 @@ function StatSTEM() warning('on','all') % Create left panels -h = panelMaker(h,'Preparation',forCompiling); -h = panelMaker(h,'Fit Model',forCompiling); -h = panelMaker(h,'Analysis',forCompiling); +h = panelMaker(h,'Preparation',isdeployed); +h = panelMaker(h,'Fit Model',isdeployed); +h = panelMaker(h,'Analysis',isdeployed); % Create panel for loading and storing files h.left.loadStore.panel = uipanel('Parent',h.left.main,'units','normalized','Position',[0 0 1 0.1],'Title','Load/save files','FontSize',10);%,'ShadowColor',[0.95 0.95 0.95],'ForegroundColor',[0.95 0.95 0.95],'HighlightColor',[0.95 0.95 0.95],'BackgroundColor',[0.95 0.95 0.95]); h.left.loadStore.load = uicontrol('Parent',h.left.loadStore.panel,'units','normalized','Position',[0.02 0.2 0.47 0.75],'String','Load','FontSize',10); h.left.loadStore.save = uicontrol('Parent',h.left.loadStore.panel,'units','normalized','Position',[0.49 0.2 0.47 0.75],'String','Save','FontSize',10,'Enable','off'); -% Create image of StatSTEM -if forCompiling - imgPan = imread('imgGui.png'); -else - imgPan = imread([pathG,filesep,'imgGui.png']); -end h = panelStatSTEM(h,imgPan); %% Create right panels @@ -156,7 +150,7 @@ function StatSTEM() % Limit minimum size and make window appear on full screen % set(h.fig,'Position',[1 1 screen(3) screen(4)]) set(h.fig,'Visible','on') -if ~forCompiling +if ~isdeployed close(spl) % Close splash window end waitfor(h.fig,'Visible','on') From 4085e3b739453537b1d6494464311663552d6819 Mon Sep 17 00:00:00 2001 From: Thomas Friedrich Date: Thu, 19 Nov 2020 12:35:04 +0100 Subject: [PATCH 3/5] Change default threshold value --- functions/PeakFinding/tfm_PeakFinder2.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/PeakFinding/tfm_PeakFinder2.m b/functions/PeakFinding/tfm_PeakFinder2.m index 6bd3a34..a83a2fb 100644 --- a/functions/PeakFinding/tfm_PeakFinder2.m +++ b/functions/PeakFinding/tfm_PeakFinder2.m @@ -23,7 +23,7 @@ obs = obj.obs; [ny,nx] = size(obs); - thr = 0; + thr = 0.05; sigma = 10; d_min = 0; From 5c05fa747b161a042839311573f2a17ec3883d9f Mon Sep 17 00:00:00 2001 From: Thomas Friedrich Date: Thu, 19 Nov 2020 13:49:57 +0100 Subject: [PATCH 4/5] Remove user/system specific path-files --- functions/datPath.txt | 1 - functions/startPath.txt | 1 - 2 files changed, 2 deletions(-) delete mode 100644 functions/datPath.txt delete mode 100644 functions/startPath.txt diff --git a/functions/datPath.txt b/functions/datPath.txt deleted file mode 100644 index 2cc40fe..0000000 --- a/functions/datPath.txt +++ /dev/null @@ -1 +0,0 @@ -D:\OneDrive - Universiteit Antwerpen\Documents\MATLAB\StatSTEM-master_new\StatSTEM-master\Database\ \ No newline at end of file diff --git a/functions/startPath.txt b/functions/startPath.txt deleted file mode 100644 index f55ba2d..0000000 --- a/functions/startPath.txt +++ /dev/null @@ -1 +0,0 @@ -D:\OneDrive - Universiteit Antwerpen\Documents\MATLAB\StatSTEM-master_new\StatSTEM-master\Examples\ \ No newline at end of file From 4870d6774af2e831e6a71addd9e99e81a00757c5 Mon Sep 17 00:00:00 2001 From: Thomas Friedrich Date: Thu, 19 Nov 2020 13:50:51 +0100 Subject: [PATCH 5/5] Bugfix --- functions/Analysis/Indexing/STEMindexing.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/Analysis/Indexing/STEMindexing.m b/functions/Analysis/Indexing/STEMindexing.m index 9f4f730..d2cb5cb 100644 --- a/functions/Analysis/Indexing/STEMindexing.m +++ b/functions/Analysis/Indexing/STEMindexing.m @@ -49,7 +49,7 @@ if ind~=1 unitCoor = [unitCoor(ind,:); unitCoor(1:ind-1,:); unitCoor(ind+1:end,:)]; unit.coor2D = [unit.coor2D(ind,:); unit.coor2D(1:ind-1,:); unit.coor2D(ind+1:end,:)]; - unit.atom2D = [unit.atom2D(ind,:); unit.atomsD(1:ind-1,:); unit.atom2D(ind+1:end,:)]; + unit.atom2D = [unit.atom2D(ind,:); unit.atom2D(1:ind-1,:); unit.atom2D(ind+1:end,:)]; unitType = [unitType(ind,:); unitType(1:ind-1,:); unitType(ind+1:end,:)]; end else