Ignore:
Timestamp:
Feb 6, 2017, 11:29:01 AM (7 years ago)
Author:
sommeria
Message:

various updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/civ_series.m

    r981 r993  
    6060    Data.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
    6161    Data.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
    62     if isfield(Data,'ActionInput') && isfield(Data.ActionInput,'PairIndices')&& strcmp(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')
    63         Data.Desable_j_index='on';% hide the j index in series (set by the pair choice in civ_input)
    64     end
     62    %     if isfield(Data,'ActionInput') && isfield(Data.ActionInput,'PairIndices')&& strcmp(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')
     63    %         Data.Desable_j_index='on';% hide the j index in series (set by the pair choice in civ_input)
     64    %     end
    6565    Data.NbSlice='off'; %nbre of slices ('off' by default)
    6666    Data.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
     
    7373    Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar)
    7474    Data.CheckOverwriteVisible='on'; % manage the overwrite of existing files (default=1)
     75    if isequal(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')
     76        if isfield(Data.ActionInput.PairIndices,'ListPairCiv2')
     77            str_civ=Data.ActionInput.PairIndices.ListPairCiv2;
     78        else
     79            str_civ=Data.ActionInput.PairIndices.ListPairCiv1;
     80        end
     81        r=regexp(str_civ,'^j= (?<num1>[a-z])-(?<num2>[a-z])','names');
     82        if isempty(r)
     83            r=regexp(str_civ,'^j= (?<num1>[A-Z])-(?<num2>[A-Z])','names');
     84            if isempty(r)
     85                r=regexp(str_civ,'^j= (?<num1>\d+)-(?<num2>\d+)','names');
     86            end
     87        end
     88        if ~isempty(r)
     89            Data.j_index_1=stra2num(r.num1);
     90            Data.j_index_2=stra2num(r.num2);
     91        end
     92    end
    7593    return
    7694end
     
    200218        end
    201219        if isempty(i1_series_Civ1)||(~isempty(PairCiv2) && isempty(i1_series_Civ2))
    202             disp_uvmat('ERROR','no image pair fo civ in the input file index range',checkrun)
     220            disp_uvmat('ERROR','no image pair for civ in the input file index range',checkrun)
    203221            return
    204222        end
     
    208226    try
    209227        if Param.ActionInput.CheckCiv1% Civ1 is performed
     228            first_ima=1;
    210229            ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_series_Civ1(1),[],j1_series_Civ1(1));
    211             if ~exist(ImageName_A,'file')
     230            if checkrun
     231                if ~exist(ImageName_A,'file')
    212232                disp_uvmat('ERROR',['first input image ' ImageName_A ' does not exist'],checkrun)
    213233                return
     234                end
     235            else
     236%                 for ifile=1:numel(i1_series_Civ1)
     237%                     if
    214238            end
    215239            [FileInfo_A,VideoObject_A]=get_file_info(ImageName_A);
     
    412436                if ~isempty(ME.message)
    413437                    disp_uvmat('ERROR', ['error reading input image: ' ME.message],checkrun)
    414                     return
     438                    continue
    415439                end
    416440            end
     
    11551179[npy,npx]=size(result_conv);
    11561180result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1  (=0 by discretisation, to avoid divergence in the log)
    1157 %the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ï¿œ Israel Institute of Technology
     1181%the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ??? Israel Institute of Technology
    11581182%http://urapiv.wordpress.com
    11591183peaky = y;
     
    11921216        for j=-1:1
    11931217            %following 15 lines based on
    1194             %H. Nobach ï¿œ M. Honkanen (2005)
     1218            %H. Nobach ??? M. Honkanen (2005)
    11951219            %Two-dimensional Gaussian regression for sub-pixel displacement
    11961220            %estimation in particle image velocimetry or particle position
    11971221            %estimation in particle tracking velocimetry
    1198             %Experiments in Fluids (2005) 38: 511ï¿œ515
     1222            %Experiments in Fluids (2005) 38: 511???515
    11991223            c10(j+2,i+2)=i*log(result_conv(y+j, x+i));
    12001224            c01(j+2,i+2)=j*log(result_conv(y+j, x+i));
Note: See TracChangeset for help on using the changeset viewer.