Changeset 856 for trunk/src/uvmat.m


Ignore:
Timestamp:
Jan 26, 2015, 12:37:56 AM (9 years ago)
Author:
sommeria
Message:

civtest_implemented_civ2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r853 r856  
    487487set(handles.MenuOpenCampaign,'ForegroundColor',[1 1 0])
    488488drawnow
    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);
     490DataSeries=fullfile(RootPath,SubDir);
     491if isempty(DataSeries) %loads the previously stored file name and set it as default in the file_input box
     492    DataSeries=get(handles.RootPath,'UserData');
     493end
     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
     504if isempty(DataSeries)||~ischar(DataSeries)
     505    DataSeries=pwd;
     506end
     507OutPut=browse_data(DataSeries,'on');% open the GUI browse_data to get select a campaign dir, experiment and device
    500508if ~isfield(OutPut,'Campaign')
    501509    return
    502510end
    503 fileinput=uigetfile_uvmat('pick an input file',fullfile(OutPut.Campaign,OutPut.Experiment{1},OutPut.DataSeries{1}));
     511DataSeries=fullfile(OutPut.Campaign,OutPut.Experiment{1},OutPut.DataSeries{1});
     512fileinput=uigetfile_uvmat('pick an input file',DataSeries);
    504513hh=dir(fileinput);
    505514if numel(hh)>1
     
    511520MenuCampaign=[{get(handles.MenuCampaign_1,'Label')};{get(handles.MenuCampaign_2,'Label')};...
    512521    {get(handles.MenuCampaign_3,'Label')};{get(handles.MenuCampaign_4,'Label')};{get(handles.MenuCampaign_5,'Label')}];
    513 check_dir=isempty(find(strcmp(DirFull,MenuCampaign)));
     522check_dir=isempty(find(strcmp(DataSeries,MenuCampaign)));
    514523if check_dir %insert the new campaign in the list if it is not found
    515524    MenuCampaign(end)=[]; %suppress the last item
    516     MenuCampaign=[{DirFull};MenuCampaign];%insert the new campaign
     525    MenuCampaign=[{DataSeries};MenuCampaign];%insert the new campaign
    517526    for ilist=1:numel(MenuCampaign)
    518527        set(handles.(['MenuCampaign_' num2str(ilist)]),'Label',MenuCampaign{ilist})
Note: See TracChangeset for help on using the changeset viewer.