Changeset 72


Ignore:
Timestamp:
Mar 30, 2010, 11:03:42 AM (11 years ago)
Author:
sommeria
Message:

ima2vol: write image volumes in 16 bits (test for civ_3D)
plot-text removed: put as a sub-function of plot_field
uvmat: movie stops in case of error in reding files
bug fixes for reading 3D vel fields

Location:
trunk/src
Files:
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ_3D.m

    r71 r72  
    581581        first_i=max(field_i+1,1);
    582582            %determine the set of times and possible intervals for CIV_3D
    583         dt=(1/1000)*str2num(get(handles.dt,'String'));
    584         time=(dt*[0:nb_field-1])';
     583%         dt=(1/1000)*str2num(get(handles.dt,'String'));
     584        time=(0:nb_field-1)';
    585585%             set(handles.incr_i,'UserData',dt);%store the time interval
    586586%             between successive images
     
    594594  last_j=1;
    595595end
    596 UvData.XmlData=XmlData;
    597596
    598597if exist('time','var')
     
    15481547for ifile=1:nbfield
    15491548    i_cmd=0;
    1550     cmd='';
    1551     if sge
    15521549       cmd='#!/bin/bash';
    15531550       cmd=char({cmd;'#$ -cwd'});
    15541551       cmd=char({cmd;'hostname && date'});
    1555     end
    15561552    filename_cmx=cell2mat(filecell_nc1(ifile));%output netcdf file
    15571553    filename_cmx([end-1:end])='cm';%name of cmx file
     
    15791575         pvalue=num2str((1-ind_answer)*500)
    15801576        save(civAllxml,par_civ1_3d_xml);
    1581    
    1582 %       if(isunix && sge)
    1583          ['echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C  ' Civ3D3CBin ' -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose 16 -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ]
    1584          eval ( ['!echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C  ' Civ3D3CBin ' -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose 16 -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ])
    1585 %       else
    1586 %           '3D mode is NOT supported without sge'
    1587 %       end
    1588      return
    1589         % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1590         %  fichier xml produit
    1591         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1592         % A CONTINUER
    1593         %civAllxml
    1594         civAllCmd=[];
    1595         civAllxml=set(civAllxml,1,'name','civ3d3c');
    1596         namelog=[filename_cmx([1:end-3]) 'log'];
    1597         %par_civ1.Dt=num2str(time(num2_civ1(ifile),num_b_civ1(j))-time(num1_civ1(ifile),num_a_civ1(1)));
    1598         %par_civ1.T0=num2str((time(num2_civ1(ifile),num_b_civ1(j))+time(num1_civ1(ifile),num_a_civ1(1)))/2);
    1599        % test_mask=get(handles.get_mask_civ1,'Value');
    1600         i_cmd=i_cmd+1;
    1601 %         if isequal(civAll,0)
    1602 %             cmd=char({cmd;BATCH_CIV1(filename_cmx([1:end-4]),namelog,par_civ1,handles)});
    1603 %         else
    1604              civAllCmd=[civAllCmd ' civ1 '];
    1605              str=BATCH_CIV1_Unified(filename_cmx([1:end-4]),namelog,par_civ1,handles);
    1606             fieldnames=fields(str);
    1607             [civAllxml,uid_civ1]=add(civAllxml,1,'element','civ1');
    1608             for ilist=1:length(fieldnames)
    1609               val=eval(['str.' fieldnames{ilist}]);
    1610               if ischar(val)
    1611                 [civAllxml,uid_t]=add(civAllxml,uid_civ1,'element',fieldnames{ilist});
    1612                 [civAllxml,uid_t2]=add(civAllxml,uid_t,'chardata',val);
    1613                end
    1614             end   
    1615 %         end
    1616     end         
    1617     if(isunix)
    1618             cmd=char({cmd ; ['cp -f ' filename_cmx '2 ' filename_cmx]; cmd_CIV2});
    1619     else
    1620         cmd=char({cmd ; ['copy /Y ' filename_cmx '2 ' filename_cmx]; cmd_CIV2});
    1621     end
    1622 end
    1623      
    1624 %  if isequal(civAll,1)
    1625     save(civAllxml,[filename_cmx([1:end-4]) '.xml']);
    1626     cmd=char({cmd;[Civ_exe ' -f ' [filename_cmx([1:end-4]) '.xml'] ' ' civAllCmd]});
    1627 
    1628      %save(civAllxml,'/tmp/test.xml');
    1629 %  end
    1630 
    1631 
    1632 % create the .bat file:
    1633 if sge
    1634         [Rootbat,Filebat,extbat]=fileparts(filename_cmx);
    1635         filename_bat=fullfile(Rootbat,['job_' Filebat extbat]);
    1636 else
    1637     filename_bat=filename_cmx;
    1638 end
    1639 filename_bat(end-2:end)='bat';
    1640 
    1641 %     pbat=fopen(filename_bat,'w'); %create the file filename_bat
    1642 dlmwrite(filename_bat,cmd,'');%write commands in filename_bat
    1643 if sge
    1644     pvalue=num2str((1-ind_answer)*500);
    1645     namelog=[filename_bat '.patch.log'];
    1646     ['!qsub -p ' pvalue ' -q civ_3D.q -e ' filename_cmx(1:end-4) '.errors -o ' filename_cmx(1:end-4) '.log' ' ' filename_bat];
    1647     eval(  ['!qsub -p ' pvalue ' -q civ_3D.q -e ' filename_cmx(1:end-4) '.errors -o ' filename_cmx(1:end-4) '.log' ' ' filename_bat]);
    1648 else
    1649     if(isunix)
    1650       cmdtodo=['. ' filename_bat ];%removed for Mathieu tests %' && rm -f ' filename_bat] ;
    1651     else
    1652 %      cmdtodo=[filename_bat ' && del /F /Q ' filename_bat];
    1653        cmdtodo=[filename_bat];%removed for Mathieu tests %' && del /F /Q ' filename_bat' ;
    1654     end
    1655     count= fprintf(p1,'%s\n', cmdtodo);
    1656 end
    1657 if ~sge
    1658     fclose(p1);
    1659     fclose(p0);
    1660     delete(name_lock);
    1661 end
     1577     nb_processor='8';
     1578         ['echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C  ' Civ3D3CBin ' -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose ' nb_processor ' -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ]
     1579         eval ( ['!echo /CIVX/bin/MPI/lam-7.1.3_g95/bin/mpirun C  ' Civ3D3CBin ' -p ' par_civ1_3d_xml '|qsub -p ' pvalue ' -q lam.q -pe lam_loose ' nb_processor ' -e ' par_civ1_3d_xml '.errors -o ' par_civ1_3d_xml '.log' ])
     1580
     1581    end           
     1582end
     1583
    16621584set(handles.BATCH, 'Enable','On')
    16631585set(handles.BATCH,'BackgroundColor',[1 0 0])
    1664 %save interface state
     1586
     1587%save GUI state
    16651588[Path,Name]=fileparts(filebase);
    16661589namefig=fullfile(Path,subdir_civ2,Name);
  • trunk/src/plot_field.m

    r71 r72  
    1212%  dimension variables (case of matrices).
    1313%
    14 % function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,KeepLim,PosColorbar)
     14% function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,htext,PosColorbar)
    1515%
    1616% OUPUT:
     
    5353%
    5454%   PlotParam: parameters for plotting, as read on the uvmat interface (by function 'read_plot_param.m')
     55%     .FixedLimits:=0 (default) adjust axes limit to the X,Y data, =1: preserves the previous axes limits
     56%     .Auto_xy: =0 (default): kepp 1 to 1 aspect ratio for x and y scales, =1: automatic adjustment of the graph
    5557%            --scalars--
    5658%    .Scalar.MaxA: upper bound (saturation color) for the scalar representation, max(field) by default
     
    7981%    .Vectors.MaxC = imposed maximum of the scalar field used for vector color;
    8082%
    81 % KeepLim:=0 (default) adjust axes limit to the X,Y data, =1: preserves the previous axes limits
     83%
    8284% PosColorbar: if not empty, display a colorbar for B&W images
    8385%               imposed position of the colorbar (ex [0.821 0.471 0.019 0.445])
     
    99101%AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    100102
    101 function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,KeepLim,PosColorbar)
    102 
     103function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,htext,PosColorbar)
     104% TODO:
     105% use htext: handles of the text edit box (uicontrol)
     106% introduce PlotParam.Hold: 'on' or 'off' (for curves)
     107 
    103108%default output
    104109if ~exist('PlotParam','var'),PlotParam=[];end;
    105 if ~exist('KeepLim','var'),KeepLim=0;end;
     110if ~exist('htext','var'),htext=[];end;
    106111if ~exist('PosColorbar','var'),PosColorbar=[];end;
    107112PlotType='text'; %default
     
    177182    [Data.NbDim,imax]=max(NbDim);
    178183end
    179 if isequal(Data.NbDim,0) % TODO: chech whether this function is still used, replace by plot_profile ?
    180 %     if isfield(Data,'Style') & isequal(Data.Style,'points')
    181         AxeData=plot_text(Data,haxes);
     184if isequal(Data.NbDim,0)
     185        AxeData=plot_text(Data,htext);
    182186        PlotType='text';
    183 %     else
    184 %         [AxeData,haxes]=plot_hist(Data,haxes,PlotParam);
    185 %     end
    186187elseif isequal(Data.NbDim,1)
    187188    [AxeData,haxes]=plot_profile(Data,CellVarIndex,VarType,haxes,PlotParam);%
     
    198199        return
    199200    end
    200     [AxeData,haxes,PlotParamOut,PlotType]=plot_plane(Data,CellVarIndex(ind_select),VarType(ind_select),haxes,PlotParam,KeepLim,PosColorbar);
     201    [AxeData,haxes,PlotParamOut,PlotType]=plot_plane(Data,CellVarIndex(ind_select),VarType(ind_select),haxes,PlotParam,htext,PosColorbar);
    201202    if testzoomaxes
    202203        [AxeData,zoomaxes,PlotParamOut]=plot_plane(Data,CellVarIndex(ind_select),VarType(ind_select),zoomaxes,PlotParam,1,PosColorbar);
     
    235236
    236237
    237 %----------------------------------------------------------
     238%-------------------------------------------------------------------
     239function hdisplay=plot_text(FieldData,hdisplay_in)
     240%-------------------------------------------------------------------
     241if exist('hdisplay_in','var') & ishandle(hdisplay_in) & isequal(get(hdisplay_in,'Type'),'uicontrol')
     242    hdisplay=hdisplay_in;
     243else
     244    figure;%create new figure
     245    hdisplay=uicontrol('Style','edit', 'Units','normalized','Position', [0 0 1 1],'Max',2,'FontName','monospaced');
     246end
     247   
     248ff=fields(FieldData);%list of field names
     249vv=struct2cell(FieldData);%list of field values
     250
     251for icell=1:length(vv)
     252    Tabcell{icell,1}=ff{icell};
     253    ss=vv{icell};
     254    sizss=size(ss);
     255    if isnumeric(ss)
     256        if sizss(1)<=1 & length(ss)<5
     257            displ{icell}=num2str(ss);
     258        else
     259            displ{icell}=[class(ss) ', size ' num2str(size(ss))];
     260        end
     261    elseif ischar(ss)
     262        displ{icell}=ss;
     263    elseif iscell(ss)
     264        sizcell=size(ss);
     265        if sizcell(1)==1 & length(sizcell)==2 %line cell
     266           ssline='{''';
     267           for icolumn=1:sizcell(2)
     268               if isnumeric(ss{icolumn})
     269                   if size(ss{icolumn},1)<=1 & length(ss{icolumn})<5
     270                      sscolumn=num2str(ss{icolumn});%line vector
     271                   else
     272                      sscolumn=[class(ss{icolumn}) ', size ' num2str(size(ss{icolumn}))];
     273                   end
     274               elseif ischar(ss{icolumn})
     275                   sscolumn=ss{icolumn};
     276               else
     277                   sscolumn=class(ss{icolumn});
     278               end
     279               if icolumn==1
     280                   ssline=[ssline sscolumn];
     281               else
     282                   ssline=[ssline ''',''' sscolumn];
     283               end
     284           end
     285           displ{icell}=[ssline '''}'];
     286        else
     287           displ{icell}=[class(ss) ', size ' num2str(sizcell)];
     288        end
     289    else
     290        displ{icell}=class(ss);
     291    end
     292    Tabcell{icell,2}=displ{icell};
     293end
     294Tabchar=cell2tab(Tabcell,': ');
     295set(hdisplay,'String', Tabchar)
     296
     297
     298%-------------------------------------------------------------------
    238299function [AxeData,haxes]=plot_profile(data,CellVarIndex,VarType,haxes,PlotParam)
    239 %-----------------------------------------------------------
     300%-------------------------------------------------------------------
    240301%axes(haxes)
    241302hfig=get(haxes,'parent');
     
    247308    set(haxes,'NextPlot',PlotParam.NextPlot)
    248309end
    249 % adjust the size of the plot to include the whole field, except if KeepLim=1
     310% adjust the size of the plot to include the whole field,
    250311if isfield(PlotParam,'FixedLimits') && isequal(PlotParam.FixedLimits,1)  %adjust the graph limits*
    251312    set(haxes,'XLimMode', 'manual')
     
    454515
    455516
    456 %---------------------------------------
    457 % plot_plane
    458 %----------------------------------------
    459 function [AxeData,haxes,PlotParamOut,PlotType]=plot_plane(Data,CellVarIndex,VarTypeCell,haxes,PlotParam,KeepLim,PosColorbar)
     517%-------------------------------------------------------------------
     518function [AxeData,haxes,PlotParamOut,PlotType]=plot_plane(Data,CellVarIndex,VarTypeCell,haxes,PlotParam,htext,PosColorbar)
     519%-------------------------------------------------------------------
    460520grid(haxes, 'off')
    461521%default plotting parameters
     
    854914    vec_U=reshape(vec_U,1,numel(vec_U));
    855915    vec_V=reshape(vec_V,1,numel(vec_V));
    856     MinMaxX=max(vec_X)-min(vec_X);
    857     MinMaxY=max(vec_Y)-min(vec_Y);
     916    MinMaxX=max(vec_X)-min(vec_X)
     917    MinMaxY=max(vec_Y)-min(vec_Y)
    858918    AxeData.Mesh=sqrt((MinMaxX*MinMaxY)/length(vec_X));
    859919    if  ~isfield(PlotParam.Vectors,'AutoVec') || isequal(PlotParam.Vectors.AutoVec,0)|| ~isfield(PlotParam.Vectors,'VecScale')...
     
    9931053end
    9941054
    995 % adjust the size of the plot to include the whole field, except if KeepLim=1
    996 if ~(exist('KeepLim','var') && isequal(KeepLim,1))  %adjust the graph limits*
     1055% adjust the size of the plot to include the whole field, except if PlotParam.FixedLimits=1
     1056if ~(isfield(PlotParam,'FixedLimits') && PlotParam.FixedLimits)
     1057    %~(exist('KeepLim','var') && isequal(KeepLim,1))  %adjust the graph limits*
    9971058        test_lim=0;
    9981059        if test_vec
     
    10281089set(get(haxes,'XLabel'),'String',[XName x_units]);
    10291090set(get(haxes,'YLabel'),'String',[YName y_units]);
    1030 %---------------------------------------------
    1031 %function for plotting vectors
    1032 %------------------------------------------------
     1091
     1092%-------------------------------------------------------------------
     1093% --- function for plotting vectors
    10331094%INPUT:
    10341095% haxes: handles of the plotting axes
     
    10381099%col_vec: matlab vector setting the color number #i for each velocity vector
    10391100function quiresetn(haxes,x,y,u,v,scale,colorlist,col_vec)
    1040 
     1101%-------------------------------------------------------------------
    10411102%define arrows
    10421103theta=0.5 ;%angle arrow
     
    11181179end
    11191180
    1120 %---------------------------------------
    1121 %determine tick positions for colorbar
    1122 %------------------------------------
     1181%-------------------------------------------------------------------
     1182% ---- determine tick positions for colorbar
    11231183function YTick=colbartick(MinA,MaxA)
     1184%-------------------------------------------------------------------
    11241185%determine tick positions with "simple" values between MinA and MaxA
    11251186YTick=0;%default
  • trunk/src/proj_field.m

    r71 r72  
    950950% test for 3D fields
    951951test3D=0;
    952 if isfield(FieldData,'NbDim')
    953     test3D=isequal(FieldData.NbDim,3);
     952if isfield(FieldData,'nb_dim')
     953    test3D=isequal(FieldData.nb_dim,3)
    954954end
    955955test3C=test3D; %default 3 vel components
     
    10461046%case of input fields with unstructured coordinates
    10471047    if testX
    1048         XName=FieldData.ListVarName{ivar_X};
    1049         YName=FieldData.ListVarName{ivar_Y};
     1048        XName=FieldData.ListVarName{ivar_X}
     1049        YName=FieldData.ListVarName{ivar_Y}
    10501050        eval(['coord_x=FieldData.' XName ';'])
    10511051        eval(['coord_y=FieldData.' YName ';'])
    10521052        if length(ivar_Z)==1
    1053             ZName=FieldData.ListVarName{ivar_X};
     1053            ZName=FieldData.ListVarName{ivar_Z}
    10541054            eval(['coord_z=FieldData.' ZName ';'])
    10551055        end
  • trunk/src/series/ima2vol.m

    r41 r72  
    2020curdir=pwd;
    2121cd(path);
    22 mkdir([subdir_ima '_ij']);
     22mkdir([subdir_ima '_vol']);
    2323cd(curdir);
    24 basename_new=fullfile(path,[subdir_ima '_ij'],namebase);
     24basename_new=fullfile(path,[subdir_ima '_vol'],namebase);
    2525
    2626% read imadoc
     
    5555        t=set(t,uid_value(1),'value',ImageName)%indicate  name of the first image, with ;png extension
    5656    end 
    57 
    58 %     %add information about image transform
    59 %     [t,new_uid]=add(t,1,'element','ImageTransform');
    60 %     [t,NameFunction_uid]=add(t,new_uid,'element','NameFunction');
    61 %     [t]=add(t,NameFunction_uid,'chardata','sub_background');     
    62 %     [t,NbSlice_uid]=add(t,new_uid,'element','NbSlice');
    63 %     [t]=add(t,new_uid,'chardata',num2str(nbslice_i));
    64 %     [t,NbSlidingImages_uid]=add(t,new_uid,'element','NbSlidingImages');
    65 %     [t]=add(t,NbSlidingImages_uid,'chardata',num2str(nbaver));
    66 %     [t,LuminosityRank_uid]=add(t,new_uid,'element','RankBackground');
    67 %     [t]=add(t,LuminosityRank_uid,'chardata',num2str(rank));% luminosity rank almong the nbaver sliding images
    6857    save(t,[basename_new '.xml'])
    6958end
     
    8372    if num_j==nbfield2
    8473         filename_new=name_generator(basename_new,num_i,1,'.vol','_i');
    85          imwrite(vol,filename_new,'png')
     74         imwrite(vol,filename_new,'png','BitDepth',16)% WRITE IN 16 bits
    8675         vol=[];
    8776    end     
     
    10493Mfiltre=Mfiltre/(sum(sum(Mfiltre)));
    10594
    106 C=filter2(ones(windowsize)/windowsize^2,B);
     95C=filter2(Mfiltre,B);
    10796C(:,1:windowsize)=C(:,windowsize)*ones(1,windowsize);
    10897C(:,end-windowsize+1:end)=C(:,end-windowsize+1)*ones(1,windowsize);
     
    127116cmax=max(c_select);
    128117C=(C-cmin)/(cmax-cmin)*256;
    129 C=uint8(C);
     118%C=uint8(C);
  • trunk/src/set_object.m

    r71 r72  
    100100    if isfield(data,'Name')
    101101        set(handles.TITLE,'String',data.Name)
     102        set(hObject,'name',data.Name)
    102103    end
    103104    if ~isfield(data,'NbDim')||~isequal(data.NbDim,3)%2D case
     
    245246   set(handles.PLOT,'enable','off')
    246247end
    247 
     248huvmat=findobj(allchild(0),'tag','uvmat');
     249UvData=get(huvmat,'UserData');
     250pos_uvmat=get(huvmat,'Position');
     251%position the set_object GUI with respect to uvmat
     252if isfield(UvData,'SetObjectOrigin')
     253    pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
     254    pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
     255    set(hObject,'Position',pos_set_object)
     256end
    248257
    249258% --- Outputs from this function are returned to the command line.
     
    745754testnew=0;
    746755if strcmp(ListObject{IndexObj_1},ObjectName)% we are editing the object whose projection is viewed in the uvmat frame
    747    ObjectData.HandlesDisplay=handles.axes3;
    748     PlotHandles=get_plot_handles(handles);
     756   ObjectData.HandlesDisplay=hhuvmat.axes3;
     757    PlotHandles=get_plot_handles(hhuvmat);
    749758    IndexObj=IndexObj_1;
    750759elseif strcmp(ListObject{IndexObj_2},ObjectName)% we are editing the object whose projection is viewed in view_field
  • trunk/src/uvmat.m

    r71 r72  
    16031603
    16041604while get(handles.speed,'Value')~=0 & isequal(get(handles.RunMovie,'BusyAction'),'queue') % enable STOP command
    1605         runpm(hObject,eventdata,handles,increment)
     1605        errormsg=runpm(hObject,eventdata,handles,increment);
     1606        if ~isempty(errormsg)
     1607            return
     1608        end
    16061609        pause(1.02-get(handles.speed,'Value'))% wait for next image
    16071610end
     
    16221625
    16231626%------------------------------------------------------------------
    1624 function runpm(hObject,eventdata,handles,increment)
     1627function errormsg=runpm(hObject,eventdata,handles,increment)
    16251628%------------------------------------------------------------------
    16261629%check for mùovie pair status
     
    24112414        %Zvar=DimVarIndex(DimIndex(1));
    24122415         %Zvar=DimVarIndex(1);
    2413          Zvar=VarType{imax}.coord_3;
    2414         if Zvar~=0 % z is a dimension variable
    2415             ZName=UvData.Field.ListVarName{Zvar};
     2416%          Zvar=VarType{imax}.coord_3;
     2417        if isfield(VarType{imax},'coord_3')&& ~isequal(VarType{imax}.coord_3,0) % z is a dimension variable
     2418            ZName=UvData.Field.ListVarName{VarType{imax}.coord_3}
    24162419            eval(['UvData.ZMax=max(UvData.Field.' ZName ');'])
    24172420            eval(['UvData.ZMin=min(UvData.Field.' ZName ');'])
     
    24862489    ZBounds(1)=UvData.ZMin; %minimum for the Z slider
    24872490    ZBounds(2)=UvData.ZMax;%maximum for the Z slider
     2491    UvData.Object{1}.Name='1-PLANE';
     2492    UvData.Object{1}.enable_plot=1;
    24882493    set_object(UvData.Object{1},PlotHandles,ZBounds);
    24892494    set(handles.list_object_1,'Value',1);
     
    47594764UvData.MouseAction='create_object';
    47604765set(handles.uvmat,'UserData',UvData)
     4766set(handles.delete_object,'Visible','on')
     4767set(handles.uvmat_title,'Visible','on')
     4768set(handles.viw_field_title,'Visible','on')
    47614769
    47624770%------------------------------------------------------------------------
     
    48034811[hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface
    48044812
    4805 pos_uvmat=get(handles.uvmat,'Position');
    4806 %position the set_object GUI with respect to uvmat
    4807 if isfield(UvData,'SetObjectOrigin')
    4808     pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
    4809     pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
    4810     set(hset_object,'Position',pos_set_object)
    4811 end
     4813% pos_uvmat=get(handles.uvmat,'Position');
     4814% %position the set_object GUI with respect to uvmat
     4815% if isfield(UvData,'SetObjectOrigin')
     4816%     pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
     4817%     pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
     4818%     set(hset_object,'Position',pos_set_object)
     4819% end
    48124820
    48134821UvData.MouseAction='create_object';
     
    48154823set(handles.zoom,'Value',0)
    48164824zoom_Callback(handles.uvmat, [], handles)
     4825set(handles.delete_object,'Visible','on')
     4826set(handles.uvmat_title,'Visible','on')
     4827set(handles.viw_field_title,'Visible','on')
    48174828
    48184829%------------------------------------------------------------------------
  • trunk/src/write_plot_param.m

    r19 r72  
    9090set(handles.HideFalse,'Visible',state)
    9191set(handles.HideWarning,'Visible',state)
    92 set(handles.record,'Visible',state)
     92if isfield(handles,'record')
     93    set(handles.record,'Visible',state)
     94end
    9395set(handles.colcode1,'Visible',state)
    9496set(handles.colcode2,'Visible',state)
Note: See TracChangeset for help on using the changeset viewer.