- Timestamp:
- Mar 13, 2013, 9:12:09 AM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_field.m
r582 r586 406 406 set(handles.CheckScalar,'Value',0) 407 407 set(handles.PanelVectors,'Visible','on') 408 set(handles.XVarName,'Visible','on') 409 set(handles.YVarName,'Visible','on') 410 set(handles.X_title,'Visible','on') 411 set(handles.Y_title,'Visible','on') 408 412 end 409 413 … … 413 417 function scalar_Callback(hObject, eventdata, handles) 414 418 %------------------------------------------------------------------------ 419 Field=get(handles.get_field,'UserData'); 415 420 index=get(handles.scalar,'Value'); 416 421 string=get(handles.scalar,'String'); … … 420 425 %eliminate time 421 426 TimeDimName='';%default 422 if strcmp(get(handles.TimeDimensionMenu,'Visible'),'on') 423 TimeDimList=get(handles.TimeDimensionMenu,'String'); 424 TimeDimIndex=get(handles.TimeDimensionMenu,'Value'); 425 TimeDimName=TimeDimList{TimeDimIndex}; 426 end 427 SwitchVarIndexTime=get(handles.SwitchVarIndexTime,'String'); 428 TimeVarOption=SwitchVarIndexTime{get(handles.SwitchVarIndexTime,'Value')}; 429 if strcmp(TimeVarOption,'variable') 430 List=get(handles.TimeVarName,'String'); 431 TimeVarName=List{get(handles.TimeVarName,'Value')}; 432 elseif strcmp(TimeVarOption,'dim index') 433 List=get(handles.TimeVarName,'String'); 434 TimeDimName=List{get(handles.TimeVarName,'Value')}; 435 end 436 % A completer 437 % if strcmp(get(handles.TimeDimensionMenu,'Visible'),'on') 438 % TimeDimList=get(handles.TimeDimensionMenu,'String'); 439 % TimeDimIndex=get(handles.TimeDimensionMenu,'Value'); 440 % TimeDimName=TimeDimList{TimeDimIndex}; 441 % end 427 442 428 443 %check possible coordinates … … 432 447 for ilist=1:numel(Field.VarDimName) 433 448 dimnames=Field.VarDimName{ilist}; %list of dimensions for variable #ilist 434 if isequal(dimnames, {TimeDimName})449 if isequal(dimnames,TimeDimName) 435 450 test_coord(ilist)=0;%mark time variables fo elimination 451 end 452 if ischar(dimnames) 453 dimnames={dimnames}; 436 454 end 437 455 for idim=1:numel(dimnames) -
trunk/src/proj_field.m
r581 r586 2187 2187 2188 2188 %% transfer coordinate unit 2189 if isfield(ProjData,'CoordUnit') 2190 ProjData=rmfield(ProjData,'CoordUnit');% do not transfer by default (to avoid x/y=1 for profiles) 2191 end 2189 2192 if isfield(FieldData,'CoordUnit') 2190 2193 if isfield(ObjectData,'CoordUnit') && ~strcmp(FieldData.CoordUnit,ObjectData.CoordUnit) 2191 2194 errormsg=[ObjectData.Type ' in ' ObjectData.CoordUnit ' coordinates, while field in ' FieldData.CoordUnit ]; 2192 2195 return 2193 else 2196 elseif strcmp(ObjectData.Type,'plane')|| strcmp(ObjectData.Type,'volume') 2194 2197 ProjData.CoordUnit=FieldData.CoordUnit; 2195 2198 end -
trunk/src/series.m
r554 r586 1374 1374 set(handles.RUN,'BackgroundColor',[1 0 0]) 1375 1375 set(handles.RUN,'enable','on') 1376 % set(handles.BATCH,'BackgroundColor',[1 0 0])1377 % set(handles.BATCH,'enable','on')1378 1379 %------------------------------------------------------------------------1380 % --- Executes on button press in BATCH.1381 function BATCH_Callback(hObject, eventdata, handles)1382 %------------------------------------------------------------------------1383 1384 1376 1385 1377 % %------------------------------------------------------------------------ … … 1470 1462 index=get(handles.ActionName,'Value'); 1471 1463 action= list_action{index}; % selected string 1472 %Series.Action=action;%name of the processing programme1473 1464 Series.hseries=handles.series; % handles to the series GUI 1474 1465 path_series=which('series'); … … 1520 1511 end 1521 1512 Series.OutputDirExt=regexprep(SubDirOutNew,Series.OutputSubDir,''); 1522 % Series.OutputSubDir=SubDirOutNew;1523 % Series.OutputDir=fullfile(Series.InputTable{1,1},Series.OutputSubDir);%directory set for output results1524 1513 Series.OutputRootFile=Series.InputTable{1,3};% the first sorted RootFile taken for output 1525 1514 set(handles.OutputDirExt,'String',Series.OutputDirExt) … … 2056 2045 set(handles.PairString,'Unit','normalized') 2057 2046 set(handles.PairString,'ColumnWidth',{Pos(3)-5}) 2047 2048 2049 % --- Executes on button press in status. 2050 function status_Callback(hObject, eventdata, handles) 2051 val=get(handles.status,'Value'); 2052 if val==0 2053 set(handles.status,'BackgroundColor',[0 1 0]) 2054 hfig=findobj(allchild(0),'name','series_status'); 2055 if ~isempty(hfig) 2056 delete(hfig) 2057 end 2058 return 2059 end 2060 set(handles.status,'BackgroundColor',[1 1 0]) 2061 drawnow 2062 % listtype={'civ1','fix1','patch1','civ2','fix2','patch2'}; 2063 % Param.CheckCiv1=get(handles.CheckCiv1,'Value'); 2064 % Param.CheckFix1=get(handles.CheckFix1,'Value'); 2065 % Param.CheckPatch1=get(handles.CheckPatch1,'Value'); 2066 % Param.CheckCiv2=get(handles.CheckCiv2,'Value'); 2067 % Param.CheckFix2=get(handles.CheckFix2,'Value'); 2068 % Param.CheckPatch2=get(handles.CheckPatch2,'Value'); 2069 % box_test=[Param.CheckCiv1 Param.CheckFix1 Param.CheckPatch1 Param.CheckCiv2 Param.CheckFix2 Param.CheckPatch2]; 2070 % 2071 % option_civ=find(box_test,1,'last');%last selected option (non-zero index of box_test) 2072 % filecell=get(handles.civ,'UserData');%retrieve the list of output files expected for PIV 2073 % test_new=0; 2074 % if ~isfield(filecell,'nc') 2075 % test_new=1; 2076 % [ref_i,ref_j,errormsg]=find_ref_indices(handles); 2077 % if ~isempty(errormsg) 2078 % msgbox_uvmat('ERROR',errormsg) 2079 % return 2080 % end 2081 % filecell=set_civ_filenames(handles,ref_i,ref_j,box_test);%determine the output file expected from the GUI status 2082 % end 2083 % if ~isequal(box_test(4:6),[0 0 0]) 2084 % civ_files=filecell.nc.civ2;%case of civ2 operations 2085 % else 2086 % civ_files=filecell.nc.civ1; 2087 % end 2088 hfig=findobj(allchild(0),'name','series_status'); 2089 if isempty(hfig) 2090 hfig=figure('DeleteFcn',@stop_status); 2091 set(hfig,'MenuBar','none')% suppress the menu bar 2092 set(hfig,'NumberTitle','off')%suppress the fig number in the title 2093 set(hfig,'name','series_status') 2094 set(hfig,'tag','series_status') 2095 % set(hfig,'UserData',civ_files) 2096 hlist= uicontrol('Style','listbox','Units','normalized', 'Position',[0.05 0.09 0.9 0.71], 'Callback', {'open_uvmat'},'tag','list'); 2097 uicontrol('Style','edit','Units','normalized', 'Position', [0.05 0.87 0.9 0.1],'tag','msgbox','Max',2,'String','checking files...'); 2098 uicontrol('Style','frame','Units','normalized', 'Position', [0.05 0.81 0.9 0.05]); 2099 uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.7 0.01 0.2 0.07],'String','Close','FontWeight','bold','FontUnits','normalized','FontSize',0.9,'Callback',@close_GUI); 2100 hrefresh=uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.1 0.01 0.2 0.07],'String','Refresh','FontWeight','bold','FontUnits','normalized','FontSize',0.9,'Callback',@refresh_GUI); 2101 BarPosition=[0.05 0.81 0.01 0.05]; 2102 uicontrol('Style','frame','Units','normalized', 'Position',BarPosition ,'BackgroundColor',[1 0 0],'tag','waitbar'); 2103 drawnow 2104 end 2105 StatusData.time_ref=get(handles.RUN,'UserData');% get the time of launch 2106 % StatusData.option_civ=option_civ; 2107 set(hrefresh,'UserData',StatusData) 2108 Param=read_GUI(handles.series); 2109 RootPath=Param.InputTable{1,1}; 2110 SubDir=Param.InputTable{1,2}; 2111 OutputSubDir=[Param.OutputSubDir Param.OutputDirExt];% subdirectory for output files 2112 OutputDir=fullfile(RootPath,SubDir,OutputSubDir); 2113 set(hlist,'UserData',OutputDir) 2114 %refresh_GUI(hrefresh,[]) -
trunk/src/set_object.m
r581 r586 486 486 else 487 487 % create tps coeff if needed for ProjMode 'interp_tps' 488 if strcmp(ObjectData.ProjMode,'interp_tps')&&~isfield(UvData.Field,'Coord_tps') 489 UvData.Field=calc_tps(UvData.Field,1); 488 if strcmp(ObjectData.ProjMode,'interp_tps')&&~isfield(UvData.Field,'Coord_tps') 489 %UvData.Field=calc_tps(UvData.Field,1); 490 [UvData.Field,errormsg]=tps_coeff_field(UvData.Field,1); 491 if ~isempty(errormsg) 492 msgbox_uvmat('ERROR', ['set_object/tps_coeff_field/' errormsg]) 493 set(handles.PLOT,'enable','on') 494 return 495 end 490 496 end 491 497 [ProjData,errormsg]= proj_field(UvData.Field,ObjectData);%project the current field of uvmat on ObjectData 492 498 if ~isempty(errormsg) 493 msgbox_uvmat('ERROR', errormsg)499 msgbox_uvmat('ERROR', ['set_object/proj_field/' errormsg]) 494 500 set(handles.PLOT,'enable','on') 495 501 return 496 end 502 end 497 503 if isequal(IndexObj_1,IndexObj) % if the projection is in uvmat 498 504 PlotType=plot_field(ProjData,hhuvmat.PlotAxes,read_GUI(get(hhuvmat.PlotAxes,'parent')));%update the current uvmat plot 499 505 else % if the projection is in view_field 500 506 hview_field=findobj(allchild(0),'tag','view_field'); … … 509 515 return 510 516 end 511 % write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object517 % write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object 512 518 end 513 519 haxes=findobj(hview_field,'tag','axes3'); … … 523 529 set(hview_field,'Position',Data.GUISize) 524 530 end 525 % set(hhuvmat.ViewField,'Value',1)% indicate that the field projection on the current object is plotted in view_field531 % set(hhuvmat.ViewField,'Value',1)% indicate that the field projection on the current object is plotted in view_field 526 532 end 527 533 end -
trunk/src/tps_coeff.m
r581 r586 29 29 function [U_smooth,U_tps]=tps_coeff(ctrs,U,Smoothing) 30 30 %------------------------------------------------------------------------ 31 31 warning off 32 32 N=size(ctrs,1);% nbre of source centres 33 33 NbDim=size(ctrs,2);% space dimension (2 or 3) -
trunk/src/uvmat.m
r582 r586 3109 3109 UName=GetFieldData.PanelVectors.vector_x; 3110 3110 VName=GetFieldData.PanelVectors.vector_y; 3111 XName=GetFieldData. PanelVectors.coord_x_vectors;3112 YName=GetFieldData. PanelVectors.coord_y_vectors;3111 XName=GetFieldData.XVarName; 3112 YName=GetFieldData.YVarName; 3113 3113 CName=GetFieldData.PanelVectors.vec_color; 3114 3114 [FieldList,VecColorList]=set_field_list(UName,VName,CName); … … 3127 3127 if GetFieldData.CheckScalar 3128 3128 AName=GetFieldData.PanelScalar.scalar; 3129 XName=GetFieldData. PanelScalar.coord_x_scalar;3130 YName=GetFieldData. PanelScalar.coord_y_scalar;3129 XName=GetFieldData.XVarName; 3130 YName=GetFieldData.YVarName; 3131 3131 FieldList={AName}; 3132 3132 end
Note: See TracChangeset
for help on using the changeset viewer.