Changeset 713
- Timestamp:
- Feb 20, 2014, 3:49:21 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/keyboard_callback.m
r710 r713 52 52 switch get(gco,'tag')% tag of the current edit box 53 53 case {'RootPath', 'SubDir','RootFile','FileExt','RootPath_1', 'SubDir_1','RootFile_1','FileExt_1'} 54 set(handleshaxes.REFRESH,'BackgroundColor',[1 0 1])%indicat that REFRESH must be activated (intyroduce the whole series) 54 set(handleshaxes.InputFileREFRESH,'BackgroundColor',[1 0 1])%indicat that REFRESH must be activated (intyroduce the whole series) 55 case 'num_IndexIncrement'% no action 55 56 otherwise 56 set(handleshaxes. run0,'BackgroundColor',[1 0 1])%indicat that run0 must be activated57 set(handleshaxes.REFRESH,'BackgroundColor',[1 0 1])%indicat that run0 must be activated 57 58 end 58 59 end -
trunk/src/mouse_down.m
r710 r713 140 140 msg_pos(1:2)=GUI_pos(1:2)+obj_pos(1:2).*GUI_pos(3:4); 141 141 display_str=get(hchild,'TooltipString'); 142 msgbox_uvmat(['uicontrol: ' get(hchild,'Tag')],display_str,get(hchild,'String'),msg_pos); 142 output=msgbox_uvmat(['uicontrol: ' get(hchild,'Tag')],display_str,get(hchild,'String'),msg_pos); 143 %update the parent edit box and indicat that refresh is needed with the new input 144 if strcmp(get(hchild,'Style'),'edit')&&strcmp(get(hchild,'Enable'),'on') 145 set(hchild,'String',output) 146 if strcmp(get(get(hchild,'parent'),'tag'),'InputFile') 147 hhREFRESH=hhCurrentGUI.InputFileREFRESH; 148 else 149 hhREFRESH=hhCurrentGUI.REFRESH; 150 end 151 switch get(hchild,'tag')% tag of the current edit box 152 case {'RootPath', 'SubDir','RootFile','FileExt','RootPath_1', 'SubDir_1','RootFile_1','FileExt_1'} 153 set(hhREFRESH,'BackgroundColor',[1 0 1])%indicat that REFRESH must be activated (intyroduce the whole series) 154 case 'num_IndexIncrement'% no action 155 otherwise 156 set(hhREFRESH,'BackgroundColor',[1 0 1])%indicat that run0 must be activated 157 end 158 end 143 159 return %leave the function once a uicontrol has been selected 144 160 end … … 164 180 msg_pos=GUI_pos(1:2)+panel_pos(1:2).*GUI_pos(3:4)+PosChildren(ind_object,1:2).*panel_pos(3:4).*GUI_pos(3:4); 165 181 display_str=get(hhchild,'TooltipString'); 166 msgbox_uvmat(['uicontrol: ' get(hhchild,'Tag')],display_str,get(hhchild,'String'),msg_pos); 182 output=msgbox_uvmat(['uicontrol: ' get(hhchild,'Tag')],display_str,get(hhchild,'String'),msg_pos); 183 %update the parent edit box and indicat that refresh is needed with the new input 184 if strcmp(get(hhchild,'Style'),'edit')&&strcmp(get(hhchild,'Enable'),'on') 185 set(hhchild,'String',output) 186 if strcmp(get(get(hhchild,'parent'),'tag'),'InputFile') 187 hhREFRESH=hhCurrentGUI.InputFileREFRESH; 188 else 189 hhREFRESH=hhCurrentGUI.REFRESH; 190 end 191 switch get(hhchild,'tag')% tag of the current edit box 192 case {'RootPath', 'SubDir','RootFile','FileExt','RootPath_1', 'SubDir_1','RootFile_1','FileExt_1'} 193 set(hhREFRESH,'BackgroundColor',[1 0 1])%indicat that REFRESH must be activated (intyroduce the whole series) 194 case 'num_IndexIncrement'% no action 195 otherwise 196 set(hhREFRESH,'BackgroundColor',[1 0 1])%indicat that run0 must be activated 197 end 198 end 167 199 else 168 200 set(hObject,'CurrentObject',hhchild) -
trunk/src/msgbox_uvmat.m
r654 r713 62 62 set(handles.Cancel,'Position',[300 2 60 30]) 63 63 set(handles.Cancel,'FontSize',15) 64 64 %set(hObject,'WindowKeyPressFcn',{'@keyboard_callback',handles})%set keyboard action function 65 65 66 66 % Update handles structure … … 206 206 else 207 207 if strcmp(get(handles.edit_box,'Style'),'listbox') 208 208 varargout{1}=get(handles.edit_box,'Value'); 209 209 else 210 varargout{1}=get(handles.edit_box,'String');210 varargout{1}=get(handles.edit_box,'String'); 211 211 end 212 if isempty(varargout{1}) 212 if isempty(varargout{1}) 213 213 varargout{1}='Yes'; 214 214 end 215 215 end 216 if strcmp(get(handles.edit_box, 'Visible'), 'on') 217 varargout{2}=get(handles.edit_box,'String'); 218 end 216 219 % The figure can be deleted now 217 220 delete(handles.figure1); 218 221 end 222 219 223 % delete(handles.figure1); 220 224 … … 276 280 end 277 281 278 279 280 281 282 %'keyboard_callback:' function activated when a key is pressed on the keyboard 283 %----------------------------------- 284 function keyboard_callback(hObject,eventdata,handleshaxes) 285 cur_axes=get(hObject,'CurrentAxes');%current plotting axes of the figure with handle hObject 286 xx=double(get(hObject,'CurrentCharacter')) %get the keyboard character 287 288 289 -
trunk/src/sub_field.m
r674 r713 183 183 184 184 function OutputCell=regexprep_r(InputCell,search_string,new_string) 185 if ischar(InputCell); InputCell={InputCell}; end 185 186 OutputCell=InputCell;%default 186 187 for icell=1:numel(InputCell) -
trunk/src/uvmat.m
r710 r713 46 46 % .HistoAxes: idem for histogram axes 47 47 48 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DATA FLOW (for run0_Callback) %%%%%%%%%%%%%%%%%%%%:48 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DATA FLOW (for REFRESH_Callback) %%%%%%%%%%%%%%%%%%%%: 49 49 % 50 50 % … … 435 435 set(handles.PlotAxes,'Units','pixels') 436 436 set(handles.PlotAxes,'Position',pos) 437 set(handles.PlotAxes,'Units','normalized') 437 438 438 439 … … 594 595 FileIndex=fullfile_uvmat('','','','',get(handles.NomType,'String'),i1,i2,j1,j2); 595 596 set(handles.FileIndex,'String',FileIndex) 596 % refresh the current settings andrefresh the field view597 % inputfilerefresh the current settings and inputfilerefresh the field view 597 598 RootPath_Callback(hObject,eventdata,handles) 598 599 … … 607 608 FileIndex=fullfile_uvmat('','','','',get(handles.NomType_1,'String'),i1,i2,j1,j2); 608 609 set(handles.FileIndex_1,'String',FileIndex) 609 % refresh the current settings andrefresh the field view610 % inputfilerefresh the current settings and inputfilerefresh the field view 610 611 RootPath_1_Callback(hObject,eventdata,handles) 611 612 612 613 %------------------------------------------------------------------------ 613 % --- Executes on button press in REFRESH.614 function REFRESH_Callback(hObject, eventdata, handles)614 % --- Executes on button press in InputFileREFRESH. 615 function InputFileREFRESH_Callback(hObject, eventdata, handles) 615 616 %------------------------------------------------------------------------ 616 set(handles. REFRESH,'BackgroundColor',[1 1 0])% set button color to yellow to indicate that refresh is under action617 set(handles.InputFileREFRESH,'BackgroundColor',[1 1 0])% set button color to yellow to indicate that refresh is under action 617 618 % read the current input file name: 618 619 [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes(handles); … … 623 624 % detect the file type, get the movie object if relevant, and look for the corresponding file series: 624 625 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType,FileInfo,MovieObject]=find_file_series(fullfile(RootPath,SubDir),[RootFile FileIndices FileExt]); 625 % initiate the input file series and refresh the current field view:626 % initiate the input file series and inputfilerefresh the current field view: 626 627 errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,MovieObject,1); 627 % refresh the second series if selected628 % inputfilerefresh the second series if selected 628 629 if get(handles.SubField,'Value') 629 630 [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes_1(handles); … … 634 635 % detect the file type, get the movie object if relevant, and look for the corresponding file series: 635 636 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType,MovieObject]=find_file_series(fullfile(RootPath,SubDir),[RootFile FileIndices FileExt]); 636 % initiate the input file series and refresh the current field view:637 % initiate the input file series and inputfilerefresh the current field view: 637 638 errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,MovieObject,2); 638 639 end 639 640 640 641 if isempty(errormsg) 641 set(handles. REFRESH,'BackgroundColor',[1 0 0])% set button color to red to indicate that refresh has been updated642 else 643 set(handles. REFRESH,'BackgroundColor',[1 0 1])% keep button color magenta, input not succesfull642 set(handles.InputFileREFRESH,'BackgroundColor',[1 0 0])% set button color to red to indicate that refresh has been updated 643 else 644 set(handles.InputFileREFRESH,'BackgroundColor',[1 0 1])% keep button color magenta, input not succesfull 644 645 end 645 646 … … 681 682 set(handles.TimeValue_1,'Visible','on') 682 683 end 683 set(handles. REFRESH,'BackgroundColor',[1 1 0])% paint REFRESH button to yellow to visualise root file input684 set(handles.InputFileREFRESH,'BackgroundColor',[1 1 0])% paint REFRESH button to yellow to visualise root file input 684 685 set(handles.uvmat,'Pointer','watch') % set the mouse pointer to 'watch' 685 686 drawnow … … 801 802 set(handles.MenuTools,'Enable','on') 802 803 803 % initiate input file series and refresh the current field view:804 % initiate input file series and inputfilerefresh the current field view: 804 805 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,MovieObject,index); 805 806 … … 825 826 end 826 827 827 set(handles. REFRESH,'BackgroundColor',[1 0 0])% paint back button to red to indicate update is finished828 set(handles.InputFileREFRESH,'BackgroundColor',[1 0 0])% paint back button to red to indicate update is finished 828 829 set(handles.uvmat,'Pointer','arrow')% set back the mouse pointer to arrow 829 830 … … 831 832 %------------------------------------------------------------------------ 832 833 % --- Update information about a new field series (indices to scan, timing, 833 % calibration from an xml file, then refresh current plots834 % calibration from an xml file, then inputfilerefresh current plots 834 835 function errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,VideoObject,index) 835 836 %------------------------------------------------------------------------ … … 847 848 set(handles.FieldName,'UserData',[])% reinialize data from uvmat opening 848 849 UvData=get(handles.uvmat,'UserData');%huvmat=handles of the uvmat interface 849 UvData.NewSeries=1; %flag for run0: begin a new series850 UvData.NewSeries=1; %flag for REFRESH: begin a new series 850 851 UvData.FileName_1='';% name of the current second field (used to detect a constant field during file scanning) 851 852 UvData.FileType{index}=FileType; … … 916 917 NbSlice=1;%default 917 918 ImaDoc_str=''; 918 set(handles. REFRESH,'BackgroundColor',[1 1 0])919 set(handles.InputFileREFRESH,'BackgroundColor',[1 1 0]) 919 920 if ~isempty(XmlFileName) 920 921 set(handles.view_xml,'Visible','on') … … 1088 1089 set(handles_Fields,'Value',1) 1089 1090 set(handles_Fields,'String',{'get_field...'}) 1090 FieldName_Callback([],[], handles) 1091 if index==1 1092 FieldName_Callback([],[], handles) 1093 else 1094 FieldName_1_Callback([],[], handles) 1095 end 1091 1096 otherwise 1092 1097 set(handles_Fields,'Value',1) % set menu to 'image' … … 1098 1103 set(handles.uvmat,'UserData',UvData) 1099 1104 1100 %% set index navigation options and refresh plots1105 %% set index navigation options and inputfilerefresh plots 1101 1106 scan_option='i';%default 1102 1107 state_j='off'; %default … … 1457 1462 %------------------------------------------------------------------------ 1458 1463 %------------------------------------------------------------------------ 1459 % III - MAIN REFRESH FUNCTIONS : 'FRAME PLOT'1464 % III - MAIN InputFileREFRESH FUNCTIONS : 'FRAME PLOT' 1460 1465 %------------------------------------------------------------------------ 1461 1466 1462 1467 %------------------------------------------------------------------------ 1463 1468 % --- Executes on button press in runplus: make one step forward and call 1464 % --- run0. The step forward is along the fieldname series 1 or 2 depending on1469 % --- InputFileREFRESH. The step forward is along the fieldname series 1 or 2 depending on 1465 1470 % --- the scan_i and scan_j check box (exclusive each other) 1466 1471 function runplus_Callback(hObject, eventdata, handles) … … 1481 1486 %------------------------------------------------------------------------ 1482 1487 % --- Executes on button press in runmin: make one step backward and call 1483 % --- run0. The step backward is along the fieldname series 1 or 2 depending on1488 % --- InputFileREFRESH. The step backward is along the fieldname series 1 or 2 depending on 1484 1489 % --- the scan_i and scan_j check box (exclusive each other) 1485 1490 function runmin_Callback(hObject, eventdata, handles) … … 1782 1787 filename=fullfile_uvmat(InputFile.RootPath,InputFile.SubDir,InputFile.RootFile,FileExt,NomType,i1,i2,j1,j2); 1783 1788 1784 %% refresh plots1789 %% inputfilerefresh plots 1785 1790 if sub_value 1786 1791 filename_1=fullfile_uvmat(InputFile.RootPath_1,InputFile.SubDir_1,InputFile.RootFile_1,InputFile.FileExt_1,InputFile.NomType_1,i1_1,i2_1,j1_1,j2_1); … … 1789 1794 errormsg=refresh_field(handles,filename,filename_1,i1,i2,j1,j2); 1790 1795 end 1791 set(handles. run0,'BackgroundColor',[1 0 0])1796 set(handles.InputFileREFRESH,'BackgroundColor',[1 0 0]) 1792 1797 1793 1798 %% update the index counters if the index move is successfull … … 1840 1845 else 1841 1846 set(handles.movie_pair,'BusyAction','queue') 1842 set(handles. run0,'BackgroundColor',[1 0 0])1847 set(handles.InputFileREFRESH,'BackgroundColor',[1 0 0]) 1843 1848 end 1844 1849 … … 1982 1987 1983 1988 %------------------------------------------------------------------------ 1984 % --- Executes on button press in run0.1985 function run0_Callback(hObject, eventdata, handles)1986 %------------------------------------------------------------------------ 1987 set(handles. run0,'BackgroundColor',[1 1 0])%paint the command button in yellow1989 % --- Executes on button press in InputFileREFRESH. 1990 function REFRESH_Callback(hObject, eventdata, handles) 1991 %------------------------------------------------------------------------ 1992 set(handles.REFRESH,'BackgroundColor',[1 1 0])%paint the command button in yellow 1988 1993 drawnow 1989 1994 [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles); … … 2018 2023 set(handles.FileIndex,'BackgroundColor',[1 1 1]) 2019 2024 set(handles.FileIndex_1,'BackgroundColor',[1 1 1]) 2020 set(handles. run0,'BackgroundColor',[1 0 0])2025 set(handles.REFRESH,'BackgroundColor',[1 0 0]) 2021 2026 end 2022 2027 2023 2028 %------------------------------------------------------------------------ 2024 % --- read the input files and refresh all the plots, including projection.2029 % --- read the input files and inputfilerefresh all the plots, including projection. 2025 2030 % OUTPUT: 2026 2031 % errormsg: error message char string =[] by default … … 2063 2068 set(handles.z_index,'String',num2str(z_index)) 2064 2069 end 2065 % refresh menu for save_mask if relevant2070 % inputfilerefresh menu for save_mask if relevant 2066 2071 masknumber=get(handles.masklevel,'String'); 2067 2072 if length(masknumber)>=z_index … … 2217 2222 ParamIn_1.FieldName=FieldName_1; 2218 2223 ParamIn_1.VelType=VelType_1; 2219 %ParamIn_1.GUIName='get_field_1'; 2224 ParamIn_1.Coord_x=get(handles.Coord_x,'String'); 2225 ParamIn_1.Coord_y=get(handles.Coord_y,'Data'); 2220 2226 end 2221 2227 [Field{2},ParamOut_1,errormsg] = read_field(FileName_1,UvData.FileType{2},ParamIn_1,frame_index_1); … … 2273 2279 % end 2274 2280 elseif ~test_keepdata_1 2275 if (~strcmp(UvData.FileType{2},'netcdf')&&~strcmp(UvData.FileType{2},'civdata')&&~strcmp(UvData.FileType{2},'civx'))|| isequal(FieldName_1,'get_field...') 2276 set(handles.VelType_1,'Visible','off') 2277 else 2281 if (strcmp(UvData.FileType{2},'civx')||strcmp(UvData.FileType{2},'civdata'))&& ~strcmp(FieldName_1,'get_field...') 2282 % if (~strcmp(UvData.FileType{2},'netcdf')&&~strcmp(UvData.FileType{2},'civdata')&&~strcmp(UvData.FileType{2},'civx'))|| isequal(FieldName_1,'get_field...') 2278 2283 test_veltype_1=1; 2279 2284 set(handles.VelType_1,'Visible','on') … … 2282 2287 set(handles.VelType_1,'Value',1+find(index_menu,1)) 2283 2288 set(handles.VelType_1,'String',[{''};menu]) 2289 else 2290 set(handles.VelType_1,'Visible','off') 2284 2291 end 2285 2292 % update the second field menu: the same quantity … … 2436 2443 UvData.ParamOut_1=ParamOut_1; 2437 2444 if numel(Field)==2 2438 UvData.Field_1=Field{2}; %store the second field for possible use at next RUN2445 UvData.Field_1=Field{2}; %store the second field for possible use at next RUN 2439 2446 end 2440 2447 … … 2946 2953 TransformName_Callback(hObject, eventdata, handles); 2947 2954 else 2948 run0_Callback(hObject, eventdata, handles)2955 REFRESH_Callback(hObject, eventdata, handles) 2949 2956 end 2950 2957 else … … 3164 3171 UvData.FileType{1}='netcdf'; 3165 3172 set(handles.uvmat,'UserData',UvData) 3166 run0_Callback(hObject, eventdata, handles)3173 REFRESH_Callback(hObject, eventdata, handles) 3167 3174 end 3168 3175 … … 3186 3193 display_file_name(handles,imagename)%display the image 3187 3194 otherwise 3188 run0_Callback(hObject, eventdata, handles)3195 REFRESH_Callback(hObject, eventdata, handles) 3189 3196 end 3190 3197 … … 3223 3230 switch field_1 3224 3231 case 'get_field...' 3225 set_veltype_display(0) % no veltype display 3226 hget_field=findobj(allchild(0),'name','get_field_1'); 3227 if ~isempty(hget_field) 3228 delete(hget_field) 3229 end 3230 hget_field=get_field(FileName_1); 3231 set(hget_field,'name','get_field_1') 3232 hhget_field=guidata(hget_field); 3233 set(hhget_field.list_fig,'Value',1) 3234 set(hhget_field.list_fig,'String',{'uvmat'}) 3235 if check_new 3236 UvData.FileType{2}=UvData.FileType{1}; 3237 set(handles.FileIndex_1,'String',get(handles.FileIndex,'String')) 3238 set(handles.uvmat,'UserData',UvData) 3239 end 3232 %% fill the coordinates and variables from selections in get_field 3233 ParamIn=[]; 3234 % in case of civ data, we use the civ choice as default input for the GUI get_field 3235 if strcmp(get(handles.VelType_1,'Visible'),'on') 3236 ParamIn.SwitchVarIndexTime='attribute'; 3237 ListVelType=get(handles.VelType_1,'String'); 3238 VelType=ListVelType{get(handles.VelType_1,'Value')}; 3239 switch VelType 3240 case 'civ1' 3241 ParamIn.TimeAttrName='Civ1_Time'; 3242 ParamIn.vector_x='Civ1_U'; 3243 ParamIn.vector_y='Civ1_V'; 3244 ParamIn.vec_color='Civ1_C'; 3245 case 'filter1' 3246 ParamIn.TimeAttrName='Civ1_Time'; 3247 ParamIn.vector_x='Civ1_U_smooth'; 3248 ParamIn.vector_y='Civ1_V_smooth'; 3249 case 'civ2' 3250 ParamIn.TimeAttrName='Civ2_Time'; 3251 ParamIn.vector_x='Civ2_U'; 3252 ParamIn.vector_y='Civ2_V'; 3253 case 'filter2' 3254 ParamIn.TimeAttrName='Civ2_Time'; 3255 ParamIn.vector_x='Civ2_U_smooth'; 3256 ParamIn.vector_y='Civ2_V_smooth'; 3257 ParamIn.vec_color='Civ2_C'; 3258 end 3259 end 3260 3261 % VelType menu desactivated 3262 set(handles.FixVelType,'visible','off') 3263 set(handles.VelType,'Visible','off') 3264 3265 %read selection from get_field 3266 [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes_1(handles); 3267 FileName=[fullfile(RootPath,SubDir,RootFile) FileIndices FileExt]; 3268 GetFieldData=get_field(FileName,ParamIn);% inport field names from the GUI get_field 3269 FieldList={}; 3270 VecColorList={}; 3271 switch GetFieldData.FieldOption 3272 case 'vectors' 3273 UName=GetFieldData.PanelVectors.vector_x; 3274 VName=GetFieldData.PanelVectors.vector_y; 3275 YName={GetFieldData.Coordinates.Coord_y}; 3276 CName=GetFieldData.PanelVectors.vec_color; 3277 FieldList={['vec(' UName ',' VName ')'];... 3278 ['norm(' UName ',' VName ')'];... 3279 UName;VName}; 3280 VecColorList={['norm(' UName ',' VName ')'];... 3281 UName;VName}; 3282 if ~isempty(CName) 3283 VecColorList=[{CName};VecColorList]; 3284 end 3285 case 'scalar' 3286 AName=GetFieldData.PanelScalar.scalar; 3287 YName={GetFieldData.Coordinates.Coord_y}; 3288 FieldList={AName}; 3289 case '1D plot' 3290 YName=GetFieldData.PanelOrdinate.ordinate; 3291 case 'civdata...'%reinitiate input, return to automatic civ data reading 3292 display_file_name(handles,FileName,1) 3293 end 3294 if ~strcmp(GetFieldData.FieldOption,'civdata...') 3295 XName=GetFieldData.Coordinates.Coord_x; 3296 TimeNameStr=GetFieldData.Time.SwitchVarIndexTime; 3297 switch TimeNameStr 3298 case 'file index' 3299 set(handles.TimeName_1,'String',''); 3300 case 'attribute' 3301 set(handles.TimeName_1,'String',['att:' GetFieldData.Time.TimeName]); 3302 case 'variable' 3303 set(handles.TimeName_1,'String',['var:' GetFieldData.Time.TimeName]) 3304 set(handles.NomType_1,'String','*') 3305 set(handles.RootFile_1,'String',[get(handles.RootFile,'String') get(handles.FileIndex,'String')]) 3306 set(handles.FileIndex_1,'String','') 3307 ParamIn.TimeVarName=GetFieldData.Time.TimeName; 3308 case 'matrix_index' 3309 set(handles.TimeName_1,'String',['dim:' GetFieldData.Time.TimeName]); 3310 set(handles.NomType_1,'String','*') 3311 set(handles.RootFile_1,'String',[get(handles.RootFile,'String') get(handles.FileIndex,'String')]) 3312 set(handles.FileIndex_1,'String','') 3313 ParamIn.TimeDimName_1=GetFieldData.Time.TimeName; 3314 end 3315 set(handles.Coord_x,'String',XName) 3316 if ischar(YName) 3317 YName={YName}; 3318 end 3319 set(handles.Coord_y,'Data',YName) 3320 set(handles.FieldName_1,'Value',1) 3321 set(handles.FieldName_1,'String',[FieldList; {'get_field...'}]); 3322 set(handles.ColorScalar,'Value',1) 3323 set(handles.ColorScalar,'String',VecColorList); 3324 UvData.FileType{2}='netcdf'; 3325 set(handles.uvmat,'UserData',UvData) 3326 REFRESH_Callback(hObject, eventdata, handles) 3327 end 3328 3329 % set_veltype_display(0) % no veltype display 3330 % hget_field=findobj(allchild(0),'name','get_field_1'); 3331 % if ~isempty(hget_field) 3332 % delete(hget_field) 3333 % end 3334 % hget_field=get_field(FileName_1); 3335 % set(hget_field,'name','get_field_1') 3336 % hhget_field=guidata(hget_field); 3337 % set(hhget_field.list_fig,'Value',1) 3338 % set(hhget_field.list_fig,'String',{'uvmat'}) 3339 % if check_new 3340 % UvData.FileType{2}=UvData.FileType{1}; 3341 % set(handles.FileIndex_1,'String',get(handles.FileIndex,'String')) 3342 % set(handles.uvmat,'UserData',UvData) 3343 % end 3240 3344 case 'image' 3241 3345 %% look for image corresponding to civ data … … 3283 3387 3284 3388 if check_refresh && ~(isfield(UvData,'NewSeries')&&isequal(UvData.NewSeries,1)) 3285 run0_Callback(hObject, eventdata, handles)3389 REFRESH_Callback(hObject, eventdata, handles) 3286 3390 end 3287 3391 end … … 3328 3432 function FixVelType_Callback(hObject, eventdata, handles) 3329 3433 %------------------------------------------------------------------------ 3330 % refresh the current plot if the fixed veltype is unselected3434 % inputfilerefresh the current plot if the fixed veltype is unselected 3331 3435 if ~get(handles.FixVelType,'Value') 3332 run0_Callback(hObject, eventdata, handles)3436 REFRESH_Callback(hObject, eventdata, handles) 3333 3437 end 3334 3438 … … 3338 3442 %------------------------------------------------------------------------ 3339 3443 set(handles.FixVelType,'Value',1) 3340 run0_Callback(hObject, eventdata, handles)3444 REFRESH_Callback(hObject, eventdata, handles) 3341 3445 3342 3446 %------------------------------------------------------------------------ … … 3346 3450 set(handles.FixVelType,'Value',1)% the velocity type is now imposed by the GUI (not automatic) 3347 3451 UvData=get(handles.uvmat,'UserData'); 3348 set(handles. run0,'BackgroundColor',[1 1 0])%paint run0button in yellow to indicate its activation3452 set(handles.InputFileREFRESH,'BackgroundColor',[1 1 0])%paint REFRESH button in yellow to indicate its activation 3349 3453 drawnow 3350 3454 InputFile=read_GUI(handles.InputFile);% read the input file parameters … … 3376 3480 end 3377 3481 3378 % refresh the current plot if it has not been done previously3482 % inputfilerefresh the current plot if it has not been done previously 3379 3483 if check_refresh 3380 3484 UvData.FileName_1='';% desactivate the use of a constant second file … … 3396 3500 set(handles.FileIndex_1,'BackgroundColor',[1 1 1]) 3397 3501 end 3398 set(handles. run0,'BackgroundColor',[1 0 0])3502 set(handles.InputFileREFRESH,'BackgroundColor',[1 0 0]) 3399 3503 end 3400 3504 … … 3715 3819 set(handles.uvmat,'UserData',UvData) 3716 3820 3717 %% refresh the current plot3821 %% inputfilerefresh the current plot 3718 3822 if isempty(list_path{ichoice}) || nargin(transform_handle)<3 3719 3823 set(handles.SubField,'Value',0) 3720 3824 SubField_Callback(hObject, eventdata, handles) 3721 3825 else 3722 run0_Callback(hObject, eventdata, handles)3826 REFRESH_Callback(hObject, eventdata, handles) 3723 3827 end 3724 3828 … … 3945 4049 update_color_code_boxes(handles); 3946 4050 %replot the current graph 3947 run0_Callback(hObject, eventdata, handles)4051 REFRESH_Callback(hObject, eventdata, handles) 3948 4052 3949 4053 %---------------------------------------------------------------- … … 4066 4170 function update_plot(handles) 4067 4171 %------------------------------------------------------------------- 4068 set(handles. run0,'BackgroundColor',[1 1 0]);% display plot activity by yellow color4172 set(handles.REFRESH,'BackgroundColor',[1 1 0]);% display plot activity by yellow color 4069 4173 drawnow 4070 4174 UvData=get(handles.uvmat,'UserData'); … … 4077 4181 return 4078 4182 end 4079 set(handles. run0,'BackgroundColor',[1 0 0]);4183 set(handles.REFRESH,'BackgroundColor',[1 0 0]); 4080 4184 4081 4185 %------------------------------------------------------------------------ … … 4456 4560 function MenuExportFigure_Callback(hObject, eventdata, handles) 4457 4561 %------------------------------------------------------------------------ 4458 % huvmat=get(handles.MenuExport,'parent');4459 4562 hfig=figure; 4460 4563 copyobj(handles.PlotAxes,hfig); 4564 h=findobj(handles.PlotAxes,'tag','ima'); %look for image in the plot 4565 if ~isempty(h) 4461 4566 map=colormap(handles.PlotAxes); 4462 4567 colormap(map);%transmit the current colormap to the zoom fig 4463 4568 colorbar 4569 end 4464 4570 4465 4571 % -------------------------------------------------------------------- … … 4523 4629 % -------------------------------------------------------------------- 4524 4630 set(handles.MenuExportMovie,'BusyAction','queue')% activate the button 4525 huvmat=get(handles. run0,'parent');4631 huvmat=get(handles.InputFileREFRESH,'parent'); 4526 4632 UvData=get(huvmat,'UserData'); 4527 4633 %[xx,xx,FileBase]=read_file_boxes(handles);
Note: See TracChangeset
for help on using the changeset viewer.