Changeset 767
- Timestamp:
- May 2, 2014, 10:48:02 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r764 r767 665 665 end 666 666 ref_i=floor((i1+i2)/2);% reference image number corresponding to the file 667 set(handles.num_ref_i,'String',num2str(ref_i));667 % set(handles.num_ref_i,'String',num2str(ref_i)); 668 668 if isempty(j1) 669 669 j1=1; … … 673 673 end 674 674 ref_j=floor((j1+j2)/2);% reference image number corresponding to the file 675 set(handles.num_ref_j,'String',num2str(ref_j)); 675 % set(handles.num_ref_j,'String',num2str(ref_j)); 676 SeriesData.ref_i=ref_i; 677 SeriesData.ref_j=ref_j; 676 678 677 679 %% update first and last indices if they do not exist … … 1001 1003 end 1002 1004 if check_pairs 1003 set(handles.Pairs,'Visible','on')1005 % set(handles.Pairs,'Visible','on') 1004 1006 set(handles.PairString,'Visible','on') 1005 1007 set(handles.SetPairs,'Visible','on') 1006 1008 else 1007 set(handles.Pairs,'Visible','off')1009 % set(handles.Pairs,'Visible','off') 1008 1010 set(handles.PairString,'Visible','off') 1009 1011 set(handles.SetPairs,'Visible','off') … … 1207 1209 set(handles.PairString,'Data',PairString) 1208 1210 1209 %------------------------------------------------------------------------1210 function num_ref_i_Callback(hObject, eventdata, handles)1211 %------------------------------------------------------------------------1212 mode_list=get(handles.mode,'String');1213 mode=mode_list{get(handles.mode,'Value')};1214 SeriesData=get(handles.series,'UserData');1215 iview=get(handles.ListView,'Value');1216 fill_ListPair(handles,SeriesData.i1_series{iview},SeriesData.i2_series{iview},...1217 SeriesData.j1_series{iview},SeriesData.j2_series{iview},SeriesData.Time{iview});% update the menu of pairs depending on the available netcdf files1218 ListPairs_Callback([],[],handles)1219 1220 %------------------------------------------------------------------------1221 function num_ref_j_Callback(hObject, eventdata, handles)1222 %------------------------------------------------------------------------1223 num_ref_i_Callback(hObject, eventdata, handles)1224 1211 1225 1212 %------------------------------------------------------------------------ … … 1227 1214 %------------------------------------------------------------------------ 1228 1215 % check_burst=0; 1216 ModeMenu={''}; 1229 1217 if isempty(j2_series)% no j pair 1230 1218 ModeValue=1; … … 2336 2324 YName=GetFieldData.PanelOrdinate.ordinate; 2337 2325 case 'civdata...' 2338 FieldList= set_field_list('U','V','C');2326 FieldList=[set_field_list('U','V','C') ;{'C'}]; 2339 2327 set(handles.FieldName,'Value',2) % set menu to 'velocity 2340 2328 XName='X'; 2341 2329 YName='y'; 2330 set(handles.VelType,'visible','on') 2342 2331 end 2343 2332 if ~strcmp(GetFieldData.FieldOption,'civdata...') 2333 set(handles.VelType,'visible','off') 2344 2334 XName=GetFieldData.Coordinates.Coord_x; 2345 2335 TimeNameStr=GetFieldData.Time.SwitchVarIndexTime; … … 3126 3116 set(0,'Unit','points') 3127 3117 ScreenSize=get(0,'ScreenSize');% get the size of the screen, to put the fig on the upper right 3128 Width= 300;% fig width in points (1/72 inch)3118 Width=220;% fig width in points (1/72 inch) 3129 3119 Height=min(0.8*ScreenSize(4),300); 3130 3120 Left=ScreenSize(3)- Width-40; %right edge close to the right, with margin=40 … … 3140 3130 SeriesData=get(handles.series,'UserData'); 3141 3131 % first raw of the GUI 3142 uicontrol('Style','text','Units','normalized', 'Position', [0.0 2 0.90.5 0.1],'BackgroundColor',BackgroundColor,...3132 uicontrol('Style','text','Units','normalized', 'Position', [0.05 0.88 0.5 0.1],'BackgroundColor',BackgroundColor,... 3143 3133 'String','row to edit #','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','right');%title 3144 3134 uicontrol('Style','popupmenu','Units','normalized', 'Position', [0.54 0.8 0.3 0.2],'tag','ListView','BackgroundColor',[1 1 1],... 3145 3135 'String',SeriesData.ListViewMenu,'Value',SeriesData.ListViewValue,'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''ListView'':choice of the file series w for pair display'); 3146 3136 % second raw of the GUI 3147 uicontrol('Style','text','Units','normalized', 'Position', [0.0 2 0.80.7 0.1],'BackgroundColor',BackgroundColor,...3137 uicontrol('Style','text','Units','normalized', 'Position', [0.05 0.79 0.7 0.1],'BackgroundColor',BackgroundColor,... 3148 3138 'String','mode of index pairing:','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','left');%title 3149 uicontrol('Style','popupmenu','Units','normalized', 'Position', [0.0 2 0.58ww 0.2],'tag','Mode','BackgroundColor',[1 1 1],'Callback',@(hObject,eventdata)ModeMenu_Callback(hObject,eventdata),...3139 uicontrol('Style','popupmenu','Units','normalized', 'Position', [0.05 0.62 ww 0.2],'tag','Mode','BackgroundColor',[1 1 1],'Callback',@(hObject,eventdata)ModeMenu_Callback(hObject,eventdata),... 3150 3140 'String',SeriesData.ModeMenu,'Value',SeriesData.ModeValue,'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''Mode'': choice of the image pair mode'); 3151 3141 % third raw 3152 uicontrol('Style','text','Units','normalized', 'Position', [0.0 20.6 0.7 0.1],'BackgroundColor',BackgroundColor,...3142 uicontrol('Style','text','Units','normalized', 'Position', [0.05 0.6 0.7 0.1],'BackgroundColor',BackgroundColor,... 3153 3143 'String','pair choice:','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','left');%title 3154 uicontrol('Style','listbox','Units','normalized', 'Position', [0.0 2 0.16 ww 0.4],'tag','ListPairs','BackgroundColor',[1 1 1],'Callback',@(hObject,eventdata)ListPairsMenu_Callback(hObject,eventdata),...3144 uicontrol('Style','listbox','Units','normalized', 'Position', [0.05 0.42 ww 0.2],'tag','ListPairs','BackgroundColor',[1 1 1],'Callback',@(hObject,eventdata)ListPairsMenu_Callback(hObject,eventdata),... 3155 3145 'String',SeriesData.ListPairsMenu,'Value',SeriesData.ListPairsValue,'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''ListPairs'': menu for selecting the image pair'); 3146 uicontrol('Style','text','Units','normalized', 'Position', [0.1 0.22 0.8 0.1],'BackgroundColor',BackgroundColor,... 3147 'String','ref_i ref_j','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 3148 uicontrol('Style','edit','Units','normalized', 'Position', [0.15 0.17 0.3 0.08],'tag','num_ref_i','BackgroundColor',[1 1 1],'Callback',@(hObject,eventdata)num_ref_i_Callback(hObject,eventdata),... 3149 'String',num2str(SeriesData.ref_i),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_ref_i'': reference field index i used to display dt in ''list_pair_civ'''); 3150 uicontrol('Style','edit','Units','normalized', 'Position', [0.55 0.17 0.3 0.08],'tag','num_ref_j','BackgroundColor',[1 1 1],'Callback',@(hObject,eventdata)num_ref_j_Callback(hObject,eventdata),... 3151 'String',num2str(SeriesData.ref_j),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_ref_j'': reference field index i used to display dt in ''list_pair_civ'''); 3156 3152 % last raw of the GUI: pushbuttons 3157 wwp=(1-4*ii)/3; %width of the push buttons 3158 uicontrol('Style','pushbutton','Units','normalized', 'Position', [ii ii wwp hh],'BackgroundColor',[0 1 0],'String','OK','Callback',@(hObject,eventdata)OK_Callback(hObject,eventdata),... 3153 uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.35 0.01 0.3 0.15],'BackgroundColor',[0 1 0],'String','OK','Callback',@(hObject,eventdata)OK_Callback(hObject,eventdata),... 3159 3154 'FontWeight','bold','FontUnits','points','FontSize',12,'TooltipString','''OK'': apply the output to the current field series in uvmat'); 3160 3155 drawnow … … 3200 3195 set(hPairString,'Data',PairString) 3201 3196 3197 %------------------------------------------------------------------------ 3198 function num_ref_i_Callback(hObject, eventdata) 3199 %------------------------------------------------------------------------ 3200 hMode=findobj(get(hObject,'parent'),'Tag','Mode'); 3201 mode_list=get(hMode,'String'); 3202 mode=mode_list{get(hMode,'Value')}; 3203 hseries=findobj(allchild(0),'tag','series'); 3204 hhseries=guidata(hseries); 3205 SeriesData=get(hseries,'UserData'); 3206 hListView=findobj(get(hObject,'parent'),'Tag','ListView'); 3207 iview=get(hListView,'Value'); 3208 fill_ListPair(hhseries,SeriesData.i1_series{iview},SeriesData.i2_series{iview},... 3209 SeriesData.j1_series{iview},SeriesData.j2_series{iview},SeriesData.Time{iview});% update the menu of pairs depending on the available netcdf files 3210 3211 hListPairs=findobj(get(hObject,'parent'),'Tag','ListPairs'); 3212 ListPairsMenu_Callback(hListPairs,eventdata) 3213 3214 %------------------------------------------------------------------------ 3215 function num_ref_j_Callback(hObject, eventdata) 3216 %------------------------------------------------------------------------ 3217 num_ref_i_Callback(hObject, eventdata) 3218 3202 3219 %------------------------------------------------------------- 3203 3220 % --- Executes on selection in ListPairs. … … 3205 3222 %------------------------------------------------------------ 3206 3223 delete(get(hObject,'parent')) 3207
Note: See TracChangeset
for help on using the changeset viewer.