Changeset 391 for trunk/src


Ignore:
Timestamp:
Apr 24, 2012, 8:04:17 AM (13 years ago)
Author:
sommeria
Message:

bugs corrected in find_file_series and get_file_deries

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_file_series.m

    r388 r391  
    8585            if exist(fullfile(RootPath,[RootFileNew '.xml']),'file')
    8686                RootFile=RootFileNew;
     87                NomTypePref=r.tiretnum;
    8788                NomType=regexprep(NomType,['^'  NomTypePref],'');
    88                 NomTypePref=r.tiretnum;
    8989                i2_input=j2_input;
    9090                j1_input=[];
  • trunk/src/get_file_series.m

    r376 r391  
    2525    ref_j=first_j:incr_j:last_j;
    2626end
    27 Pairs=Param.Pairs;
     27% Pairs=Param.Pairs;
    2828r.mode='';
    29 if isfield (Pairs,'list_pair_civ')
    30     r=regexp(Pairs.list_pair_civ,'(?<mode>(Di=)|(Dj=)) -*(?<num1>\d+)\|(?<num2>\d+)','names');
     29if isfield(Param,'Pairs') && isfield (Param.Pairs,'list_pair_civ')
     30    r=regexp(Param.Pairs.list_pair_civ,'(?<mode>(Di=)|(Dj=)) -*(?<num1>\d+)\|(?<num2>\d+)','names');
    3131    if isempty(r)
    32         r=regexp(Pairs.list_pair_civ,'(?<num1>\d+)(?<mode>-)(?<num2>\d+)','names');
     32        r=regexp(Param.Pairs.list_pair_civ,'(?<num1>\d+)(?<mode>-)(?<num2>\d+)','names');
    3333    end
     34
    3435    % TODO case of free pairs:
    3536    %r=regexp(pair_string,'.*\D(?<num1>[\d+|*])(?<delim>[-||])(?<num2>[\d+|*])','names');
    3637end
     38    if isempty(r.mode)
     39        r.num1='';
     40        r.num2='';
     41    end
    3742
    3843%% determine the list of input file names
     
    6267function [i1_series,i2_series,j1_series,j2_series]=find_file_indices(ref_i,ref_j,num1,num2,mode)
    6368i1_series=ref_i;%default
     69i2_series=[];
     70j2_series=[];
     71if isempty(mode)
     72    i1_series=ref_i;
     73    j1_series=ref_j;
     74    return
     75end
    6476j1_series=[];
    6577if ~isempty(ref_j)
     
    6779    j1_series=meshgrid(ref_i,ones(size(ref_j)));
    6880end
    69 i2_series=[];
    70 j2_series=[];
     81
    7182switch mode
    7283    case 'Di='  % ='series(Di)')
Note: See TracChangeset for help on using the changeset viewer.