Changeset 646 for trunk/src/uvmat.m
- Timestamp:
- Jun 2, 2013, 4:00:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r644 r646 190 190 LowY=round(ScreenSize(4)/2-Height/2); % put at the middle height on the screen 191 191 set(hObject,'Position',[LeftX LowY Width Height]) 192 193 %set(hObject,'Units','Normalized')194 195 %UvData.OpenParam.PosColorbar=[0.8450 0.0900 0.0190 0.3600];196 192 UvData.OpenParam.PosColorbar=[0.80 0.02 0.018 0.445]; 197 %UvData.OpenParam.PosSetObject=[-0.05 -0.03 0.3 0.7]; %position for set_object198 193 UvData.OpenParam.PosGeometryCalib=[0.95 -0.03 0.28 1 ];%position for geometry_calib (TO IMPROVE) 199 % UvData.OpenParam.CalSize=[0.28 1];200 % UvData.PlotAxes=[];%initiate the record of plotted field201 % UvData.axes2=[];202 % UvData.axes1=[];203 194 AxeData.LimEditBox=1; %initialise AxeData 204 195 set(handles.PlotAxes,'UserData',AxeData) 196 % position of table Coord_y 197 set(handles.Coord_y,'Unit','pixel') 198 Pos=get(handles.Coord_y,'Position'); 199 set(handles.Coord_y,'Unit','normalized') 200 set(handles.Coord_y,'ColumnWidth',{Pos(3)}) 201 set(handles.Coord_y,'ColumnFormat',{'char'}) 202 set(handles.Coord_y,'ColumnEditable',false) 203 set(handles.Coord_y,'ColumnName',{''}) 205 204 206 205 %% set functions for the mouse and keyboard … … 344 343 ColumnWidth=max(150,0.18*size_fig(3)); 345 344 ColumnWidth=min(ColumnWidth,250); % width of the right side display column, between 150 and 250, depending on the fig width 346 % Data=get(handles.uvmat,'UserData');347 % Data.GUISize=size_fig;348 % set(handles.uvmat,'UserData',Data)349 350 345 351 346 %% position of panel InputFile 352 %set(handles.InputFile,'Units','pixels')347 set(handles.InputFile,'Units','pixels') 353 348 pos_InputFile=get(handles.InputFile,'Position');% [lower x lower y width height] for text_display 354 349 pos_InputFile(1)=0; 355 350 pos_InputFile(2)=size_fig(4)-pos_InputFile(4); % set frame InputFile to the top of the fig 356 351 pos_InputFile(3)=size_fig(3); 357 358 352 set(handles.InputFile,'Position',pos_InputFile);% [lower x lower y width height] for text_display 359 353 360 354 %% reset position of text_display or TableDisplay 361 355 if strcmp(get(handles.TableDisplay,'Visible'),'off') 356 set(handles.text_display,'Units','pixels') 362 357 pos_1=get(handles.text_display,'Position');% [lower x lower y width height] for text_display 363 358 pos_1(3)=1.2*ColumnWidth; … … 367 362 % reset position of TableDisplay 368 363 else 364 set(handles.TableDisplay,'Units','pixels') 369 365 pos_1=get(handles.TableDisplay,'Position'); 370 366 pos_1(3)=1.2*ColumnWidth; … … 381 377 382 378 %% reset position of Coordinates 379 set(handles.Coordinates,'Units','pixels') 383 380 pos_2=get(handles.Coordinates,'Position');% [lower x lower y width height] for frame 'Coordinates' 384 381 pos_2(3)=ColumnWidth; … … 388 385 389 386 %% reset position of Scalar 387 set(handles.Scalar,'Units','pixels') 390 388 pos_3=get(handles.Scalar,'Position'); % [lower x lower y width height] for frame 'Scalar' 391 389 pos_3(3)=ColumnWidth; … … 415 413 pos(3)=0.77*size_fig(3)-1.2*ColumnWidth; 416 414 pos(4)=size_fig(4)-60; 415 set(handles.PlotAxes,'Units','pixels') 417 416 set(handles.PlotAxes,'Position',pos) 418 417 … … 1094 1093 %% update the data attached to the uvmat interface 1095 1094 if ~isempty(TimeUnit) 1096 set(handles.time_ txt,'String',['time (' TimeUnit ')'])1095 set(handles.time_var,'String',['time (' TimeUnit ')']) 1097 1096 end 1098 1097 UvData.TimeUnit=TimeUnit; … … 1109 1108 switch FileType 1110 1109 case {'civx','civdata'} 1111 % [FieldList,ColorList]=calc_field;1112 1110 [FieldList,ColorList]=set_field_list('U','V','C'); 1113 1111 set(handles_Fields,'String',[{'image'};FieldList;{'get_field...'}]);%standard menu for civx data … … 1121 1119 set(handles.Vectors,'Visible','on') 1122 1120 set(handles.Coord_x,'Value',1); 1123 set(handles.Coord_x,'String', {'X'});1124 set(handles.Coord_y,'Value',1);1125 set(handles.Coord_y,' String',{'Y'});1121 set(handles.Coord_x,'String','X'); 1122 % set(handles.Coord_y,'Value',1); 1123 set(handles.Coord_y,'Data',{'Y'}); 1126 1124 case 'netcdf' 1127 1125 set(handles_Fields,'Value',1) 1128 1126 set(handles_Fields,'String',{'get_field...'}) 1129 1127 FieldName_Callback([],[], handles) 1130 % hget_field=get_field(FileName);1131 % hhget_field=guidata(hget_field);1132 % get_field('RUN_Callback',hhget_field.RUN,[],hhget_field);1133 1128 otherwise 1134 1129 set(handles_Fields,'Value',1) % set menu to 'image' 1135 1130 set(handles_Fields,'String',{'image'}) 1136 1131 set(handles.Coord_x,'Value',1); 1137 set(handles.Coord_x,'String',{'AX'}); 1138 set(handles.Coord_y,'Value',1); 1139 set(handles.Coord_y,'String',{'AY'}); 1132 set(handles.Coord_x,'String','AX'); 1133 set(handles.Coord_y,'Data',{'AY'}); 1140 1134 end 1141 1135 set(handles.uvmat,'UserData',UvData) … … 2118 2112 list_fields=get(handles.FieldName,'String');% list menu fields 2119 2113 FieldName= list_fields{get(handles.FieldName,'Value')}; % selected field 2120 % if get_field... is selected, the GUI get_field will be used to enter fields2121 2114 if ~strcmp(FieldName,'get_field...') 2122 2115 if get(handles.FixVelType,'Value') … … 2164 2157 ParamIn.Coord_x=XNameMenu(get(handles.Coord_x,'Value')); 2165 2158 end 2166 YNameMenu=get(handles.Coord_y,'String'); 2167 if ~isempty(YNameMenu) 2168 ParamIn.Coord_y=YNameMenu(get(handles.Coord_y,'Value')); 2169 end 2159 % YNameMenu=get(handles.Coord_y,'String'); 2160 ParamIn.Coord_y=get(handles.Coord_y,'Data'); 2161 % if ~isempty(YNameMenu) 2162 % ParamIn.Coord_y=YNameMenu(get(handles.Coord_y,'Value')); 2163 % end 2170 2164 end 2171 2165 check_tps = 0; … … 2271 2265 &&~strcmp(ParamOut_1.FieldName,'velocity') && ~strcmp(ParamOut_1.FieldName,'get_field...') 2272 2266 if ~check_proj_tps 2273 % Field{2}=calc_field([{ParamOut_1.FieldName} {ParamOut_1.ColorVar}],Field{2});2274 2267 end 2275 2268 end … … 2289 2282 %% update the display menu for the first velocity type (first menuline) 2290 2283 test_veltype=0; 2291 % if ~isequal(FileType,'netcdf')|| isequal(FieldName,'get_field...')2292 2284 if (strcmp(UvData.FileType{1},'civx')||strcmp(UvData.FileType{1},'civdata'))&& ~strcmp(FieldName,'get_field...') 2293 2285 test_veltype=1; … … 3165 3157 [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes(handles); 3166 3158 FileName=[fullfile(RootPath,SubDir,RootFile) FileIndices FileExt]; 3167 % hget_field=findobj(allchild(0),'name','get_field');3168 % if ~isempty(hget_field)3169 % delete(hget_field)3170 % end3171 3159 GetFieldData=get_field(FileName,ParamIn); 3172 3160 FieldList={}; 3173 3161 VecColorList={}; 3174 XName=GetFieldData.XVarName; 3175 if GetFieldData.CheckVector 3162 XName=GetFieldData.Coordinates.XVarName; 3163 switch GetFieldData.FieldOption 3164 case 'vectors' 3176 3165 UName=GetFieldData.PanelVectors.vector_x; 3177 3166 VName=GetFieldData.PanelVectors.vector_y; 3178 XName=GetFieldData. XVarName;3179 YName=GetFieldData. YVarName;3167 XName=GetFieldData.Coordinates.XVarName; 3168 YName=GetFieldData.Coordinates.YVarName; 3180 3169 CName=GetFieldData.PanelVectors.vec_color; 3181 3170 [FieldList,VecColorList]=set_field_list(UName,VName,CName); 3182 elseif GetFieldData.CheckScalar3171 case 'scalar' 3183 3172 AName=GetFieldData.PanelScalar.scalar; 3184 XName=GetFieldData. XVarName;3185 YName=GetFieldData. YVarName;3173 XName=GetFieldData.Coordinates.XVarName; 3174 YName=GetFieldData.Coordinates.YVarName; 3186 3175 FieldList={AName}; 3187 elseif GetFieldData.CheckPlot1D;3176 case '1D plot' 3188 3177 YName=GetFieldData.CheckPlot1D.ordinate; 3189 3178 end … … 5275 5264 Param.Coord_x_str=get(handles.Coord_x,'String'); 5276 5265 Param.Coord_x_val=get(handles.Coord_x,'Value'); 5277 Param.Coord_y_str=get(handles.Coord_y,'String'); 5278 Param.Coord_y_val=get(handles.Coord_y,'Value'); 5266 %Param.Coord_y_str=get(handles.Coord_y,'String'); 5267 Param.Coord_y_str=get(handles.Coord_y,'Data'); 5268 %Param.Coord_y_val=get(handles.Coord_y,'Value'); 5279 5269 series(Param); %run the series interface 5280 5270 … … 5290 5280 function MenuHelp_Callback(hObject, eventdata, handles) 5291 5281 % -------------------------------------------------------------------- 5292 path_to_uvmat=which ('uvmat');% check the path of uvmat 5293 pathelp=fileparts(path_to_uvmat); 5294 helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html'); 5295 if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package') 5296 else 5297 addpath (fullfile(pathelp,'uvmat_doc')) 5298 web(helpfile); 5299 end 5282 web('http://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/wiki/UvmatHelp') 5283 5284 % path_to_uvmat=which ('uvmat');% check the path of uvmat 5285 % pathelp=fileparts(path_to_uvmat); 5286 % helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html'); 5287 % if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package') 5288 % else 5289 % addpath (fullfile(pathelp,'uvmat_doc')) 5290 % web(helpfile); 5291 % end 5300 5292 5301 5293 % --- Executes on selection change in Coord_y. … … 5423 5415 end 5424 5416 end 5417 5418 5419 5420 function time_var_1_Callback(hObject, eventdata, handles) 5421 % hObject handle to time_var_1 (see GCBO) 5422 % eventdata reserved - to be defined in a future version of MATLAB 5423 % handles structure with handles and user data (see GUIDATA) 5424 5425 % Hints: get(hObject,'String') returns contents of time_var_1 as text 5426 % str2double(get(hObject,'String')) returns contents of time_var_1 as a double 5427 5428 5429 % --- Executes during object creation, after setting all properties. 5430 function time_var_1_CreateFcn(hObject, eventdata, handles) 5431 % hObject handle to time_var_1 (see GCBO) 5432 % eventdata reserved - to be defined in a future version of MATLAB 5433 % handles empty - handles not created until after all CreateFcns called 5434 5435 % Hint: edit controls usually have a white background on Windows. 5436 % See ISPC and COMPUTER. 5437 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 5438 set(hObject,'BackgroundColor','white'); 5439 end
Note: See TracChangeset
for help on using the changeset viewer.