Changeset 1156 for trunk/src/series


Ignore:
Timestamp:
Jul 8, 2024, 11:03:33 PM (3 months ago)
Author:
sommeria
Message:

bugs repaired

Location:
trunk/src/series
Files:
4 edited

Legend:

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

    r1152 r1156  
    5555    Data.Program=mfilename;%gives the name of the current function
    5656    Data.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
    57     Data.WholeIndexRange_j='on';% prescribes the file index ranges j from min to max (options 'off'/'on', 'off' by default)
     57    Data.IndexRange_j='whole';% prescribes the file index ranges j from min to max (options 'off'/'on'/'whole', 'on' by default)
    5858    Data.NbSlice='off'; %nbre of slices ('off' by default)
    5959    Data.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
  • trunk/src/series/civ_input.m

    r1155 r1156  
    343343end
    344344if strcmp(Param.Action.ActionName,'civ_3D')
    345     PairIndex=1
     345    PairIndex=1;
    346346else
    347347    if isempty(PairIndex)
     
    789789%------------------------------------------------------------------------
    790790%reproduce by default the chosen pair in the checkciv2 menu
    791 list_pair=get(handles.ListPairCiv1,'String');%get the menu of image pairs
    792 PairString=list_pair{get(handles.ListPairCiv1,'Value')};
    793 
    794 [ind1,ind2]=...
    795     find_pair_indices(PairString);
    796 hseries=findobj(allchild(0),'Tag','series');
    797 hhseries=guidata(hseries);
    798 set(hhseries.num_first_j,'String',num2str(ind1));
    799 set(hhseries.num_last_j,'String',num2str(ind2));
    800 set(hhseries.num_incr_j,'String',num2str(ind2-ind1));
    801 set(handles.ListPairCiv2,'Value',get(handles.ListPairCiv1,'Value'))%civ2 selection the same as civ& by default
    802 
     791set(handles.ListPairCiv2,'Value',get(handles.ListPairCiv1,'Value'))%civ2 selection the same as civ1 by default
     792ListPairCiv2_Callback(hObject, eventdata, handles)
    803793
    804794%------------------------------------------------------------------------
     
    806796function ListPairCiv2_Callback(hObject, eventdata, handles)
    807797%------------------------------------------------------------------------
    808 
    809798
    810799%------------------------------------------------------------------------
  • trunk/src/series/civ_series.m

    r1155 r1156  
    5353    path_series=fileparts(which('series'));
    5454    addpath(fullfile(path_series,'series'))
    55 
    56 
    5755    Data=civ_input(Param);% introduce the civ parameters using the GUI civ_input
    5856    % TODO: change from guide to App: modify the input procedure, adapt read_GUI function
     
    7674    Data.CheckOverwriteVisible='on'; % manage the overwrite of existing files (default=1)
    7775    if isfield(Data,'ActionInput') && isfield(Data.ActionInput,'PairIndices') && strcmp(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')
    78         if isfield(Data.ActionInput.PairIndices,'ListPairCiv2')
    79             str_civ=Data.ActionInput.PairIndices.ListPairCiv2;
    80         else
    81             str_civ=Data.ActionInput.PairIndices.ListPairCiv1;
    82         end
    83         r=regexp(str_civ,'^j= (?<num1>[a-z])-(?<num2>[a-z])','names');
    84         if isempty(r)
    85             r=regexp(str_civ,'^j= (?<num1>[A-Z])-(?<num2>[A-Z])','names');
    86             if isempty(r)
    87                 r=regexp(str_civ,'^j= (?<num1>\d+)-(?<num2>\d+)','names');
    88             end
    89         end
    90         if ~isempty(r)
    91             Data.j_index_1=stra2num(r.num1);
    92             Data.j_index_2=stra2num(r.num2);
    93         end
     76        Data.IndexRange_j='off';%no j index display in series
     77        % if isfield(Data.ActionInput.PairIndices,'ListPairCiv2')
     78        %     str_civ=Data.ActionInput.PairIndices.ListPairCiv2;
     79        % else
     80        %     str_civ=Data.ActionInput.PairIndices.ListPairCiv1;
     81        % end
     82        % r=regexp(str_civ,'^j= (?<num1>[a-z])-(?<num2>[a-z])','names');
     83        % if isempty(r)
     84        %     r=regexp(str_civ,'^j= (?<num1>[A-Z])-(?<num2>[A-Z])','names');
     85        %     if isempty(r)
     86        %         r=regexp(str_civ,'^j= (?<num1>\d+)-(?<num2>\d+)','names');
     87        %     end
     88        % end
     89        % if ~isempty(r)
     90        %     Data.j_index_1=stra2num(r.num1);
     91        %     Data.j_index_2=stra2num(r.num2);
     92        % end
     93    else
     94        Data.IndexRange_j='on';% j index display in series if relevant
    9495    end
    9596    return
  • trunk/src/series/test_filter_tps.m

    r1155 r1156  
    5959if isstruct(Param) && isequal(Param.Action.RUN,0)
    6060    ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
    61     ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
     61    ParamOut.WholeIndexRange='one';% prescribes the file index ranges from min to max (options 'off'/'on'/'one' (single input index), 'off' by default)
    6262    ParamOut.NbSlice='off'; % edit box nbre of slices made active
    6363    ParamOut.VelType='one';% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
     
    214214DataOut.ListGlobalAttribute={'Conventions','Program','CivStage','SubDomainSize','MaxDiff','CoordUnit','FieldSmooth'};
    215215DataOut.Conventions='uvmat/civdata';% states the conventions used for the description of field variables and attributes
     216if isfield(Param,'UvmatRevision')
    216217DataOut.Program=['test_patch_tps, uvmat r' Param.UvmatRevision];
     218else
     219    DataOut.Program='test_patch_tps';
     220end
    217221DataOut.CivStage=CivStage;%update the current civStage after smoothing
    218222DataOut.SubDomainSize=SubDomainSize;
     
    287291time=toc
    288292
    289 
     293%plot rms difference and proportion of excluded vectors
    290294figure(2)
    291295cla
    292296if CivStage==3% civ1
    293 ref=0.2; %recommanded value for diff rms
     297    ref=0.2; %recommanded value for diff rms
     298    txt='civ1';
    294299else
    295300    ref=0.1;
     301    txt='civ2';
    296302end
    297303semilogx(FieldSmooth,DataOut.Diff_rms,'b+-',FieldSmooth,DataOut.NbExclude,'m+-',FieldSmooth,ref*ones(size(FieldSmooth)),'b--')
    298304grid on
    299 title( [filecell{1,1} ':' Param.InputFields.VelType])
    300 legend({'rms vel. diff. ' ;' ratio excluded vectors';'recommended diff'},'Location','northwest')
     305title( [filecell{1,1} ':' txt])
     306legend({'rms vel. diff. ' ;' ratio excluded vectors';['recommended diff for' txt]},'Location','northwest')
    301307xlabel('smoothing parameter')
    302 ylabel('rms (pixels) and exclusion ratio')
    303 OutputFig=fullfile(OutputPath,OutputDir,'plot_rms_diff.png')
     308ylabel('rms (pixels) and proportion of excluded vectors')
     309OutputFig=fullfile(OutputPath,OutputDir,'plot_rms_diff.png');
    304310saveas(2,OutputFig)
    305311
Note: See TracChangeset for help on using the changeset viewer.