Ignore:
Timestamp:
Apr 11, 2021, 10:03:02 PM (3 years ago)
Author:
sommeria
Message:

various bug repairs

File:
1 edited

Legend:

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

    r1093 r1097  
    249249set(handles.dt_unit,'String',['dt in m' TimeUnit]);%display dt in unit 10-3 of the time (e.g ms)
    250250set(handles.TimeUnit,'String',TimeUnit);
    251 %set(handles.CoordUnit,'String',CoordUnit)
    252251set(handles.SearchRange,'UserData', pxcm_search);
    253252
     
    319318%% set the menu and default choice of civ pairs
    320319if ~isfield(Param.IndexRange,'first_j')||isequal(MaxIndex_j,MinIndex_j)% no possibility of j pairs
    321     set(handles.ListPairMode,'Value',1)
    322320    PairMenu={'series(Di)'};
    323321elseif  MaxIndex_i==1 && MaxIndex_j>1% simple series in j
    324322    PairMenu={'pair j1-j2';'series(Dj)'};
    325     if  MaxIndex_j <= 10
    326         set(handles.ListPairMode,'Value',1)% advice 'pair j1-j2' except in MaxIndex_j is large
    327     end
    328323else
    329324    PairMenu={'pair j1-j2';'series(Dj)';'series(Di)'};%multiple choice
    330     if strcmp(NomTypeNc,'_1-2_1')
    331         set(handles.ListPairMode,'Value',3)% advise 'series(Di)'
    332     elseif  MaxIndex_j <= 10
    333         set(handles.ListPairMode,'Value',1)% advice 'pair j1-j2' except in MaxIndex_j is large
    334     end
    335325end
    336326set(handles.ListPairMode,'String',PairMenu)
    337327
    338328%% set default choice of pair mode
    339 PairIndex=1;
     329PairIndex=[];
    340330if isfield(Param,'ActionInput') && isfield(Param.ActionInput,'PairIndices')
    341     PairIndex=find(strcmp(Param.ActionInput.PairIndices.ListPairMode,PairMenu));
     331    PairIndex=find(strcmp(Param.ActionInput.PairIndices.ListPairMode,PairMenu));%retrieve the previous option
    342332end
    343333if isempty(PairIndex)
     
    353343        elseif  MaxIndex_j <= 10
    354344            PairIndex=1;% advice 'pair j1-j2' except in MaxIndex_j is large
     345        else
     346            PairIndex=2;% advice 'Dj'
    355347        end
    356348    end
     
    17481740     ImageData.ListVarName={'ny','nx','A'};
    17491741     ImageData.VarDimName= {'ny','nx',{'ny','nx'}};
     1742     ImageData.VarAttribute{1}.Role='coord_y';
     1743     ImageData.VarAttribute{2}.Role='coord_x';
     1744     ImageData.VarAttribute{3}.Role='scalar';
    17501745     ImageData.A=imread(Data.Civ1_ImageA); % read the first image
    17511746     if ndims(ImageData.A)==3 %case of color image
Note: See TracChangeset for help on using the changeset viewer.