Changeset 874 for trunk/src


Ignore:
Timestamp:
Feb 19, 2015, 2:17:59 AM (10 years ago)
Author:
sommeria
Message:

merge_proj corrected + various bugs

Location:
trunk/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r811 r874  
    3636function varargout = get_field(varargin)
    3737
    38 % Last Modified by GUIDE v2.5 24-Apr-2014 22:45:34
     38% Last Modified by GUIDE v2.5 18-Feb-2015 23:42:12
    3939
    4040% Begin initialization code - DO NOT EDIT
     
    6666guidata(hObject, handles);
    6767set(hObject,'WindowButtonDownFcn',{'mouse_down'}) % allows mouse action with right button (zoom for uicontrol display)
     68set(hObject,'CloseRequestFcn',{@closefcn,handles})
    6869
    6970%% enter input data
     
    256257
    257258%% set z coordinate menu if relevant
    258 if Field.MaxDim>=3
     259if Field.MaxDim>=3 && prod(Field.DimValue)<10^8; % 3D field (with memory content smaller than 400 Mo)
    259260    set(handles.Check3D,'Value',1)
    260261else
     
    269270
    270271%------------------------------------------------------------------------
    271 % --- Outputs from this function are returned to the command line.
    272 %------------------------------------------------------------------------
    273 function varargout = get_field_OutputFcn(hObject, eventdata, handles)
    274 
    275 varargout{1} = handles.output;
    276 delete(handles.get_field)
    277 
    278 %------------------------------------------------------------------------
    279272% --- Executes when user attempts to close get_field.
    280273%------------------------------------------------------------------------
    281 function get_field_CloseRequestFcn(hObject, eventdata, handles)
    282 
    283 if isequal(get(handles.get_field, 'waitstatus'), 'waiting')
    284     % The GUI is still in UIWAIT, us UIRESUME
    285     uiresume(handles.get_field);
    286 else
    287     % The GUI is no longer waiting, just close it
    288     delete(handles.get_field);
    289 end
    290 
    291 %------------------------------------------------------------------------
    292 % --- Executes on button press in OK.
    293 %------------------------------------------------------------------------
    294 function OK_Callback(hObject, eventdata, handles)
    295 
    296 handles.output=read_GUI(handles.get_field);
    297 guidata(hObject, handles);% Update handles structure
    298 uiresume(handles.get_field);
    299 drawnow
     274%------------------------------------------------------------------------
     275
     276
     277% Use UIRESUME instead of delete because the OutputFcn needs
     278% to get the updated handles structure.
     279
     280% function get_field_CloseRequestFcn(hObject, eventdata)
     281% handles.output=[];
     282% guidata(hObject, handles);% Update handles structure
     283% %delete(handles.get_field);
     284% uiresume(handles.get_field);
     285%drawnow
     286% if isequal(get(handles.get_field, 'waitstatus'), 'waiting')
     287%     % The GUI is still in UIWAIT, us UIRESUME
     288%     uiresume(handles.get_field);
     289% else
     290%     % The GUI is no longer waiting, just close it
     291%     delete(handles.get_field);
     292% end
    300293
    301294% -----------------------------------------------------------------------
     
    611604var_component=find(test_component);% list of variable indices elligible as unstructured coordinates
    612605var_coord=find(test_coord);% % list of variable indices elligible as structured coordinates
    613 ListCoord=Field.Display.ListVarName([var_component var_coord]);
     606var_coord(var_coord==scalar_index)=[];
     607var_component(var_component==scalar_index)=[];
     608ListCoord=Field.Display.ListVarName([var_coord var_component]);
    614609
    615610%% set default coord selection
     
    634629        elseif strcmp(Role,'coord_y')
    635630            coord_val(2)=ilist;
     631            elseif strcmp(Role,'coord_z')
     632            coord_val(3)=ilist;
    636633        end
    637634    end
    638635end
    639636if numel(find(coord_val))<2
    640     if numel(var_coord)>=2
    641         coord_val=[numel(var_component)+2 numel(var_component)+1];
     637    if numel(var_coord)>=3
     638         coord_val=[3 2 1];
     639    elseif numel(var_coord)>=2
     640       % coord_val=[numel(var_component)+2 numel(var_component)+1];
     641       coord_val=[2 1];
    642642    else
    643643        coord_val=[1 2];
     
    745745%% set list of possible coordinates
    746746test_component=zeros(size(Field.Display.VarDimName));%=1 when variable #ilist is eligible as unstructured coordinate
    747 test_coord=zeros(size(Field.Display.VarDimName)); %=1 when variable #ilist is eligible as structured coordiante
     747test_coord=zeros(size(Field.Display.VarDimName)); %=1 when variable #ilist is eligible as structured coordinate
    748748check_consistent=1;%check that the selected vector components (and possibly color var) have the same dimensiosn
    749749ListCoord={''};
     
    766766    var_component=find(test_component);% list of variable indices elligible as unstructured coordinates
    767767    var_coord=find(test_coord);% % list of variable indices elligible as structured coordinates
    768     ListCoord=Field.Display.ListVarName([var_component var_coord]);
     768    var_component(var_component==vector_x_index|var_component==vector_y_index)=[];
     769    var_coord(var_coord==vector_x_index|var_coord==vector_y_index)=[];% remove vector components form te possible list of coordinates
     770    ListCoord=Field.Display.ListVarName([var_coord var_component]);
    769771   
    770772    %% set default coord selection
     
    776778            ListCoord={''};
    777779        else
    778             set(handles.Coord_x,'Value',2)
    779             set(handles.Coord_y,'Value',1)
     780            if numel(test_coord)>=3
     781                set(handles.Coord_x,'Value',3)
     782                set(handles.Coord_y,'Value',2)
     783                set(handles.Coord_z,'Value',1)
     784            else
     785                set(handles.Coord_x,'Value',2)
     786                set(handles.Coord_y,'Value',1)
     787            end
    780788        end
    781789    else
    782         coord_val=[0 0];
     790        coord_val=[0 0 0];
    783791        for ilist=1:numel(var_component)
    784792            ivar=var_component(ilist);
     
    789797                elseif strcmp(Role,'coord_y')
    790798                    coord_val(2)=ilist;
     799                elseif strcmp(Role,'coord_z')
     800                    coord_val(3)=ilist;
    791801                end
    792802            end
     
    797807        if numel(find(coord_val))<2
    798808            %coord_val=[numel(var_component)+2 numel(var_component)+1];
    799             coord_val=[1 2];
     809            coord_val=[1 2 3];
    800810        end
    801811        set(handles.Coord_x,'Value',coord_val(1))
    802812        set(handles.Coord_y,'Value',coord_val(2))
    803     end
    804 end
     813        if numel(ListCoord)>=3
     814            set(handles.Coord_z,'Value',coord_val(3))
     815        end
     816    end
     817end
     818set(handles.Coord_z,'String',ListCoord)
    805819set(handles.Coord_y,'String',ListCoord)
    806820set(handles.Coord_x,'String',ListCoord)
     
    10431057% --- Executes on button press in Check3D.
    10441058function Check3D_Callback(hObject, eventdata, handles)
    1045 if get(handles.Check3D,'Value')
     1059if get(handles.Check3D,'Value')% 3D fields
    10461060    status='on';
    1047 else
     1061else% fields studied as 2D
    10481062    status='off';
     1063 
    10491064end
    10501065set(handles.Coord_z,'Visible',status)
     
    10531068set(handles.vector_z,'Visible',status)
    10541069set(handles.W_title,'Visible',status)   
     1070   Field=get(handles.get_field,'UserData');
     1071    if Field.MaxDim>=3% for 3D fields, propose to use the third variable as time
     1072        menu=get(handles.SwitchVarIndexTime,'String');
     1073        val=find(strcmp('variable',menu));
     1074        if ~isempty(val)
     1075            set(handles.SwitchVarIndexTime,'Value',val)
     1076            SwitchVarIndexTime_Callback(handles.SwitchVarIndexTime,[], handles)
     1077        end
     1078    end
     1079
     1080%------------------------------------------------------------------------
     1081% --- Executes on button press in OK.
     1082%------------------------------------------------------------------------
     1083function OK_Callback(hObject, eventdata, handles)
     1084handles.output=read_GUI(handles.get_field);
     1085guidata(hObject, handles);% Update handles structure
     1086uiresume(handles.get_field);
     1087drawnow
     1088% this function then activate get_field_OutputFcn
     1089
     1090%------------------------------------------------------------------------
     1091% --- Executes when the GUI is closed by the mouse on upper right corner.
     1092%------------------------------------------------------------------------
     1093function closefcn(hObject, eventdata, handles)
     1094handles.output=[];
     1095guidata(hObject, handles);% Update handles structure
     1096uiresume(handles.get_field);
     1097drawnow
     1098
     1099%------------------------------------------------------------------------
     1100% --- Outputs from this function are returned to the command line.
     1101%------------------------------------------------------------------------
     1102function varargout = get_field_OutputFcn(hObject, eventdata, handles)
     1103
     1104varargout{1} =handles.output;
     1105delete(handles.get_field)
  • trunk/src/num2stra.m

    r809 r874  
    11%'num2stra': transform number to the corresponding character string depending on the nomenclature
    22%--------------------------------------------
    3 % function str=num2stra(num,nom_type)
     3% function str=num2stra(num,nom_type,index)
    44%
    55% OUTPUT:
     
    99% num: input number (file index)
    1010% nom_type: nomencalture type (see fct name_generator)
    11 %
     11% index: 1 or 2 (first or secodn index in file naming)
    1212% see also: stra2num, name_generator, name2display
    1313
  • trunk/src/plot_field.m

    r873 r874  
    201201        CheckHold= PlotParam.CheckHold;
    202202    end       
    203     PlotParamOut.Axes=plot_profile(Data,CellInfo(index_1D),haxes,PlotParamOut.Axes,CheckHold);%
     203    PlotParamOut=plot_profile(Data,CellInfo(index_1D),haxes,PlotParamOut,CheckHold);%
    204204    if isempty(index_2D)
    205205        if isfield(PlotParamOut,'Vectors')
     
    224224if ~(isfield(PlotParamOut,'Axes')&&isfield(PlotParamOut.Axes,'TextDisplay')&&(PlotParamOut.Axes.TextDisplay)) % if text is not already given as statistics
    225225    htext=findobj(hfig,'Tag','TableDisplay');
    226     hchecktable=findobj(hfig,'Tag','CheckTable');
    227     if ~isempty(htext)&&~isempty(hchecktable)
     226%     hchecktable=findobj(hfig,'Tag','CheckTable');
     227    if ~isempty(htext)%&&~isempty(hchecktable)
    228228        if isempty(index_0D)
    229229            %         set(htext,'Data',{})
     
    234234            errormsg=plot_text(Data,CellInfo(index_0D),htext);
    235235            set(htext,'visible','on')
    236             set(hchecktable,'visible','on')
    237             set(hchecktable,'Value',1)
     236%             set(hchecktable,'visible','on')
     237%             set(hchecktable,'Value',1)
    238238        end
    239239        set(hfig,'Unit','pixels');
     
    261261%% update the parameters stored in AxeData
    262262if ishandle(haxes)&&( ~isempty(index_2D)|| ~isempty(index_1D))
    263 %     AxeData=[];
    264263    if isfield(PlotParamOut,'MinX')
    265264        AxeData.RangeX=[PlotParamOut.MinX PlotParamOut.MaxX];
     
    362361% --- plot 1D fields (usual x,y plots)
    363362%-------------------------------------------------------------------
    364 function CoordinatesOut=plot_profile(data,CellInfo,haxes,Coordinates,CheckHold)
     363function PlotParamOut=plot_profile(data,CellInfo,haxes,PlotParam,CheckHold)
    365364
    366365%% initialization
    367 if ~exist('Coordinates','var')
     366if ~(exist('PlotParam','var')&&~isempty(PlotParam.Axes))
    368367    Coordinates=[];
    369 end
    370 CoordinatesOut=Coordinates; %default
     368    PlotParamOut.Axes=Coordinates;
     369else
     370    Coordinates=PlotParam.Axes;
     371    PlotParamOut=PlotParam;
     372end
    371373hfig=get(haxes,'parent');
    372374legend_str={};
     
    545547    if ~isempty(MinX)
    546548        if check_lim
    547             CoordinatesOut.MinX=min(min(MinX),CoordinatesOut.MinX);
    548             CoordinatesOut.MaxX=max(max(MaxX),CoordinatesOut.MaxX);
    549         else
    550             CoordinatesOut.MinX=min(MinX);
    551             CoordinatesOut.MaxX=max(MaxX);
     549            Coordinates.MinX=min(min(MinX),Coordinates.MinX);
     550            Coordinates.MaxX=max(max(MaxX),Coordinates.MaxX);
     551        else
     552            Coordinates.MinX=min(MinX);
     553            Coordinates.MaxX=max(MaxX);
    552554        end
    553555    end
    554556    if ~isempty(MinY_cell)
    555557        if check_lim
    556             CoordinatesOut.MinY=min(min(MinY_cell),CoordinatesOut.MinY);
    557             CoordinatesOut.MaxY=max(max(MaxY_cell),CoordinatesOut.MaxY);
    558         else
    559             CoordinatesOut.MinY=min(MinY_cell);
    560             CoordinatesOut.MaxY=max(MaxY_cell);
     558            Coordinates.MinY=min(min(MinY_cell),Coordinates.MinY);
     559            Coordinates.MaxY=max(max(MaxY_cell),Coordinates.MaxY);
     560        else
     561            Coordinates.MinY=min(MinY_cell);
     562            Coordinates.MaxY=max(MaxY_cell);
    561563        end
    562564    end
     
    570572    set(haxes,'DataAspectRatioMode','auto')%automatic aspect ratio
    571573    AspectRatio=get(haxes,'DataAspectRatio');
    572     CoordinatesOut.AspectRatio=AspectRatio(1)/AspectRatio(2);
    573 end
     574    Coordinates.AspectRatio=AspectRatio(1)/AspectRatio(2);
     575end
     576PlotParamOut.Axes= Coordinates;
    574577
    575578%% give statistics for pdf
     
    577580TableData={'Variable';'SampleNbr';'bin size';'Mean';'RMS';'Skewness';'Kurtosis';'    centered ';...
    578581    'Min';'FirstCentile';'FirstDecile';'Median';'LastDecile';'LastCentile';'Max'};
    579 CoordinatesOut.TextDisplay=0;
     582%PlotParamOut.TableDisplay={};
     583TextDisplay=0;
    580584for icell=1:numel(CellInfo)
    581585    if isfield(CellInfo{icell},'VarIndex_histo')
    582586        check_stat=1;
    583         CoordinatesOut.TextDisplay=1;
     587        TextDisplay=1;
    584588        VarName=data.ListVarName{CellInfo{icell}.CoordIndex};
    585589        pdf_val=data.(data.ListVarName{CellInfo{icell}.VarIndex_histo});
     
    597601        Val(5)=(sum(x.*x.*x.*pdf_val))/(Variance*Val(4));%skewness
    598602        Val(6)=(sum(x.*x.*x.*x.*pdf_val))/(Variance*Variance);%kurtosis
    599         cumpdf=cumsum(pdf_val);
     603        cumpdf=cumsum(pdf_val);% sum of pdf
    600604        ind_centile=find(cumpdf>=0.01,1);% first index with cumsum >=0.01
    601         Val(8)=(cumpdf(ind_centile)-0.01)*x(ind_centile-1)+(0.01-cumpdf(ind_centile-1))*x(ind_centile);
    602         Val(8)=Val(8)/(cumpdf(ind_centile)-cumpdf(ind_centile-1));%linear interpolation near ind_centile
     605        Val(8)=x(ind_centile)+Val(2)/2;%
     606        if ind_centile>1
     607            Val(8)=(cumpdf(ind_centile)-0.01)*x(ind_centile-1)+(0.01-cumpdf(ind_centile-1))*x(ind_centile);
     608            Val(8)=Val(8)/(cumpdf(ind_centile)-cumpdf(ind_centile-1))+Val(2)/2;%linear interpolation near ind_centile
     609        end
    603610        ind_decile=find(cumpdf>=0.1,1);
    604         Val(9)=(cumpdf(ind_decile)-0.1)*x(ind_decile-1)+(0.1-cumpdf(ind_decile-1))*x(ind_decile);
    605         Val(9)=Val(9)/(cumpdf(ind_decile)-cumpdf(ind_decile-1));%linear interpolation near ind_decile;
     611        if ind_decile>1
     612            Val(9)=x(ind_decile)+Val(2)/2;%
     613            Val(9)=(cumpdf(ind_decile)-0.1)*x(ind_decile-1)+(0.1-cumpdf(ind_decile-1))*x(ind_decile);
     614            Val(9)=Val(9)/(cumpdf(ind_decile)-cumpdf(ind_decile-1))+Val(2)/2;%linear interpolation near ind_decile;
     615        end
    606616        ind_median=find(cumpdf>= 0.5,1);
    607617        Val(10)=(cumpdf(ind_median)-0.5)*x(ind_median-1)+(0.5-cumpdf(ind_median-1))*x(ind_median);
    608         Val(10)=Val(10)/(cumpdf(ind_median)-cumpdf(ind_median-1));%linear interpolation near ind_median;
     618        Val(10)=Val(10)/(cumpdf(ind_median)-cumpdf(ind_median-1))+Val(2)/2;%linear interpolation near ind_median;
    609619        %     Val(9)=x(ind_median);
    610620        ind_decile=find(cumpdf>=0.9,1);
    611621        Val(11)=(cumpdf(ind_decile)-0.9)*x(ind_decile-1)+(0.9-cumpdf(ind_decile-1))*x(ind_decile);
    612         Val(11)=Val(11)/(cumpdf(ind_decile)-cumpdf(ind_decile-1));%linear interpolation near ind_median;
     622        Val(11)=Val(11)/(cumpdf(ind_decile)-cumpdf(ind_decile-1))+Val(2)/2;%linear interpolation near ind_median;
    613623        ind_centile=find(cumpdf>=0.99,1);
    614624        Val(12)=(cumpdf(ind_centile)-0.99)*x(ind_centile-1)+(0.99-cumpdf(ind_centile-1))*x(ind_centile);
    615         Val(12)=Val(12)/(cumpdf(ind_centile)-cumpdf(ind_centile-1));%linear interpolation near ind_centile;
    616         Val(13)=max(x);
     625        Val(12)=Val(12)/(cumpdf(ind_centile)-cumpdf(ind_centile-1))+Val(2)/2;%linear interpolation near ind_centile;
    617626        Column=mat2cell(Val,ones(13,1),1);
    618627        Column=[{VarName};Column(1:6);{'stat: --'};Column(7:13)];
     
    620629    end
    621630end
    622 if CoordinatesOut.TextDisplay;
     631if TextDisplay;
    623632    disp(TableData);
    624     htable=findobj(hfig,'Tag','TableDisplay');
    625     set(htable,'Data',TableData)
    626     set(htable,'Visible','on')
    627     drawnow
     633    PlotParamOut.TableDisplay=TableData;
     634   % PlotParamOut.CheckTable=1;
     635%     htable=findobj(hfig,'Tag','TableDisplay');
     636%     set(htable,'Data',TableData)
     637%     set(htable,'Visible','on')
     638%     drawnow
     639else
     640    if isfield(PlotParamOut,'TableDisplay')
     641        PlotParamOut=rmfield(PlotParamOut,'TableDisplay');
     642    end
    628643end
    629644   
  • trunk/src/series/civ_input.m

    r873 r874  
    373373
    374374%% Civ1 parameters
    375 Param.CheckCiv1=1;
     375%Param.CheckCiv1=1;
    376376Param.Civ1.CorrBoxSize=[25 25];
    377377Param.Civ1.SearchBoxSize=[55 55];
     
    387387
    388388%% Fix1 parameters
    389 Param.CheckFix1=1;
     389%Param.CheckFix1=1;
    390390Param.Fix1.CheckFmin2=1;
    391391Param.Fix1.CheckF3=1;
     
    393393
    394394%% Patch1 parameters
    395 Param.CheckPatch1=1;
     395%Param.CheckPatch1=1;
    396396Param.Patch1.FieldSmooth=10;
    397397Param.Patch1.MaxDiff=1.5000;
     
    400400
    401401%% Civ2 parameters
    402 Param.CheckCiv2=1;
     402%Param.CheckCiv2=1;
    403403Param.Civ2.CorrBoxSize=[21 21];
    404404Param.Civ2.SearchBoxSize=[27 27];
     
    413413
    414414%% Fix2 parameters
    415 Param.CheckFix2=1;
     415%Param.CheckFix2=1;
    416416Param.Fix2.CheckFmin2=1;
    417417Param.Fix2.CheckF4=1;
     
    420420
    421421%% Patch2 parameters
    422 Param.CheckPatch2=1;
     422%Param.CheckPatch2=1;
    423423Param.Patch2.FieldSmooth=2;
    424424Param.Patch2.MaxDiff=1.5000;
  • trunk/src/series/merge_proj.m

    r867 r874  
    446446                        if iview==1
    447447                            %MergeData.(VarName)=Data{1}.(VarName);% initiate MergeData with the first field
     448                            MergeData.(VarName)(check_bad)=0; %set to zero NaN or data marked by error flag
    448449                            NbAver=~check_bad;% initiate NbAver: the nbre of good data for each point
    449450                        elseif size(Data{iview}.(VarName))~=size(MergeData.(VarName))
  • trunk/src/series/time_series.m

    r872 r874  
    9292        end
    9393    end
     94    % test for subtraction
     95       if size(Param.InputTable,1)==2
     96            answer=msgbox_uvmat('INPUT_Y-N','substract the two input file series (Yes) or concatene them (No)');
     97            ParamOut.ActionInput.CheckSub=str2double(answer);
     98        end
    9499    % check the existence of the first and last file in the series
    95100     first_j=[];
     
    161166CheckNc=cell(1,nbview);
    162167frame_index=cell(1,nbview);
     168
    163169for iview=1:nbview
    164170    if ~exist(filecell{iview,1}','file')
     
    284290    VarMesh=Param.ActionInput.VarMesh;
    285291    end
     292end
     293CheckSub=0;%default
     294if isfield(Parma,'ActionInput') && isfield(Param.ActionInput,'CheckSub')
     295CheckSub=ParamOut.ActionInput.CheckSub;
    286296end
    287297%%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%%
     
    312322        % coordinate transform (or other user defined transform)
    313323        if ~isempty(transform_fct)
    314             switch nargin(transform_fct)
    315                 case 4
    316                     if length(Data)==2
    317                         Field=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2});
    318                     else
     324            if CheckSub
     325                switch nargin(transform_fct)
     326                    case 4
     327                        if length(Data)==2
     328                            Field=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2});
     329                        else
     330                            Field=transform_fct(Data{1},XmlData{1});
     331                        end
     332                    case 3
     333                        if length(Data)==2
     334                            Field=transform_fct(Data{1},XmlData{1},Data{2});
     335                        else
     336                            Field=transform_fct(Data{1},XmlData{1});
     337                        end
     338                    case 2
    319339                        Field=transform_fct(Data{1},XmlData{1});
    320                     end
    321                 case 3
    322                     if length(Data)==2
    323                         Field=transform_fct(Data{1},XmlData{1},Data{2});
    324                     else
    325                         Field=transform_fct(Data{1},XmlData{1});
    326                     end
    327                 case 2
    328                     Field=transform_fct(Data{1},XmlData{1});
    329                 case 1
    330                     Field=transform_fct(Data{1});
     340                    case 1
     341                        Field=transform_fct(Data{1});
     342                end
     343            else
     344                if nargin(transform_fct)>=2
     345                    for iview=1:nbview
     346                        Data{iview}=transform_fct(Data{iview},XmlData{iview});
     347                    end
     348                else
     349                    for iview=1:nbview
     350                        Data{iview}=transform_fct(Data{iview});
     351                    end
     352                end
    331353            end
    332354        end
     
    344366            end
    345367        end
    346 %         nbfile=nbfile+1;
     368        %         nbfile=nbfile+1;
    347369       
    348370        % initiate the time series at the first iteration
     
    441463                VarVal=Field.(VarName);
    442464                if testsum(ivar)==2% test for recorded variable
    443                     if isempty(errormsg)                     
     465                    if isempty(errormsg)
    444466                        VarVal=shiftdim(VarVal,-1); %shift dimension
    445467                        DataOut.(VarName)(index,:,:)=VarVal;%concanete the current field to the time series
  • trunk/src/uvmat.m

    r871 r874  
    16921692% detect the file type, get the movie object if relevant, and look for the corresponding file series:
    16931693[RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileInfo,MovieObject]=find_file_series(fullfile(RootPath,SubDir),[RootFile FileIndices FileExt]);
     1694errormsg='';
    16941695if isempty(i1_series)
    16951696    fileinput=uigetfile_uvmat('pick an input file',fullfile(RootPath,SubDir));
     
    20912092        set(handles.pxcmx,'Visible','off')
    20922093        set(handles.pxcmy,'Visible','off')
     2094        if index==1
    20932095        set(handles.TransformName,'Value',1); %  no transform by default
     2096        end
    20942097    else
    20952098        set(handles.pxcmx,'Visible','on')
     
    21052108            set(handles.pxcmy,'String',num2str(pixcmy))
    21062109        end
    2107         if ~get(handles.CheckFixLimits,'Value')
     2110        if ~get(handles.CheckFixLimits,'Value')&& index==1
    21082111            set(handles.TransformName,'Value',3); % phys transform by default if fixedLimits is off
    21092112        end
     
    37713774            else
    37723775                [PlotType,PlotParamOut]=plot_field(ObjectData,haxes(imap),PlotParam{imap});
    3773                 if ~isempty(regexp(PlotType,'^error'))
     3776                if ~isempty(regexp(PlotType,'^error'))%exit in case of plotting error
    37743777                    if ~isempty(regexp(PlotType,'attempt to plot two vector fields'))
    37753778                        set(handles.CheckEditObject,'Value',1)
    3776                         CheckEditObject_Callback([], [], handles)
     3779                        CheckEditObject_Callback([], [], handles)% propose to edit the main projection plane
    37773780                        hset_object=findobj(allchild(0),'Tag','set_object');%find the GUI set_object
    37783781                        hhset_object=guidata(hset_object);%
     
    37853788                    errormsg=fill_GUI(PlotParamOut,handles.uvmat);
    37863789                else
    3787                     errormsg=fill_GUI(PlotParamOut,view_field_handle);
     3790                    errormsg=fill_GUI(PlotParamOut,view_field_handle);%TODO: check effect on text display
    37883791                end
    37893792                for list={'Scalar','Vectors'}
Note: See TracChangeset for help on using the changeset viewer.