Changeset 852


Ignore:
Timestamp:
Jan 20, 2015, 10:36:47 AM (6 years ago)
Author:
sommeria
Message:

various bug fix

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r851 r852  
    180180    if isfield(h,'ActionListUser') && iscell(h.ActionListUser) && isfield(h,'ActionPathListUser') && iscell(h.ActionPathListUser)
    181181        ActionList=[ActionList;h.ActionListUser];
    182         ActionPathList=[ActionPathList;h.ActionPathListUser];
     182        ActionPathList=[ActionPathList;h.ActionPathListUser(:,1)];
    183183    end
    184184    %get the menu of transform fct
  • trunk/src/series/civ_input.m

    r851 r852  
    324324
    325325%% set the reference indices from the input file indices
    326 if ~isfield(Param.ActionInput,'ConfigSource')
     326if ~(isfield(Param,'ActionInput') && isfield(Param.ActionInput,'ConfigSource'))
    327327update_CivOptions(handles,ind_opening)% fill the menu of possible pairs
    328328end
  • trunk/src/series/civ_series.m

    r851 r852  
    375375        par_civ1.ImageHeight=size(par_civ1.ImageA,1);%FileInfo_A.Height;
    376376        list_param=(fieldnames(Param.ActionInput.Civ1))';
     377        ind_remove=find(strcmp('TestCiv1',list_param));
     378        list_param(ind_remove)=[];
    377379        Civ1_param=regexprep(list_param,'^.+','Civ1_$0');% insert 'Civ1_' before  each string in list_param
    378380        Civ1_param=[{'Civ1_ImageA','Civ1_ImageB','Civ1_Time','Civ1_Dt'} Civ1_param]; %insert the names of the two input images
     
    471473            end
    472474        end
    473         ListFixParam=fieldnames(Param.ActionInput.Fix1);
    474         for ilist=1:length(ListFixParam)
    475             ParamName=ListFixParam{ilist};
    476             ListName=['Fix1_' ParamName];
    477             eval(['Data.ListGlobalAttribute=[Data.ListGlobalAttribute ''' ParamName '''];'])
    478             eval(['Data.' ListName '=Param.ActionInput.Fix1.' ParamName ';'])
    479         end
     475        list_param=fieldnames(Param.ActionInput.Fix1)';
     476        Fix1_param=regexprep(list_param,'^.+','Fix1_$0');% insert 'Fix1_' before  each string in ListFixParam
     477        %indicate the values of all the global attributes in the output data
     478        for ilist=1:length(list_param)
     479            Data.(Fix1_param{ilist})=Param.ActionInput.Fix1.(list_param{ilist});
     480        end
     481        Data.ListGlobalAttribute=[Data.ListGlobalAttribute Fix1_param];
     482%         
     483%         for ilist=1:length(ListFixParam)
     484%             ParamName=ListFixParam{ilist};
     485%             ListName=['Fix1_' ParamName];
     486%             eval(['Data.ListGlobalAttribute=[Data.ListGlobalAttribute ''' ParamName '''];'])
     487%             eval(['Data.' ListName '=Param.ActionInput.Fix1.' ParamName ';'])
     488%         end
    480489        if check_civx
    481490            if ~isfield(Data,'fix')
     
    502511            return
    503512        end
     513        list_param=fieldnames(Param.ActionInput.Patch1)';
     514                   ind_remove=find(strcmp('TestPatch1',list_param));
     515        list_param(ind_remove)=[];
     516        Patch1_param=regexprep(list_param,'^.+','Patch1_$0');% insert 'Fix1_' before  each string in ListFixParam
     517        %indicate the values of all the global attributes in the output data
     518        for ilist=1:length(list_param)
     519            Data.(Patch1_param{ilist})=Param.ActionInput.Patch1.(list_param{ilist});
     520        end
     521        Data.ListGlobalAttribute=[Data.ListGlobalAttribute Patch1_param];
    504522       
    505         Data.ListGlobalAttribute=[Data.ListGlobalAttribute {'Patch1_Rho','Patch1_Threshold','Patch1_SubDomain'}];
    506         Data.Patch1_FieldSmooth=Param.ActionInput.Patch1.FieldSmooth;
    507         Data.Patch1_MaxDiff=Param.ActionInput.Patch1.MaxDiff;
    508         Data.Patch1_SubDomainSize=Param.ActionInput.Patch1.SubDomainSize;
     523%         Data.ListGlobalAttribute=[Data.ListGlobalAttribute {'Patch1_FieldSmooth','Patch1_MaxDiff','Patch1_SubDomainSize'}];
     524%         Data.Patch1_FieldSmooth=Param.ActionInput.Patch1.FieldSmooth;
     525%         Data.Patch1_MaxDiff=Param.ActionInput.Patch1.MaxDiff;
     526%         Data.Patch1_SubDomainSize=Param.ActionInput.Patch1.SubDomainSize;
    509527        nbvar=length(Data.ListVarName);
    510528        Data.ListVarName=[Data.ListVarName {'Civ1_U_smooth','Civ1_V_smooth','Civ1_SubRange','Civ1_NbCentres','Civ1_Coord_tps','Civ1_U_tps','Civ1_V_tps'}];
     
    688706    %% Fix2
    689707    if isfield (Param.ActionInput,'Fix2')
    690         ListFixParam=fieldnames(Param.ActionInput.Fix2);
    691         for ilist=1:length(ListFixParam)
    692             ParamName=ListFixParam{ilist};
    693             ListName=['Fix2_' ParamName];
    694             eval(['Data.ListGlobalAttribute=[Data.ListGlobalAttribute ''' ParamName '''];'])
    695             eval(['Data.' ListName '=Param.ActionInput.Fix2.' ParamName ';'])
    696         end
     708                list_param=fieldnames(Param.ActionInput.Fix2)';
     709        Fix2_param=regexprep(list_param,'^.+','Fix2_$0');% insert 'Fix1_' before  each string in ListFixParam
     710        %indicate the values of all the global attributes in the output data
     711        for ilist=1:length(list_param)
     712            Data.(Fix2_param{ilist})=Param.ActionInput.Fix2.(list_param{ilist});
     713        end
     714        Data.ListGlobalAttribute=[Data.ListGlobalAttribute Fix2_param];     
     715%         
     716%         ListFixParam=fieldnames(Param.ActionInput.Fix2);
     717%         for ilist=1:length(ListFixParam)
     718%             ParamName=ListFixParam{ilist};
     719%             ListName=['Fix2_' ParamName];
     720%             eval(['Data.ListGlobalAttribute=[Data.ListGlobalAttribute ''' ParamName '''];'])
     721%             eval(['Data.' ListName '=Param.ActionInput.Fix2.' ParamName ';'])
     722%         end
    697723        if check_civx
    698724            if ~isfield(Data,'fix2')
     
    716742    %% Patch2
    717743    if isfield (Param.ActionInput,'Patch2')
    718         Data.ListGlobalAttribute=[Data.ListGlobalAttribute {'Patch2_Rho','Patch2_Threshold','Patch2_SubDomain'}];
    719         Data.Patch2_FieldSmooth=Param.ActionInput.Patch2.FieldSmooth;
    720         Data.Patch2_MaxDiff=Param.ActionInput.Patch2.MaxDiff;
    721         Data.Patch2_SubDomainSize=Param.ActionInput.Patch2.SubDomainSize;
     744                list_param=fieldnames(Param.ActionInput.Patch2)';
     745        Patch2_param=regexprep(list_param,'^.+','Patch2_$0');% insert 'Fix1_' before  each string in ListFixParam
     746        %indicate the values of all the global attributes in the output data
     747        for ilist=1:length(list_param)
     748            Data.(Patch2_param{ilist})=Param.ActionInput.Patch2.(list_param{ilist});
     749        end
     750        Data.ListGlobalAttribute=[Data.ListGlobalAttribute Patch2_param];
     751       
     752       
     753%         Data.ListGlobalAttribute=[Data.ListGlobalAttribute {'Patch2_FieldSmooth','Patch2_MaxDiff','Patch2_SubDomainSize'}];
     754%         Data.Patch2_FieldSmooth=Param.ActionInput.Patch2.FieldSmooth;
     755%         Data.Patch2_MaxDiff=Param.ActionInput.Patch2.MaxDiff;
     756%         Data.Patch2_SubDomainSize=Param.ActionInput.Patch2.SubDomainSize;
    722757        nbvar=length(Data.ListVarName);
    723758        Data.ListVarName=[Data.ListVarName {'Civ2_U_smooth','Civ2_V_smooth','Civ2_SubRange','Civ2_NbCentres','Civ2_Coord_tps','Civ2_U_tps','Civ2_V_tps'}];
Note: See TracChangeset for help on using the changeset viewer.