Changeset 862 for trunk/src/mouse_motion.m
- Timestamp:
- Jan 30, 2015, 8:37:03 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_motion.m
r859 r862 232 232 if test_piv 233 233 [dd,ind_pt]=min(abs(Field.X-xy(1,1))+abs(Field.Y-xy(1,2))); 234 if (isfield(hhciv,'TestCiv2')&& get(hhciv.TestCiv2,'Value'))% if TestCiv2 is activated 234 if isfield(hhciv,'TestCiv2') && strcmp(get(hhciv.Civ2,'Visible'),'on')&& ... 235 strcmp(get(hhciv.TestCiv2,'Visible'),'on')&& get(hhciv.TestCiv2,'Value')% if TestCiv2 is activated 235 236 CivOption='Civ2'; 236 237 Param.CheckCiv1=0; 237 238 par_civ=read_GUI(hhciv.Civ2);%read the Civ2 panel in civ_input 238 par_civ.Civ1_SubRange=Field.Civ1_SubRange; 239 par_civ.Civ1_NbCentres=Field.Civ1_NbCentres; 240 par_civ.Civ1_Coord_tps=Field.Civ1_Coord_tps; 241 par_civ.Civ1_U_tps=Field.Civ1_U_tps; 242 par_civ.Civ1_V_tps=Field.Civ1_V_tps; 239 par_civ.Civ1_SubRange=Field.Civ1_SubRange;% get the subranges used for patch 240 par_civ.Civ1_NbCentres=Field.Civ1_NbCentres;% get the nbre of civ1 data points in each subrange 241 par_civ.Civ1_Coord_tps=Field.Civ1_Coord_tps;% get the positions of the centres (Civ1 data) 242 par_civ.Civ1_U_tps=Field.Civ1_U_tps;% get the tps coefficients for spline, U component 243 par_civ.Civ1_V_tps=Field.Civ1_V_tps;% get the tps coefficients for spline, V component 243 244 par_civ.Civ1_Dt=Field.Civ1_Dt; 244 245 par_civ.Civ2_Dt=Field.Civ2_Dt; 245 shiftx=Field.ShiftX(ind_pt); 246 shiftx=Field.ShiftX(ind_pt);% get field info stored in the cuirrent figure 246 247 shifty=Field.ShiftY(ind_pt); 247 248 else … … 306 307 if ~isempty(corrfig) 307 308 set(0,'CurrentFigure',corrfig(1)) 308 AxeData.CurrentCorrImage=imagesc(rangx,-rangy,result_conv,[0 1]); 309 AxeData.CurrentCorrImage=imagesc(rangx,-rangy,result_conv,[0 1]);% plot the correlation map, with full colormap from 0 to 1 309 310 AxeData.CurrentVector=line([0 Data.([CivOption '_U'])],[0 Data.([CivOption '_V'])],'Tag','vector'); 310 AxeData.TitleHandle=title( num2str(par_civ.Grid));311 AxeData.TitleHandle=title(['[x,y]= ' num2str(par_civ.Grid) ' px']); 311 312 colorbar 312 313 set(CurrentAxes,'UserData',AxeData) 313 set(get(AxeData.CurrentCorrImage,'parent'),'YDir','normal') 314 ParentAxe=get(AxeData.CurrentCorrImage,'parent'); 315 set(ParentAxe,'YDir','normal') 316 set(ParentAxe,'DataAspectRatio',[1 1 1]); %equal axis scale 314 317 end 315 318 else … … 317 320 set(AxeData.CurrentCorrImage,'XData',rangx) 318 321 set(AxeData.CurrentCorrImage,'YData',-rangy) 322 ParentAxe=get(AxeData.CurrentCorrImage,'parent'); 323 rangx(1)=min(rangx(1),0); 324 rangx(2)=max(rangx(2),0); 325 rangy(2)=max(rangy(2),0); 326 rangy(1)=min(rangy(1),0); 327 set(ParentAxe,'XLim',rangx) 328 set(ParentAxe,'YLim',[-rangy(2) -rangy(1)]) 319 329 set(AxeData.CurrentVector,'XData',[0 Data.([CivOption '_U'])],'YData',[0 Data.([CivOption '_V'])]); 320 set(AxeData.TitleHandle,'String', num2str(par_civ.Grid))330 set(AxeData.TitleHandle,'String',['[x,y]= ' num2str(par_civ.Grid) ' px']) 321 331 end 322 332 end
Note: See TracChangeset
for help on using the changeset viewer.