- Timestamp:
- Apr 13, 2021, 7:19:35 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_field_cells.m
r1095 r1098 429 429 NbDim(icell)=size(Data.(Data.ListVarName{ivar}),2); 430 430 else 431 DimIndex=find(strcmp(Data.VarDimName{ivar} ,Data.ListDimName));431 DimIndex=find(strcmp(Data.VarDimName{ivar}{2},Data.ListDimName)); 432 432 NbDim(icell)= Data.DimValue(DimIndex); 433 433 end … … 497 497 for ivar=ind_discrete 498 498 DimCell=Data.VarDimName{ivar}; 499 if numel(DimCell)==1 && strcmp(DimCell_x{1},DimCell{1}) 499 %if numel(DimCell)==1 && strcmp(DimCell_x{1},DimCell{1}) 500 if strcmp(DimCell_x{1},DimCell{1}) 500 501 y_nbre(icell)=y_nbre(icell)+1; 501 502 Cell1DPlot{icell}.YIndex_discrete(y_nbre(icell))=ivar; -
trunk/src/get_field.m
r1095 r1098 822 822 end 823 823 else 824 coord_val=[0 0 0];824 coord_val=[0 0]; 825 825 for ilist=1:numel(var_component) 826 826 ivar=var_component(ilist); -
trunk/src/mouse_down.m
r1093 r1098 115 115 AxeData.CurrentOrigin=xy(1,1:2);% The current point set by the mouse becomes the current origin 116 116 117 if test_edit_vect 117 if test_edit_vect 118 118 ivec=[]; 119 119 FigData=get(hCurrentGUI,'UserData'); … … 123 123 [CellInfo,NbDim,errormsg]=find_field_cells(Field);%analyse the physical fields contained in Field 124 124 if isempty(errormsg) 125 for icell=1:numel(CellInfo)%look for all physical fields 126 if NbDim(icell)==2 % select 2D field 127 if isfield(Field,'CoordMesh') && ~isempty(Field.CoordMesh)&&... 128 ~isempty(CellInfo{icell}.VarIndex_coord_x) && ~isempty(CellInfo{icell}.VarIndex_coord_y)%case of unstructured data 129 X=Field.(Field.ListVarName{CellInfo{icell}.VarIndex_coord_x}); 130 Y=Field.(Field.ListVarName{CellInfo{icell}.VarIndex_coord_y}); 131 flag_vec=(X<(xy(1,1)+Field.CoordMesh/4) & X>(xy(1,1)-Field.CoordMesh/4)) & ...%flagx=1 for the vectors with x position selected by the mouse 132 (Y<(xy(1,2)+Field.CoordMesh/4) & Y>(xy(1,2)-Field.CoordMesh/4));%f 133 ivec=find(flag_vec,1);% search the (first) selected vector index ivec 125 for icell=1:numel(CellInfo)%look for all physical fields 126 if NbDim(icell)==2 % select 2D field 127 if isfield(Field,'CoordMesh') && ~isempty(Field.CoordMesh)&&... 128 ~isempty(CellInfo{icell}.VarIndex_coord_x) && ~isempty(CellInfo{icell}.VarIndex_coord_y)%case of unstructured data 129 X=Field.(Field.ListVarName{CellInfo{icell}.VarIndex_coord_x}); 130 Y=Field.(Field.ListVarName{CellInfo{icell}.VarIndex_coord_y}); 131 flag_vec=(X<(xy(1,1)+Field.CoordMesh/4) & X>(xy(1,1)-Field.CoordMesh/4)) & ...%flagx=1 for the vectors with x position selected by the mouse 132 (Y<(xy(1,2)+Field.CoordMesh/4) & Y>(xy(1,2)-Field.CoordMesh/4));%f 133 ivec=find(flag_vec,1);% search the (first) selected vector index ivec 134 end 134 135 end 135 136 end 136 end137 137 end 138 138 end -
trunk/src/mouse_motion.m
r1097 r1098 339 339 text_displ(ind_blank)=[]; 340 340 end 341 %set(handles.text_display,'String',text_displ)342 341 set(htext_display,'String',text_displ) 343 342 else 344 %set(handles.text_display,'String',get(handles.text_display,'UserData'))345 343 set(htext_display,'String',get(handles.text_display,'UserData')) 346 344 end -
trunk/src/mouse_up.m
r1093 r1098 172 172 if ~isempty(errormsg) 173 173 msgbox_uvmat('ERROR',errormsg) 174 return 174 % AxeData.Drawing='off';%exit the ruler drawing mode 175 % set(hcurrentaxes,'UserData',AxeData); 176 % set(gcf,'Pointer','arrow') 177 % return 175 178 end 176 179 set(hhuvmat.CheckViewField,'Value',1);% -
trunk/src/plot_field.m
r1097 r1098 114 114 115 115 %% check input structure 116 117 118 119 120 121 122 123 124 125 126 127 128 116 [CellInfo,NbDimArray,errormsg]=find_field_cells(Data); 117 if ~isempty(errormsg) 118 msgbox_uvmat('ERROR',['input of plot_field/find_field_cells: ' errormsg]); 119 return 120 end 121 index_0D=find(NbDimArray==0); 122 index_1D=find(NbDimArray==1); 123 index_2D=find(NbDimArray==2);%find 2D fields 124 index_3D=find(NbDimArray>2,1); 125 if ~isempty(index_3D) 126 msgbox_uvmat('ERROR','volume plot not implemented yet'); 127 return 128 end 129 129 130 130 %% test axes and figure -
trunk/src/plot_object.m
r1093 r1098 136 136 137 137 %% determine the coordinates xline, yline,xsup,xinf, yinf,ysup determining the new object plot 138 %test_line= isequal(ObjectData.Type,'points')||isequal(ObjectData.Type,'line')||...139 % isequal(ObjectData.Type,'polyline')||isequal(ObjectData.Type,'polygon')|| isequal(ObjectData.Type,'plane')|| isequal(ObjectData.Type,'volume');140 %test_patch=isequal(ObjectData.ProjMode,'inside')||isequal(ObjectData.ProjMode,'outside')||isequal(ObjectData.Type,'volume')...141 % ||isequal(ObjectData.ProjMode,'mask_inside')||isequal(ObjectData.ProjMode,'mask_outside');142 138 test_line=ismember(ObjectData.Type,{'points','line','polyline','polygon','plane','plane_z','volume'}); 143 139 test_patch=ismember(ObjectData.ProjMode,{'inside','outside','mask_inside','mask_outside'}); … … 346 342 %complement missing points 347 343 if length(PlotData.SubObject)>nbpoints% fpoints in excess on the graph 348 for ii=nbpoints+1: length(PlotData.SubObject) ;344 for ii=nbpoints+1: length(PlotData.SubObject) 349 345 if ishandle(PlotData.SubObject(ii)) 350 346 delete(PlotData.SubObject(ii)) … … 352 348 end 353 349 end 354 % NbDeformPoint=nbpoints;355 356 350 if nbpoints>length(PlotData.SubObject) 357 351 for ipt=length(PlotData.SubObject)+1:nbpoints … … 374 368 if isfield(PlotData,'DeformPoint') 375 369 NbDeformPoint=length(PlotData.DeformPoint); 376 if NbDeformPoint>nbpoints% fpoints in excess on the graph 370 % delete deformpoints in excess on the graph 371 if NbDeformPoint>nbpoints 377 372 for ii=nbpoints+1:NbDeformPoint 378 373 if ishandle(PlotData.DeformPoint(ii)) … … 382 377 NbDeformPoint=nbpoints; 383 378 end 379 % update the position of the existing deformpoints 384 380 for ipt=1:NbDeformPoint 385 381 if ishandle(PlotData.DeformPoint(ipt)) … … 389 385 end 390 386 end 387 % add neww deform points if requested 391 388 if nbpoints>length(PlotData.DeformPoint) 392 389 for ipt=length(PlotData.DeformPoint)+1:nbpoints 393 390 PlotData.DeformPoint(ipt)=line(xline(ipt),yline(ipt),'Color',col,'LineStyle','-','Tag','DeformPoint',... 394 ' SelectionHighlight','off','UserData',hplot);391 'Marker','.','MarkerSize',12,'SelectionHighlight','off','UserData',hplot); 395 392 end 396 393 set(hplot,'UserData',PlotData) … … 431 428 %% create the object 432 429 if test_newobj 433 % axes(haxes)434 430 hother=findobj('Tag','proj_object');%find all the proj objects 435 431 for iobj=1:length(hother) … … 456 452 for ipt=1:length(xline) 457 453 PlotData.DeformPoint(ipt)=line(ObjectData.Coord(ipt,1),ObjectData.Coord(ipt,2),'Color',... 458 col,'LineStyle','none',' SelectionHighlight','off','UserData',hh,'Tag','DeformPoint');454 col,'LineStyle','none','Marker','.','MarkerSize',12,'SelectionHighlight','off','UserData',hh,'Tag','DeformPoint'); 459 455 %create circle around each point 460 456 if ~isequal(YMax,0) … … 470 466 for ipt=1:sizcoord(1) 471 467 PlotData.DeformPoint(ipt)=line(ObjectData.Coord(ipt,1),ObjectData.Coord(ipt,2),'Color',... 472 col,'LineStyle','none','Marker','.',' Tag','DeformPoint','SelectionHighlight','off','UserData',hh);468 col,'LineStyle','none','Marker','.','MarkerSize',12,'Tag','DeformPoint','SelectionHighlight','off','UserData',hh); 473 469 end 474 470 case {'plane','volume'} -
trunk/src/proj_field.m
r1096 r1098 817 817 ObjectData.Coord(1,3)=0; 818 818 end 819 dline=ObjectData.Coord(2,:)-ObjectData.Coord(1,:); 819 dline=ObjectData.Coord(2,:)-ObjectData.Coord(1,:); 820 820 linelength=norm(dline); 821 821 if isfield(FieldData,'RangeX') … … 825 825 end 826 826 ProjData.(AXName)=XMin:ObjectData.DX:XMin+linelength;%abscissa of the projected data along the line 827 827 828 828 XI_proj=ObjectData.Coord(1,1)*ones(size(ProjData.(AXName))); 829 829 YI_proj=ObjectData.Coord(1,2)*ones(size(ProjData.(AXName))); … … 839 839 end 840 840 for ivar=VarIndex 841 841 VarName=FieldData.ListVarName{ivar}; 842 842 % ListVarName=[ListVarName VarName]; 843 843 % VarDimName=[VarDimName {{'coord_y','coord_x'}}]; … … 852 852 ProjData.(VarName)=interp3(Coord{3},Coord{2},Coord{1},double(FieldData.(VarName)),XI_proj,YI_proj,ZI_proj,'*linear'); 853 853 ProjData.(VarName)=squeeze(ProjData.(VarName)); 854 end 855 854 end 855 856 856 else 857 857 AYName=FieldData.ListVarName{CellInfo{icell}.CoordIndex(end-1)}; … … 895 895 dliny=ObjectData.Coord(2,2)-ObjectData.Coord(1,2); 896 896 linelength=sqrt(dlinx*dlinx+dliny*dliny); 897 theta=angle(dlinx+ i*dliny);%angle of the line897 theta=angle(dlinx+1i*dliny);%angle of the line 898 898 if isfield(FieldData,'RangeX') 899 899 XMin=min(FieldData.RangeX);%shift of the origin on the line … … 923 923 else 924 924 errormsg='multicomponent field not projected'; 925 display(errormsg)926 925 return 927 926 end … … 931 930 ProjData.VarAttribute{nbvar}.Role='coord_x'; 932 931 for ivar=VarIndex 933 %VarName{ivar}=FieldData.ListVarName{ivar};934 932 if test_interp2% interpolate on new grid 935 933 FieldData.(FieldData.ListVarName{ivar})=interp2(FieldData.(AXName),FieldData.(AYName),FieldData.(FieldData.ListVarName{ivar}),AXI,AYI'); … … 969 967 ProjData.VarDimName{end}={AXName,'rgb'}; 970 968 end 971 end972 973 end974 % for vector fields, take the components longitudinal and tranverse to the projection line975 if ~isempty(ivar_U) && ~isempty(ivar_V)976 vector_x =ProjData.(ProjData.ListVarName{ivar_U});977 ProjData.(ProjData.ListVarName{ivar_U}) =cos(theta)*vector_x+sin(theta)*ProjData.(ProjData.ListVarName{ivar_V});978 ProjData.(ProjData.ListVarName{ivar_V}) =-sin(theta)*vector_x+cos(theta)*ProjData.(ProjData.ListVarName{ivar_V});979 end969 end 970 971 end 972 % for vector fields, take the components longitudinal and tranverse to the projection line 973 if ~isempty(ivar_U) && ~isempty(ivar_V) 974 vector_x =ProjData.(ProjData.ListVarName{ivar_U}); 975 ProjData.(ProjData.ListVarName{ivar_U}) =cos(theta)*vector_x+sin(theta)*ProjData.(ProjData.ListVarName{ivar_V}); 976 ProjData.(ProjData.ListVarName{ivar_V}) =-sin(theta)*vector_x+cos(theta)*ProjData.(ProjData.ListVarName{ivar_V}); 977 end 980 978 end 981 979 -
trunk/src/series/civ_input.m
r1097 r1098 1795 1795 1796 1796 if get(handles.TestPatch1,'Value')% if TestPatch1 is activated 1797 set(handles.TestPatch1,'BackgroundColor',[1 1 0])%paint TestPatch1 button in yellow to indicate activation 1798 set(handles.Civ1,'BackgroundColor',[1 1 0])% indicate civ1 calculation is performed 1799 hseries=findobj(allchild(0),'Tag','series'); 1800 Param=read_GUI(hseries); 1801 Param.Action.RUN=1; 1802 Param.ActionInput=read_GUI(handles.civ_input); 1803 if isfield(Param.ActionInput,'Civ2')%remove options that may be selected beyond Patch1 1804 Param.ActionInput=rmfield(Param.ActionInput,'Civ2'); 1805 end 1806 if isfield(Param.ActionInput,'Fix2') 1807 Param.ActionInput=rmfield(Param.ActionInput,'Fix2'); 1808 end 1809 if isfield(Param.ActionInput,'Patch2') 1810 Param.ActionInput=rmfield(Param.ActionInput,'Patch2'); 1811 end 1812 if isfield(Param,'OutputSubDir') 1813 Param=rmfield(Param,'OutputSubDir'); %remove output file option from civ_series 1814 end 1815 ParamPatch1=Param.ActionInput.Patch1; %store the patch1 parameters 1816 Param.ActionInput=rmfield(Param.ActionInput,'Patch1');% does not execute Patch 1817 Param.IndexRange.first_i=str2num(get(handles.ref_i,'String')); 1818 Param.IndexRange.last_i=Param.IndexRange.first_i; 1819 if strcmp(get(handles.ref_j,'Visible'),'on') 1820 Param.IndexRange.first_j=str2num(get(handles.ref_j,'String')); 1821 Param.IndexRange.last_j=Param.IndexRange.first_j; 1822 else 1823 Param.IndexRange.first_j=1; 1824 Param.IndexRange.last_j=1; 1825 end 1826 [Data,errormsg]=civ_series(Param);% get the civ1+fix1 results 1827 bckcolor=get(handles.civ_input,'Color'); 1828 set(handles.Civ1,'BackgroundColor',bckcolor)% indicate civ1 calculation is finished 1829 1830 %% prepare Param for iterative Patch processing without input file reading 1831 Param.Civ1_X=Data.Civ1_X; 1832 Param.Civ1_Y=Data.Civ1_Y; 1833 Param.Civ1_U=Data.Civ1_U; 1834 Param.Civ1_V=Data.Civ1_V; 1835 Param.Civ1_FF=Data.Civ1_FF; 1836 Param=rmfield(Param,'InputTable');%desactivate input file reading 1837 if isfield(Param.ActionInput,'Civ1') 1838 Param.ActionInput=rmfield(Param.ActionInput,'Civ1');%desactivate civ1: remove civ1 input param if relevant 1839 end 1840 if isfield(Param.ActionInput,'Fix1') 1841 Param.ActionInput=rmfield(Param.ActionInput,'Fix1');%desactivate fix1:remove fix1 input param if relevant 1842 end 1843 SmoothingParam=(ParamPatch1.FieldSmooth/10)*2.^(1:7);%scan the smoothing param from 1/10 to 12.8 current value 1844 NbGood=numel(find(Data.Civ1_FF==0)); 1845 NbExclude=zeros(1,7);% initialize the set of smoothing parameters 1846 DiffVel=zeros(1,7);% initialize the rms difference between patch and civ 1847 Param.ActionInput.Patch1=ParamPatch1;% retrieve Patch1 parameters 1848 for irho=1:7 1849 Param.ActionInput.Patch1.FieldSmooth=SmoothingParam(irho); 1850 [Data,errormsg]= civ_series(Param);%apply the processing fct 1851 if ~isempty(errormsg) 1852 msgbox_uvmat('ERROR',errormsg) 1853 return 1854 end 1855 ind_good=find(Data.Civ1_FF==0); 1856 Civ1_U_Diff=Data.Civ1_U(ind_good)-Data.Civ1_U_smooth(ind_good); 1857 Civ1_V_Diff=Data.Civ1_V(ind_good)-Data.Civ1_V_smooth(ind_good); 1858 DiffVel(irho)=sqrt(mean(Civ1_U_Diff.*Civ1_U_Diff+Civ1_V_Diff.*Civ1_V_Diff)); 1859 NbExclude(irho)=(NbGood-numel(ind_good))/NbGood; 1860 end 1861 figure(1) 1862 semilogx(SmoothingParam,DiffVel,'b',SmoothingParam,NbExclude,'r',SmoothingParam,0.2*ones(size(SmoothingParam)),'m') 1863 grid on 1864 legend('rms velocity diff. Patch1-Civ1 (pixels)','proportion of excluded vectors (between 0 to 1)','recommended diff Patch1-Civ1') 1865 xlabel('smoothing parameter') 1866 ylabel('smoothing effect') 1867 set(handles.TestPatch1,'BackgroundColor',[0 1 0]) 1868 else 1869 corrfig=findobj(allchild(0),'tag','corrfig');% look for a current figure for image correlation display 1870 if ~isempty(corrfig) 1871 delete(corrfig) 1872 end 1873 hview_field=findobj(allchild(0),'tag','view_field');% look for view_field 1874 if ~isempty(hview_field) 1875 delete(hview_field) 1876 end 1877 end 1878 1797 hseries=findobj(allchild(0),'Tag','series'); 1798 Param=read_GUI(hseries); 1799 CivDir=fullfile(Param.OutputPath,Param.Experiment,Param.Device,[Param.OutputSubDir Param.OutputDirExt]); 1800 % ListXml=dir(CivXmlDir); 1801 if exist(CivDir,'dir') 1802 CivFile=uigetfile_uvmat('pick .nc file with civ1-fix1 data',CivDir,'.nc'); 1803 [Field,VelTypeOut,errormsg]=read_civdata(CivFile) 1804 for ilist=1:numel(Field.ListGlobalAttribute) 1805 r=regexp(Field.ListGlobalAttribute{ilist},'Civ1_(?<field>.+)','names');% \D = not a digit, \d =digi 1806 if ~isempty(r) 1807 ParamTest.Civ1.(r.field)=(Field.(['Civ1_' r.field])); 1808 end 1809 r=regexp(Field.ListGlobalAttribute{ilist},'Fix1_(?<field>.+)','names');% \D = not a digit, \d =digi 1810 if ~isempty(r) 1811 ParamTest.Fix1.(r.field)=(Field.(['Fix1_' r.field])); 1812 end 1813 end 1814 fill_GUI(ParamTest,handles.civ_input)% fill the elements of the GUI series with the input parameters 1815 drawnow 1816 update_CivOptions(handles,0) 1817 1818 set(handles.TestPatch1,'BackgroundColor',[1 1 0])%paint TestPatch1 button in yellow to indicate activation 1819 % set(handles.Civ1,'BackgroundColor',[1 1 0])% indicate civ1 calculation is performed 1820 Param.Action.RUN=1; 1821 Param.ActionInput=read_GUI(handles.civ_input); 1822 Param.ActionInput.CheckCiv1=0;% do not repeat Civ1 computation 1823 if isfield(Param.ActionInput,'Civ2')%remove options that may be selected beyond Patch1 1824 Param.ActionInput=rmfield(Param.ActionInput,'Civ2'); 1825 end 1826 if isfield(Param.ActionInput,'Fix2') 1827 Param.ActionInput=rmfield(Param.ActionInput,'Fix2'); 1828 end 1829 if isfield(Param.ActionInput,'Patch2') 1830 Param.ActionInput=rmfield(Param.ActionInput,'Patch2'); 1831 end 1832 if isfield(Param,'OutputSubDir') 1833 Param=rmfield(Param,'OutputSubDir'); %remove output file option from civ_series 1834 end 1835 ParamPatch1=Param.ActionInput.Patch1; %store the patch1 parameters 1836 Param.ActionInput=rmfield(Param.ActionInput,'Patch1');% does not execute Patch 1837 Param.IndexRange.first_i=str2num(get(handles.ref_i,'String')); 1838 Param.IndexRange.last_i=Param.IndexRange.first_i; 1839 if strcmp(get(handles.ref_j,'Visible'),'on') 1840 Param.IndexRange.first_j=str2num(get(handles.ref_j,'String')); 1841 Param.IndexRange.last_j=Param.IndexRange.first_j; 1842 else 1843 Param.IndexRange.first_j=1; 1844 Param.IndexRange.last_j=1; 1845 end 1846 [Data,errormsg]=civ_series(Param);% get the civ1+fix1 results 1847 bckcolor=get(handles.civ_input,'Color'); 1848 set(handles.Civ1,'BackgroundColor',bckcolor)% indicate civ1 calculation is finished 1849 1850 %% prepare Param for iterative Patch processing without input file reading 1851 Param.Civ1_X=Data.Civ1_X; 1852 Param.Civ1_Y=Data.Civ1_Y; 1853 Param.Civ1_U=Data.Civ1_U; 1854 Param.Civ1_V=Data.Civ1_V; 1855 Param.Civ1_FF=Data.Civ1_FF; 1856 Param=rmfield(Param,'InputTable');%desactivate input file reading 1857 if isfield(Param.ActionInput,'Civ1') 1858 Param.ActionInput=rmfield(Param.ActionInput,'Civ1');%desactivate civ1: remove civ1 input param if relevant 1859 end 1860 if isfield(Param.ActionInput,'Fix1') 1861 Param.ActionInput=rmfield(Param.ActionInput,'Fix1');%desactivate fix1:remove fix1 input param if relevant 1862 end 1863 SmoothingParam=(ParamPatch1.FieldSmooth/10)*2.^(1:7);%scan the smoothing param from 1/10 to 12.8 current value 1864 NbGood=numel(find(Data.Civ1_FF==0)); 1865 NbExclude=zeros(1,7);% initialize the set of smoothing parameters 1866 DiffVel=zeros(1,7);% initialize the rms difference between patch and civ 1867 Param.ActionInput.Patch1=ParamPatch1;% retrieve Patch1 parameters 1868 for irho=1:7 1869 Param.ActionInput.Patch1.FieldSmooth=SmoothingParam(irho); 1870 [Data,errormsg]= civ_series(Param);%apply the processing fct 1871 if ~isempty(errormsg) 1872 msgbox_uvmat('ERROR',errormsg) 1873 return 1874 end 1875 ind_good=find(Data.Civ1_FF==0); 1876 Civ1_U_Diff=Data.Civ1_U(ind_good)-Data.Civ1_U_smooth(ind_good); 1877 Civ1_V_Diff=Data.Civ1_V(ind_good)-Data.Civ1_V_smooth(ind_good); 1878 DiffVel(irho)=sqrt(mean(Civ1_U_Diff.*Civ1_U_Diff+Civ1_V_Diff.*Civ1_V_Diff)); 1879 NbExclude(irho)=(NbGood-numel(ind_good))/NbGood; 1880 end 1881 figure(1) 1882 semilogx(SmoothingParam,DiffVel,'b',SmoothingParam,NbExclude,'r',SmoothingParam,0.2*ones(size(SmoothingParam)),'m') 1883 grid on 1884 legend('rms velocity diff. Patch1-Civ1 (pixels)','proportion of excluded vectors (between 0 to 1)','recommended diff Patch1-Civ1') 1885 xlabel('smoothing parameter') 1886 ylabel('smoothing effect') 1887 set(handles.TestPatch1,'BackgroundColor',[0 1 0]) 1888 else 1889 corrfig=findobj(allchild(0),'tag','corrfig');% look for a current figure for image correlation display 1890 if ~isempty(corrfig) 1891 delete(corrfig) 1892 end 1893 hview_field=findobj(allchild(0),'tag','view_field');% look for view_field 1894 if ~isempty(hview_field) 1895 delete(hview_field) 1896 end 1897 end 1898 else 1899 msgbox_uvmat('ERROR','no output file: first perform a civ1-fix1 computation') 1900 return 1901 end 1902 1879 1903 %------------------------------------------------------------------------ 1880 1904 % --- Executes on button press in TestCiv2. -
trunk/src/series/sub_background_special.m
r1097 r1098 50 50 % UVMAT is free software; you can redistribute it and/or modify 51 51 % it under the terms of the GNU General Public License as published 52 % by the Free Software Foundation; either version 2 of the license, 52 % by the Free Software Foundation; either version 2 of the license,series 53 53 % or (at your option) any later version. 54 54 % … … 66 66 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 67 67 ParamOut.WholeIndexRange='on';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) 68 ParamOut.NbSlice='o ff'; %nbre of slices ('off' by default)68 ParamOut.NbSlice='on'; %nbre of slices ('off' by default) 69 69 ParamOut.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) 70 70 ParamOut.FieldName='off';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default) … … 93 93 end 94 94 %% estimate the position of bottom and mask for each Z Index 95 BottomIndex=[1900 1800 1700 1650 1650 1600 1600 1600 1600 1600 1600]; 95 NbSlice=Param.IndexRange.NbSlice; 96 switch NbSlice 97 case 11 98 BottomIndex=[1900 1800 1700 1650 1650 1600 1600 1600 1600 1600 1600]; 99 case 4 100 BottomIndex=[1950 1850 1740 1700]; 101 end 96 102 MaxIndex=BottomIndex+100; 97 103 MinIndex=BottomIndex-100; 104 98 105 maskindex=[665 1080];% range of x index perturbed by shadows 99 NbSlice=11;100 106 Bfilter=ones(1,20)/20; 101 107 %% root input file names and nomenclature type (cell arrays with one element) 102 OutputDir=[Param.OutputSubDir Param.OutputDirExt]; 108 OutputDir=[Param.OutputSubDir Param.OutputDirExt];4 103 109 nbj=numel(Param.IndexRange.first_i:Param.IndexRange.last_i); 104 110 for i_ind=Param.IndexRange.first_i:Param.IndexRange.last_i -
trunk/src/set_object.m
r1093 r1098 596 596 597 597 %% update the object refresh 598 hobject=UvData.ProjObject{IndexObj}.DisplayHandle.uvmat;598 %hobject=UvData.ProjObject{IndexObj}.DisplayHandle.uvmat; 599 599 % if we are editing the object used for projection in uvmat 600 600 if isequal(IndexObj_1,IndexObj) -
trunk/src/uvmat.m
r1095 r1098 5279 5279 5280 5280 %% delete drawn objects if the output CooordUnit is different from the previous one 5281 if ~strcmp(CoordUnit,CoordUnitPrev)5282 set(handles.CheckFixLimits,'Value',0)5283 hother=findobj('Tag','proj_object');%find all the proj objects5284 for iobj=1:length(hother)5285 delete(hother(iobj))5286 end5287 hother=findobj('Tag','DeformPoint');%find all the proj objects5288 for iobj=1:length(hother)5289 delete(hother(iobj))5290 end5291 hh=findobj('Tag','calib_points');5292 if ~isempty(hh)5293 delete(hh)5294 end5295 hhh=findobj('Tag','calib_marker');5296 if ~isempty(hhh)5297 delete(hhh)5298 end5299 set(handles.ListObject,'Value',1)5300 set(handles.ListObject,'String',{''})5301 set(handles.ListObject_1,'Value',1)5302 set(handles.ListObject_1,'String',{''})5303 set(handles.CheckViewObject,'value',0)5304 CheckViewObject_Callback(hObject, eventdata, handles)5305 set(handles.CheckViewField,'value',0)5306 CheckViewField_Callback(hObject, eventdata, handles)5307 set(handles.CheckEditObject,'Value',0)5308 CheckEditObject_Callback(hObject, eventdata, handles)5309 UvData.ProjObject={[]};5310 end5281 % if ~strcmp(CoordUnit,CoordUnitPrev) 5282 % set(handles.CheckFixLimits,'Value',0) 5283 % hother=findobj('Tag','proj_object');%find all the proj objects 5284 % for iobj=1:length(hother) 5285 % delete(hother(iobj)) 5286 % end 5287 % hother=findobj('Tag','DeformPoint');%find all the proj objects 5288 % for iobj=1:length(hother) 5289 % delete(hother(iobj)) 5290 % end 5291 % hh=findobj('Tag','calib_points'); 5292 % if ~isempty(hh) 5293 % delete(hh) 5294 % end 5295 % hhh=findobj('Tag','calib_marker'); 5296 % if ~isempty(hhh) 5297 % delete(hhh) 5298 % end 5299 % set(handles.ListObject,'Value',1) 5300 % set(handles.ListObject,'String',{''}) 5301 % set(handles.ListObject_1,'Value',1) 5302 % set(handles.ListObject_1,'String',{''}) 5303 % set(handles.CheckViewObject,'value',0) 5304 % CheckViewObject_Callback(hObject, eventdata, handles) 5305 % set(handles.CheckViewField,'value',0) 5306 % CheckViewField_Callback(hObject, eventdata, handles) 5307 % set(handles.CheckEditObject,'Value',0) 5308 % CheckEditObject_Callback(hObject, eventdata, handles) 5309 % UvData.ProjObject={[]}; 5310 % end 5311 5311 set(handles.uvmat,'UserData',UvData) 5312 5312 set(handles.TransformName,'backgroundColor',[1 1 1])% indicate desactivation of the menu
Note: See TracChangeset
for help on using the changeset viewer.