Changeset 856 for trunk/src/uvmat.m
- Timestamp:
- Jan 26, 2015, 12:37:56 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r853 r856 487 487 set(handles.MenuOpenCampaign,'ForegroundColor',[1 1 0]) 488 488 drawnow 489 RootPath=get(handles.RootPath,'String'); 490 if isempty(RootPath) 491 RootPath=get(handles.RootPath,'UserData');%use Rootpath recored from the personal file at uvmat opening 492 end 493 CampaignPath=fileparts(fileparts(RootPath)); 494 DirFull=uigetfile_uvmat('define this path as the Campaign folder:',CampaignPath,'uigetdir'); 495 %DirFull = uigetdir(CampaignPath,'Select a Campaign dir, then press OK'); 496 if isempty(DirFull) 497 return 498 end 499 OutPut=browse_data(DirFull,'on');% open the GUI browse_data to get select a campaign dir, experiment and device 489 [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes(handles); 490 DataSeries=fullfile(RootPath,SubDir); 491 if isempty(DataSeries) %loads the previously stored file name and set it as default in the file_input box 492 DataSeries=get(handles.RootPath,'UserData'); 493 end 494 % RootPath=get(handles.RootPath,'String'); 495 % if isempty(RootPath) 496 % RootPath=get(handles.RootPath,'UserData');%use Rootpath recored from the personal file at uvmat opening 497 % end 498 % CampaignPath=fileparts(fileparts(RootPath)); 499 % DirFull=uigetfile_uvmat('define this path as the Campaign folder:',CampaignPath,'uigetdir'); 500 % %DirFull = uigetdir(CampaignPath,'Select a Campaign dir, then press OK'); 501 % if isempty(DirFull) 502 % return 503 % end 504 if isempty(DataSeries)||~ischar(DataSeries) 505 DataSeries=pwd; 506 end 507 OutPut=browse_data(DataSeries,'on');% open the GUI browse_data to get select a campaign dir, experiment and device 500 508 if ~isfield(OutPut,'Campaign') 501 509 return 502 510 end 503 fileinput=uigetfile_uvmat('pick an input file',fullfile(OutPut.Campaign,OutPut.Experiment{1},OutPut.DataSeries{1})); 511 DataSeries=fullfile(OutPut.Campaign,OutPut.Experiment{1},OutPut.DataSeries{1}); 512 fileinput=uigetfile_uvmat('pick an input file',DataSeries); 504 513 hh=dir(fileinput); 505 514 if numel(hh)>1 … … 511 520 MenuCampaign=[{get(handles.MenuCampaign_1,'Label')};{get(handles.MenuCampaign_2,'Label')};... 512 521 {get(handles.MenuCampaign_3,'Label')};{get(handles.MenuCampaign_4,'Label')};{get(handles.MenuCampaign_5,'Label')}]; 513 check_dir=isempty(find(strcmp(D irFull,MenuCampaign)));522 check_dir=isempty(find(strcmp(DataSeries,MenuCampaign))); 514 523 if check_dir %insert the new campaign in the list if it is not found 515 524 MenuCampaign(end)=[]; %suppress the last item 516 MenuCampaign=[{D irFull};MenuCampaign];%insert the new campaign525 MenuCampaign=[{DataSeries};MenuCampaign];%insert the new campaign 517 526 for ilist=1:numel(MenuCampaign) 518 527 set(handles.(['MenuCampaign_' num2str(ilist)]),'Label',MenuCampaign{ilist})
Note: See TracChangeset
for help on using the changeset viewer.