Changeset 558


Ignore:
Timestamp:
Nov 7, 2012, 10:20:15 AM (11 years ago)
Author:
sommeria
Message:

problem sollved with old label of PIV results of type '001_ab'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_file_series.m

    r554 r558  
    6464    %% possibly include the first index in the root name, if there exists a corresponding xml file
    6565    r=regexp(NomType,'^(?<tiretnum>_?\d+)','names');%look for a number or _1 at the beginning of NomType
    66     if ~isempty(r)
     66    if ~isempty(r) %if NomType begins by a number or _1
    6767        fileinput_end=regexprep(fileinput,['^' RootFile],'');%remove RootFile at the beginning of fileinput
    6868        if isempty(regexp(r.tiretnum,'^_','once'))% if a separator '_' is not  detected
     
    7373        if ~isempty(rr)
    7474            RootFile_i=[RootFile rr.i1];% new root file
     75            %look for an xml file correspoonding to the new root name
    7576            if exist(fullfile(RootPath,SubDir,[RootFile_i '.xml']),'file') || (strcmp(FileExt,'.nc') && exist(fullfile(RootPath,[RootFile_i '.xml']),'file'))
    7677                RootFile=RootFile_i;
     
    8687    %% analyse the list of existing files when relevant
    8788    sep1='';
     89    sep2='';
    8890    i1_str='(?<i1>)';%will set i1=[];
    8991    i1_star='';
     
    9597    j2_star='';
    9698    %Look for cases with letter indexing for the second index
    97     r=regexp(NomType,'^(?<sep1>_?)(?<i1>\d+)(?<j1>[a|A])(?<j2>[b|B]?)$','names');
     99    r=regexp(NomType,'^(?<sep1>_?)(?<i1>\d+)(?<sep2>_?)(?<j1>[a|A])(?<j2>[b|B]?)$','names');
    98100    if ~isempty(r)
    99101        sep1=r.sep1;
     102        sep2=r.sep2;
    100103        i1_str='(?<i1>\d+)';
     104        i1_star='*';
    101105        if strcmp(lower(r.j1),r.j1)% lower case index
    102106            j1_str='(?<j1>[a-z])';
     
    133137        end
    134138    end
    135     detect_string=['^' RootFile sep1 i1_str i2_str j1_str j2_str FileExt '$'];%string used in regexp to detect file indices
     139    detect_string=['^' RootFile sep1 i1_str i2_str sep2 j1_str j2_str FileExt '$'];%string used in regexp to detect file indices
    136140    %find the string used to extract the relevant files with the command dir
    137     star_string=[RootFile sep1 i1_star i2_star j1_star j2_star FileExt];
     141    star_string=[RootFile sep1 i1_star i2_star sep2 j1_star j2_star FileExt];
    138142    wd=pwd;%current working directory
    139143    cd (FilePath)% move to the local dir to save time in the operation dir.
Note: See TracChangeset for help on using the changeset viewer.