Changeset 570


Ignore:
Timestamp:
Feb 20, 2013, 8:28:09 AM (11 years ago)
Author:
sommeria
Message:

bugs corrected in browse_data

Location:
trunk/src
Files:
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/browse_data.m

    r569 r570  
    9292        set(handles.CreateMirror,'String','create_mirror')
    9393    end
    94     SourceDir_Callback([],[], handles)
     94    scan_campaign(handles,Campaign)
     95%     SourceDir_Callback([],[], handles)
    9596   set(handles.edit_xml,'Visible','off')
    9697   set(handles.HELP,'Visible','off')
     
    177178
    178179%------------------------------------------------------------------------
    179 function SourceDir_Callback(hObject, eventdata, handles)
    180 %------------------------------------------------------------------------
    181 set(handles.SourceDir,'BackgroundColor',[1 1 0])
     180function scan_campaign(handles,Campaign)
     181%------------------------------------------------------------------------
     182%set(handles.SourceDir,'BackgroundColor',[1 1 0])
    182183drawnow
    183 SourceDir=get(handles.SourceDir,'String');
    184 MirrorDir=get(handles.MirrorDir,'String');
     184%SourceDir=get(handles.SourceDir,'String');
     185%MirrorDir=get(handles.MirrorDir,'String');
    185186ExpName={''};
    186 if exist(SourceDir,'dir')
    187     hdir=dir(SourceDir); %list files and dirs
     187if exist(Campaign,'dir')
     188    hdir=dir(Campaign); %list files and dirs
    188189    idir=0;
    189190    for ilist=1:length(hdir)
     
    193194                idir=idir+1;
    194195                ExpName{idir}=hdir(ilist).name;
    195                 mirror=fullfile(MirrorDir,ExpName{idir});
    196                 if ~exist(mirror,'dir')
    197                    mkdir(mirror)
    198                 end
    199196            end
    200             % look for the list of 'devices'
    201         else
    202             %warning for isolated files
    203197        end
    204198    end
    205199    set(handles.ListExperiments,'String',[{'*'};ExpName'])
    206200    set(handles.ListExperiments,'Value',1)
    207     ListExperiments_Callback(hObject, eventdata, handles)
    208 else
    209     msgbox_uvmat('ERROR',['The input ' SourceDir ' is not a directory'])
    210 end
    211 set(handles.SourceDir,'BackgroundColor',[1 1 1])
     201    ListExperiments_Callback([],[], handles)
     202else
     203    msgbox_uvmat('ERROR',['The input ' Campaign ' is not a directory'])
     204end
     205%set(handles.SourceDir,'BackgroundColor',[1 1 1])
    212206
    213207
     
    233227    idir=0;
    234228    for ilist=1:length(hdir)
    235          if ~isequal(hdir(ilist).name(1),'.')
    236         source=fullfile(SourcePath,ListExperiments{iexp},hdir(ilist).name);
    237         mirror=fullfile(MirrorPath,ListExperiments{iexp},hdir(ilist).name);
    238         if ~exist(mirror)
    239             system(['ln -s ' source ' ' mirror])
     229        if ~isequal(hdir(ilist).name(1),'.')
     230            source=fullfile(SourcePath,ListExperiments{iexp},hdir(ilist).name);
     231            if ~isempty(MirrorPath)
     232                mirror=fullfile(MirrorPath,ListExperiments{iexp},hdir(ilist).name);
     233                if ~exist(mirror)
     234                    system(['ln -s ' source ' ' mirror])
     235                end
     236            end
     237            check_list=strcmp(hdir(ilist).name,ListDevices);
     238            if isempty(find(check_list))
     239                ListDevices=[ListDevices;hdir(ilist).name];
     240            end
    240241        end
    241         check_list=strcmp(hdir(ilist).name,ListDevices);
    242         if isempty(find(check_list))
    243             ListDevices=[ListDevices;hdir(ilist).name];
    244         end   
    245          end
    246242    end
    247243end
  • trunk/src/check_files.m

    r548 r570  
    3232svn_info.status=[];
    3333list_fct={...
     34    'browse_data';...% function for scanning directories in a project/campaign
     35    'browse_data.fig';...% GUI corresponding to dataview
    3436    'calc_field_interp';...% defines fields (velocity, vort, div...) from civx data and calculate them
    3537    'calc_field_tps';...% defines fields (velocity, vort, div...) and calculate them
     
    4547    'create_grid';...% called by the GUI geometry_calib to create a physical grid
    4648    'create_grid.fig';...% GUI corresponding to create_grid.m
    47     'datatree_browser';...% function for scanning directories in a project
    48     'datatree_browser.fig';...% GUI corresponding to dataview
    4949    'delete_object';...%delete a projection object, defined by its index in the Uvmat list or by its graphic handle
    5050    'displ_uvmat';...
Note: See TracChangeset for help on using the changeset viewer.