From 8db8a078b8738fcc59586d33b5160b18018a814c Mon Sep 17 00:00:00 2001 From: Bryan Roessler Date: Fri, 26 Jul 2024 11:19:17 -0400 Subject: [PATCH] EASYconsole.m: Linting --- workflow/templates/easy/EASYconsole.m | 56 +++++++++++++-------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/workflow/templates/easy/EASYconsole.m b/workflow/templates/easy/EASYconsole.m index 7f256999..e9cbabfd 100644 --- a/workflow/templates/easy/EASYconsole.m +++ b/workflow/templates/easy/EASYconsole.m @@ -51,7 +51,7 @@ function varargout = EASYconsole(varargin) % Reimplementing here for stand-alone mode % While the easySuffix directory exists, increment by one and try again if exist(easySuffix, 'dir') - oldSuffix=easySuffix + oldSuffix=easySuffix; while exist(easySuffix, 'dir') count=1; easySuffix=strcat(oldSuffix,'.', num2str(count)); @@ -70,10 +70,10 @@ function varargout = EASYconsole(varargin) % Helpful variables for running in workflow mode that I'll probably have to reimplement in matlab anyways for standalone mode if exist('EASY_DIR','env') - EASY_DIR=fullfile(get_env('EASY_DIR')) + EASY_DIR=fullfile(get_env('EASY_DIR')); if easyDir ~= EASY_DIR % sanity check disp("WARNING: EASY_DIR does not match this script's default EASY location"); - easyDir=EASY_DIR + easyDir=EASY_DIR; end disp(strcat('Using EASY script directory: ', easyDir, ' from environment variable EASY_DIR')); else @@ -91,7 +91,7 @@ function varargout = EASYconsole(varargin) else easyResultsDirName=strcat('Results_',todayStr,'_',easySuffix); easyResultsDir=fullfile(scansDir,easyResultsDirName); - scansDir=fullfile(parent_dir,'ExpJobs') % relative to easy script dir + scansDir=fullfile(parent_dir,'ExpJobs'); % relative to easy script dir disp(strcat('Using project prefix: ', PROJECT_PREFIX, ' from environment variable PROJECT_PREFIX')) end @@ -155,7 +155,7 @@ function EASYconsole_OpeningFcn(hObject, ~, handles, varargin) global easyResultsDir % Choose default command line output for EASYconsole - handles.output = hObject; + handles.output=hObject; % Update handles structure guidata(hObject, handles); @@ -184,7 +184,7 @@ end % handles--structure with handles and user data (see GUIDATA) function varargout = EASYconsole_OutputFcn(~, ~, handles) % Get default command line output from handles structure - varargout{1} = handles.output; + varargout{1}=handles.output; end %% CONSOLE BUTTON INTERFACES %% @@ -242,18 +242,18 @@ function NewExpDat_Callback(~, ~, ~) % create supporting dirs % this is also in the workflow script but here for standalone mode - dirs = {'PrintResults', 'CFfigs', 'Fotos', 'Fotos/BkUp'}; - for i = 1:length(dirs) - d = dirs{i}; + dirs={'PrintResults', 'CFfigs', 'Fotos', 'Fotos/BkUp'}; + for i=1:length(dirs) + d=dirs{i}; if ~exist(fullfile(easyResultsDir, d), 'dir') mkdir(fullfile(easyResultsDir, d)); end end % templateDirs are stored in the easy template directory - templates = {'figs', 'PTmats'} - for i = 1:length(templates) - d = dirs{i}; + templates={'figs', 'PTmats'}; + for i=1:length(templates) + d=dirs{i}; if ~exist(fullfile(easyResultsDir, d), 'dir') copyfile((fullfile(easyDir,d)), (fullfile(easyResultsDir,d))); end @@ -290,11 +290,11 @@ function LoadDatFile_Callback(~, ~, ~) questdlg('\fontsize{20} Load file from ExpJobs/YourJob/YourResults/matResults','File Creation','OK', struct('Default','OK','Interpreter','tex')); [inputFile,inputPath]=uigetfile('.mat','Open Experiment folder and data storage .mat file name','MultiSelect','off'); SWnewExp=0; - matDir=fullfile(inputPath) + matDir=fullfile(inputPath); matFile=fullfile(inputPath,inputFile); load(matFile); - easyResultsDir=fullfile(matDir,'..') - scansDir=fullfile(matDir,'..', '..') + easyResultsDir=fullfile(matDir,'..'); + scansDir=fullfile(matDir,'..', '..'); if isfolder(fullfile(matDir, '..','..','1')) % If Inovation Vrobot Then if exist(fullfile(easyResultsDir,'PTmats','NImParameters.mat'), 'file') @@ -313,9 +313,9 @@ function LoadDatFile_Callback(~, ~, ~) mkdir(fullfile(matDir,'BkUp')); % Create supporting dirs - dirs = {'PrintResults', 'figs', 'CFfigs', 'PTmats', 'Fotos'} - for i = 1:length(dirs) - d = dirs{i} + dirs={'PrintResults', 'figs', 'CFfigs', 'PTmats', 'Fotos'} + for i=1:length(dirs) + d=dirs{i}; if ~exist(fullfile(easyResultsDir, d), 'dir') mkdir(fullfile(easyResultsDir, d)); end @@ -341,7 +341,7 @@ end function runPlateMapPintool_Callback(~, ~, ~) try NImapPT - catch ME + catch EASYconsole end end @@ -357,7 +357,7 @@ end function runPlateImAnal_Callback(~, ~, ~) try NImStartupOnly - catch ME + catch EASYconsole end end @@ -366,7 +366,7 @@ function PlateCFit_Callback(~, ~, ~) % global matFile % TODO BCR not sure if needed try NCstart - catch ME + catch end end @@ -380,7 +380,7 @@ function runDMPexcel_Callback(~, ~, ~) try % DMPexcel2mat_2024winLinix %DMPexcel2mat_2023winLinix DMPexcel2mat % TODO Can't find above so using what I have available - catch ME + catch EASYconsole end end @@ -402,7 +402,7 @@ function runOverlayPlots_Callback(~, ~, ~) try DoverlayPlots2 EASYconsole - catch ME + catch EASYconsole end end @@ -411,7 +411,7 @@ function runFotoStrip_Callback(~, ~, ~) try F_NImStartup_CentCir EASYconsole - catch ME + catch EASYconsole end end @@ -419,14 +419,14 @@ end function runDisplayFig_Callback(~, ~, ~) try UfigDisplay - catch ME + catch EASYconsole end end function runViewParameters_Callback(~, ~, ~) try - catch ME + catch EASYconsole end end @@ -434,7 +434,7 @@ end function QkviewN_Callback(~, ~, ~) try QkviewImages - catch ME + catch EASYconsole end end @@ -443,7 +443,7 @@ function CFdisplay_Callback(~, ~, ~) try NCsingleDisplay EASYconsole - catch ME + catch EASYconsole end end \ No newline at end of file