Ignore:
Timestamp:
Jan 24, 2020, 8:26:09 PM (4 years ago)
Author:
sommeria
Message:

LIF calibration with mode replicate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/browse_data.m

    r1071 r1076  
    7676set(hObject, 'Position', FigPos);
    7777set(hObject, 'Units', OldUnits);
    78 % if exist('MultiDevices','var') && strcmp(MultiDevices,'on')
    79 %     set(handles.DataSeries,'Max',2)
    80 % else
    81 %     set(handles.DataSeries,'Max',1)
    82 % end
    8378if exist('EnableMirror','var') && strcmp(EnableMirror,'on')
    8479    set(handles.CreateMirror,'Visible','on')
     
    113108end
    114109s=[];
    115 % if exist(RootXml,'file')
    116 %     [s,Heading]=xml2struct(RootXml);%read the xml file
    117 %     if isfield(s,'SourceDir')
    118 %         set(handles.SourceDir,'String',s.SourceDir);%display the source dir if a mirror has been opened
    119 %         set(handles.MirrorDir,'Visible','on');%  mirror dir display
    120 %         set(handles.MirrorDir,'String',Campaign);%display the opened mirror dir
    121 %         set(handles.CreateMirror,'String','update_mirror')
    122 %     end
    123 % end
    124110if isempty(s) %a source dir has been opened
    125111    set(handles.SourceDir,'String',SourceDir{1});
     
    355341    ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray
    356342    ListFiles=ListCells(1,:);
    357     check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files
     343    index_isdir=find(strcmp('isdir',fieldnames(ListStruct)));
     344    check_dir=cell2mat(ListCells(index_isdir,:));% =1 for directories, =0 for files
    358345    ListFiles(check_dir)=regexprep(ListFiles(check_dir),'^.+','+/$0');% put '+/' in front of dir name display
    359346    cell_remove=regexp(ListFiles,'^(-|\.|\+/\.)');% detect strings beginning by '-' ,'.' or '+/.'(dir beginning by . )
     
    383370    ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray
    384371    ListFiles=ListCells(1,:);
    385     check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files
     372    index_isdir=find(strcmp('isdir',fieldnames(ListStruct)));
     373    check_dir=cell2mat(ListCells(index_isdir,:));% =1 for directories, =0 for files
    386374    ListFiles(check_dir)=regexprep(ListFiles(check_dir),'^.+','+/$0');% put '+/' in front of dir name display
    387375    cell_remove=regexp(ListFiles,'^(-|\.|\+/\.)');% detect strings beginning by '-' ,'.' or '+/.'(dir beginning by . )
     
    430418                ListFiles=ListCells(1,:);
    431419                check_xml=~cellfun('isempty',regexp(ListFiles,'(\.xml|~)$'));% detect non xml files and files not marked by ~
    432                 check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files
     420                index_isdir=find(strcmp('isdir',fieldnames(ListStruct)));
     421                check_dir=cell2mat(ListCells(index_isdir,:));% =1 for directories, =0 for files
    433422                nbfiles=numel(find(~check_xml & ~check_dir));% number of non xml files
    434423                check_dir=check_dir & cellfun('isempty', regexp(ListFiles,'^(-|\.|\+/\.)'));% detect strings beginning by '-' ,'.' or '+/.'(dir beginning by . )
     
    481470        cell_remove=regexp(ListFiles,'^(-|\.|\+/\.)');% detect strings beginning by '-' ,'.' or '+/.'(dir beginning by . )
    482471        check_keep=cellfun('isempty', cell_remove);
    483         check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files
     472        index_isdir=find(strcmp('isdir',fieldnames(ListStruct)));
     473        check_dir=cell2mat(ListCells(index_isdir,:));% =1 for directories, =0 for files
    484474        for ilist=1:numel(ListFiles)
    485475            if check_keep(ilist)% loop on eligible DataSeries folders
Note: See TracChangeset for help on using the changeset viewer.