From 05f2529d233592aa96f151fefe79ca5a0792033a Mon Sep 17 00:00:00 2001 From: Bryan Roessler Date: Wed, 31 Jul 2024 20:53:26 -0400 Subject: [PATCH] Cleanhup some EASY code to remove rogue else --- workflow/apps/matlab/easy/EASYconsole.m | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/workflow/apps/matlab/easy/EASYconsole.m b/workflow/apps/matlab/easy/EASYconsole.m index d07d84c7..d03bf087 100644 --- a/workflow/apps/matlab/easy/EASYconsole.m +++ b/workflow/apps/matlab/easy/EASYconsole.m @@ -345,25 +345,12 @@ function LoadDatFile_Callback(~, ~, ~) % TODO this is pretty hacky and needs something more explicit if isfolder(fullfile(matDir, '..','..','1')) % If Inovation Vrobot Then - try - exist(pointMapsFile, 'file') - load(pointMapsFile); - catch - try - load(fullfile(easyPath,'NImParameters.mat')); % hardcoded default - catch - disp("Could not load the NImParameters.mat file") - end - end - else % If Epson 10Plate Scans Then> - if exist(fullfile(pointMapsResultsDir,'ImParameters.mat'), 'file') - load(fullfile(pointMapsResultsDir,'ImParameters.mat')); + if load(pointMapsFile); + elseif load(fullfile(easyPath,'NImParameters.mat')); % hardcoded default + elseif load(fullfile(pointMapsResultsDir,'ImParameters.mat')); + elseif load(fullfile(easyPath,'ImParameters.mat')); else - try - load(fullfile(easyPath,'ImParameters.mat')); - catch - disp("Could not load the ImParameters.mat file"); - end + disp("Could not load the ImParameters.mat file"); end else disp('WARNING: cannot find project scans');