Add ezview

This commit is contained in:
2024-07-29 12:31:26 -04:00
parent 1c0c84f3e6
commit c323eef935
122 changed files with 57619 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
%EZmultiDayGui.m called by EZexpSel.m ln957 && ln963
%EZmultiday is called after this EZmultiDayGui.m also by EZexpSel.m
function EZmultiDayGui
%global Exp
global exDlst
global exFolder
global expType
global usrExpJobsDir
xPos=0.05;
btnWid=0.10;
btnHt=0.05;
spacing=0.02;% Spacing between the button and the next command's label
%====================================
% The ADD Groups button
btnNumber=1;
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
btnPos=[xPos yPos-spacing btnWid btnHt];
datacursormode off;
%====================================
%{
w= pwd;
%Linux accommodatition
if ispc,cd(fullfile('C:\')); %end % \Easy\Experiments'));
else
cd(fullfile('~'))
end
%}
%====================================
w= pwd;
%Linux accommodatition
%try to use user selected 'ExpJobs' folder otherwise use a default
%directory in the uigetfile to load the experiment .mat file.
try
load ('ExpJobsFldr')
catch
end
%try %Linux accommodatition
if ispc
try
cd(usrExpJobsDir);
catch
cd(fullfile('C:\')); %end % \Easy\Experiments'));
end
else
try
cd(usrExpJobsDir);
catch
cd(fullfile('~'))
end
end
%*****************************************
exFolder=uigetdir
exDirs=dir(exFolder);
exFs= {exDirs.name};
exFs= exFs(3:end)
%******re-Sort Experiments by 'D__' Day*******************************
if expType== 2
exFs
ii=1
for i= 1:size(exFs,2)
position= strfind(exFs(i),'_D')
if ~isempty(cell2mat(position)) && isnumeric(cell2mat(position))
da= char(exFs(i))
ff(ii)= sscanf(da((cell2mat(position)+2):end),'%d')
expDayFs(ii)= exFs(i)
indxx(ii)= ii
selFindx= nonzeros(indxx)
ii=ii+1
end
end
BB= [ff;selFindx']
BB=BB'
CC= sortrows(BB,1)
j=1;
for i= 1:size(CC,1)
j= CC(i,2)
ExpOrderByExp(i)= expDayFs(j) %exFs(j)
end
else
ExpOrderByExp= sort(exFs)
end %if expType==2
%*********************************************
f = figure('Menubar','none','Position',[1000 100 640 750],'Name','Select Exp Folders' );
hListbox = uicontrol(...
'Style', 'listbox',...
'String',ExpOrderByExp,...
'value',[],...
'max',1000,...
'min',1,...
'Units','normalized',...
'Position', [.70 .40 .6 .60],...
'callback',{@load_listbox}); %'uiresume(gcbf)'); 'Position', [5 100 60 20])
function load_listbox(source,eventdata)
userIndx = (get(source,'value'))
userStr = (get(source,'string'))
user_entry=userStr(userIndx)
exDlst= user_entry
end
exFs
btnNumber=10;
yPos=0.85-(btnNumber-1)*(btnHt+spacing);
btnPos=[xPos yPos-spacing btnWid btnHt];
hedit8 = uicontrol(...
'Style', 'pushbutton',...
'String',{'Continue'},...
'Units','normalized',...
'Position', btnPos,...
'callback','uiresume(gcbf)');
uiwait(gcf);
close(f)
cd(w)
end
%*****************************************************************