EASY refactor: First attempt

This commit is contained in:
2024-07-27 02:58:49 -04:00
parent 5269962927
commit bce30095aa
11 changed files with 340 additions and 301 deletions

View File

@@ -1,5 +1,5 @@
%% CALLED WHEN ACCESSING 'CurveFit Display' %%
function [scLst, row, col] = NCdisplayGui(eDir) %(ExpPath)
function [scLst, row, col] = NCdisplayGui(scansDir)
xPos=0.05;
btnWid=0.10;
btnHt=0.05;
@@ -49,7 +49,7 @@ function [scLst, row, col] = NCdisplayGui(eDir) %(ExpPath)
end
% Read in numeric folder names
nlist=dir(fullfile(eDir,'*')); %(ExpPath,'*'));
nlist=dir(fullfile(scansDir,'*'));
nnn=0;
for n=1:size(nlist,1)
if (~isempty(str2num(nlist(n).name)))
@@ -344,28 +344,28 @@ btnNumber=7;
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
btnPos=[xPos yPos-spacing btnWid btnHt];
try
CSrchRange=ImParMat(12);
CSrchRng=ImParMat(12)
srchRange=ImParMat(12);
searchRangeNum=ImParMat(12)
catch %Legacy default value was 18 before being made a user input variable (ImParMat(12)). A preferable value now might be 12 or 14.
CSrchRange=18;
srchRange=18;
ImParMat(12)=18
CSrchRng=ImParMat(12)
searchRangeNum=ImParMat(12)
end
%{
if size(scLst)>1
CSrchRange=ImParMat(12);
srchRange=ImParMat(12);
else
try
CSrchRange=CSearchRange(str2double(scLst))
srchRange=CSearchRange(str2double(scLst))
catch
CSrchRange=ImParMat(12);
srchRange=ImParMat(12);
end
end
%}
hSearchRange = uicontrol(...
'Style', 'edit',...
'String',CSrchRange,...
'String',srchRange,...
'Units','normalized',...
'Position', btnPos,...
'callback',{@CsearchRange});
@@ -376,7 +376,7 @@ hSearchRange = uicontrol(...
errordlg('You must enter a numeric value between 1 and 18 12->18 recommended. (ImParMat(12)))','Bad Input','modal')
return
end
CSrchRng=user_entry
searchRangeNum=user_entry
end
@@ -455,18 +455,4 @@ hedit = uicontrol(...
end
end
%}
%global SWsingleSc
%global SWgrowthArea
%global selScan
%global scan
%global scLst
%global ImParMat
%global CSearchRange
%global CSrchRng
%global defImParMat
%global fhImRun
%global fhconsole
%global resDir
%global ExpOutmat
%global numRows;
%global numCols;