Changeset 596
- Timestamp:
- Mar 30, 2013, 11:34:27 AM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r595 r596 4448 4448 ' -f ' filename '.nc -m ' num2str(Param.(patchname).Nx)... 4449 4449 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).FieldSmooth)... 4450 ' -nopt ' num2str(Param.(patchname).Sub domainSize) ...4450 ' -nopt ' num2str(Param.(patchname).SubDomainSize) ... 4451 4451 ' > ' regexprep(filename,'(.+)/(.+$)','$1/0_LOG/$2.') lower(patchname) '.log 2>&1']; % redirect standard output to the log file 4452 4452 else … … 4454 4454 '" -f "' filename '.nc" -m ' num2str(Param.(patchname).Nx)... 4455 4455 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).FieldSmooth)... 4456 ' -nopt ' num2str(Param.(patchname).Sub domainSize)...4456 ' -nopt ' num2str(Param.(patchname).SubDomainSize)... 4457 4457 ' > "' filename '.' lower(patchname) '.log" 2>&1']; % redirect standard output to the log file 4458 4458 cmd=regexprep(cmd,'\\','\\\\'); -
trunk/src/civ_matlab.m
r594 r596 5 5 % filter_tps: make interpolation-smoothing 6 6 %------------------------------------------------------------------------ 7 % function [Data,errormsg,result_conv]= civ_ uvmat(Param,ncfile)7 % function [Data,errormsg,result_conv]= civ_matlab(Param,ncfile) 8 8 % 9 9 %OUTPUT … … 584 584 iref=round(par_civ.Grid(ivec,1)+0.5);% xindex on the image A for the middle of the correlation box 585 585 jref=round(par_civ.ImageHeight-par_civ.Grid(ivec,2)+0.5);% yindex on the image B for the middle of the correlation box 586 if ~(checkmask && par_civ.Mask(jref,iref)<=20) %velocity not set to zero by the black mask 587 % if jref-iby2<1 || jref+iby2>par_civ.ImageHeight|| iref-ibx2<1 || iref+ibx2>par_civ.ImageWidth||... 588 % jref+shifty(ivec)-isy2<1||jref+shifty(ivec)+isy2>par_civ.ImageHeight|| iref+shiftx(ivec)-isx2<1 || iref+shiftx(ivec)+isx2>par_civ.ImageWidth % we are outside the image 589 % F(ivec)=3; 590 % else 591 F(ivec)=0; 592 subrange1_x=iref-ibx2:iref+ibx2;% x indices defining the first subimage 593 subrange1_y=jref-iby2:jref+iby2;% y indices defining the first subimage 594 subrange2_x=iref+shiftx(ivec)-isx2:iref+shiftx(ivec)+isx2;%x indices defining the second subimage 595 subrange2_y=jref+shifty(ivec)-isy2:jref+shifty(ivec)+isy2;%y indices defining the second subimage 596 image1_crop=MinA*ones(numel(subrange1_y),numel(subrange1_x));% default value=min of image A 597 image2_crop=MinA*ones(numel(subrange2_y),numel(subrange2_x));% default value=min of image A 598 check1_x=subrange1_x>=1 & subrange1_x<=par_civ.ImageWidth;% check which points in the subimage 1 are contained in the initial image 1 599 check1_y=subrange1_y>=1 & subrange1_y<=par_civ.ImageHeight; 600 check2_x=subrange2_x>=1 & subrange2_x<=par_civ.ImageWidth;% check which points in the subimage 2 are contained in the initial image 2 601 check2_y=subrange2_y>=1 & subrange2_y<=par_civ.ImageHeight; 602 image1_crop(check1_y,check1_x)=par_civ.ImageA(subrange1_y(check1_y),subrange1_x(check1_x));%extract a subimage (correlation box) from image A 603 image2_crop(check2_y,check2_x)=par_civ.ImageB(subrange2_y(check2_y),subrange2_x(check2_x));%extract a larger subimage (search box) from image B 604 image1_mean=mean(mean(image1_crop)); 605 image2_mean=mean(mean(image2_crop)); 606 %threshold on image minimum 607 if check_MinIma && (image1_mean < par_civ.MinIma || image2_mean < par_civ.MinIma) 586 %if ~(checkmask && par_civ.Mask(jref,iref)<=20) %velocity not set to zero by the black mask 587 % if jref-iby2<1 || jref+iby2>par_civ.ImageHeight|| iref-ibx2<1 || iref+ibx2>par_civ.ImageWidth||... 588 % jref+shifty(ivec)-isy2<1||jref+shifty(ivec)+isy2>par_civ.ImageHeight|| iref+shiftx(ivec)-isx2<1 || iref+shiftx(ivec)+isx2>par_civ.ImageWidth % we are outside the image 589 % F(ivec)=3; 590 % else 591 F(ivec)=0; 592 subrange1_x=iref-ibx2:iref+ibx2;% x indices defining the first subimage 593 subrange1_y=jref-iby2:jref+iby2;% y indices defining the first subimage 594 subrange2_x=iref+shiftx(ivec)-isx2:iref+shiftx(ivec)+isx2;%x indices defining the second subimage 595 subrange2_y=jref+shifty(ivec)-isy2:jref+shifty(ivec)+isy2;%y indices defining the second subimage 596 image1_crop=MinA*ones(numel(subrange1_y),numel(subrange1_x));% default value=min of image A 597 image2_crop=MinA*ones(numel(subrange2_y),numel(subrange2_x));% default value=min of image A 598 check1_x=subrange1_x>=1 & subrange1_x<=par_civ.ImageWidth;% check which points in the subimage 1 are contained in the initial image 1 599 check1_y=subrange1_y>=1 & subrange1_y<=par_civ.ImageHeight; 600 check2_x=subrange2_x>=1 & subrange2_x<=par_civ.ImageWidth;% check which points in the subimage 2 are contained in the initial image 2 601 check2_y=subrange2_y>=1 & subrange2_y<=par_civ.ImageHeight; 602 603 image1_crop(check1_y,check1_x)=par_civ.ImageA(subrange1_y(check1_y),subrange1_x(check1_x));%extract a subimage (correlation box) from image A 604 image2_crop(check2_y,check2_x)=par_civ.ImageB(subrange2_y(check2_y),subrange2_x(check2_x));%extract a larger subimage (search box) from image B 605 image1_mean=mean(mean(image1_crop)); 606 image2_mean=mean(mean(image2_crop)); 607 %threshold on image minimum 608 if check_MinIma && (image1_mean < par_civ.MinIma || image2_mean < par_civ.MinIma) 609 F(ivec)=3; 610 end 611 %threshold on image maximum 612 if check_MaxIma && (image1_mean > par_civ.MaxIma || image2_mean > par_civ.MaxIma) 613 F(ivec)=3; 614 end 615 % end 616 if F(ivec)~=3 617 image1_crop=image1_crop-image1_mean;%substract the mean 618 image2_crop=image2_crop-image2_mean; 619 if CheckDecimal 620 xi=(1:mesh:size(image1_crop,2)); 621 yi=(1:mesh:size(image1_crop,1))'; 622 if CheckDeformation 623 [XI,YI]=meshgrid(xi-ceil(size(image1_crop,2)/2),yi-ceil(size(image1_crop,1)/2)); 624 XIant=XI-par_civ.DUDX(ivec)*XI-par_civ.DUDY(ivec)*YI+ceil(size(image1_crop,2)/2); 625 YIant=YI-par_civ.DVDX(ivec)*XI-par_civ.DVDY(ivec)*YI+ceil(size(image1_crop,1)/2); 626 image1_crop=interp2(image1_crop,XIant,YIant); 627 else 628 image1_crop=interp2(image1_crop,xi,yi); 629 end 630 xi=(1:mesh:size(image2_crop,2)); 631 yi=(1:mesh:size(image2_crop,1))'; 632 image2_crop=interp2(image2_crop,xi,yi); 633 end 634 sum_square=sum(sum(image1_crop.*image1_crop)); 635 %reference: Oliver Pust, PIV: Direct Cross-Correlation 636 result_conv= conv2(image2_crop,flipdim(flipdim(image1_crop,2),1),'valid'); 637 corrmax= max(max(result_conv)); 638 result_conv=(result_conv/corrmax)*255; %normalize, peak=always 255 639 %Find the correlation max, at 255 640 [y,x] = find(result_conv==255,1); 641 if ~isempty(y) && ~isempty(x) 642 try 643 if par_civ.CorrSmooth==1 644 [vector,F(ivec)] = SUBPIXGAUSS (result_conv,x,y); 645 elseif par_civ.CorrSmooth==2 646 [vector,F(ivec)] = SUBPIX2DGAUSS (result_conv,x,y); 647 end 648 utable(ivec)=vector(1)*mesh+shiftx(ivec); 649 vtable(ivec)=vector(2)*mesh+shifty(ivec); 650 xtable(ivec)=iref+utable(ivec)/2-0.5;% convec flow (velocity taken at the point middle from imgae 1 and 2) 651 ytable(ivec)=jref+vtable(ivec)/2-0.5;% and position of pixel 1=0.5 (convention for image coordinates=0 at the edge) 652 iref=round(xtable(ivec));% image index for the middle of the vector 653 jref=round(ytable(ivec)); 654 if checkmask && par_civ.Mask(jref,iref)<200 && par_civ.Mask(jref,iref)>=100 655 utable(ivec)=0; 656 vtable(ivec)=0; 657 F(ivec)=3; 658 end 659 ctable(ivec)=corrmax/sum_square;% correlation value 660 catch ME 608 661 F(ivec)=3; 609 662 end 610 %threshold on image maximum 611 if check_MaxIma && (image1_mean > par_civ.MaxIma || image2_mean > par_civ.MaxIma) 612 F(ivec)=3; 613 end 614 % end 615 if F(ivec)~=3 616 image1_crop=image1_crop-image1_mean;%substract the mean 617 image2_crop=image2_crop-image2_mean; 618 if CheckDecimal 619 xi=(1:mesh:size(image1_crop,2)); 620 yi=(1:mesh:size(image1_crop,1))'; 621 if CheckDeformation 622 [XI,YI]=meshgrid(xi-ceil(size(image1_crop,2)/2),yi-ceil(size(image1_crop,1)/2)); 623 XIant=XI-par_civ.DUDX(ivec)*XI-par_civ.DUDY(ivec)*YI+ceil(size(image1_crop,2)/2); 624 YIant=YI-par_civ.DVDX(ivec)*XI-par_civ.DVDY(ivec)*YI+ceil(size(image1_crop,1)/2); 625 image1_crop=interp2(image1_crop,XIant,YIant); 626 else 627 image1_crop=interp2(image1_crop,xi,yi); 628 end 629 xi=(1:mesh:size(image2_crop,2)); 630 yi=(1:mesh:size(image2_crop,1))'; 631 image2_crop=interp2(image2_crop,xi,yi); 632 end 633 sum_square=sum(sum(image1_crop.*image1_crop)); 634 %reference: Oliver Pust, PIV: Direct Cross-Correlation 635 result_conv= conv2(image2_crop,flipdim(flipdim(image1_crop,2),1),'valid'); 636 corrmax= max(max(result_conv)); 637 result_conv=(result_conv/corrmax)*255; %normalize, peak=always 255 638 %Find the correlation max, at 255 639 [y,x] = find(result_conv==255,1); 640 if ~isempty(y) && ~isempty(x) 641 try 642 if par_civ.CorrSmooth==1 643 [vector,F(ivec)] = SUBPIXGAUSS (result_conv,x,y); 644 elseif par_civ.CorrSmooth==2 645 [vector,F(ivec)] = SUBPIX2DGAUSS (result_conv,x,y); 646 end 647 utable(ivec)=vector(1)*mesh+shiftx(ivec); 648 vtable(ivec)=vector(2)*mesh+shifty(ivec); 649 xtable(ivec)=iref+utable(ivec)/2-0.5;% convec flow (velocity taken at the point middle from imgae 1 and 2) 650 ytable(ivec)=jref+vtable(ivec)/2-0.5;% and position of pixel 1=0.5 (convention for image coordinates=0 at the edge) 651 iref=round(xtable(ivec));% image index for the middle of the vector 652 jref=round(ytable(ivec)); 653 if checkmask && par_civ.Mask(jref,iref)<200 && par_civ.Mask(jref,iref)>=100 654 utable(ivec)=0; 655 vtable(ivec)=0; 656 F(ivec)=3; 657 end 658 ctable(ivec)=corrmax/sum_square;% correlation value 659 catch ME 660 F(ivec)=3; 661 end 662 else 663 F(ivec)=3; 664 end 665 end 666 end 667 668 %Create the vector matrix x, y, u, v 663 else 664 F(ivec)=3; 665 end 666 end 669 667 end 670 668 result_conv=result_conv*corrmax/(255*sum_square);% keep the last correlation matrix for output -
trunk/src/get_field.m
r591 r596 1042 1042 delete(handles.get_field) 1043 1043 1044 1045 1046 % %------------------------------------------------------------------------1047 % function mouse_up_gui(ggg,eventdata,handles)1048 % %------------------------------------------------------------------------1049 % if isequal(get(ggg,'SelectionType'),'alt')1050 % message='';1051 % global CurData1052 % inputfield=get(handles.inputfile,'String');1053 % if exist(inputfield,'file')1054 % CurData=nc2struct(inputfield);1055 % else1056 % CurData=get(ggg,'UserData');% get_field opened from a input field, not a file1057 % end1058 % %%%% TODO: put the matalb command window in front1059 % evalin('base','global CurData')%make CurData global in the workspace1060 % evalin('base','CurData') %display CurData in the workspace1061 % end1062 1063 %------------------------------------------------------------------------1064 % --- Executes on selection change in ACTION.1065 %------------------------------------------------------------------------1066 function ACTION_Callback(hObject, eventdata, handles)1067 global nb_builtin1068 list_ACTION=get(handles.ACTION,'String');% list menu fields1069 index_ACTION=get(handles.ACTION,'Value');% selected string index1070 ACTION= list_ACTION{index_ACTION}; % selected string1071 list_func_handles=get(handles.ACTION,'UserData');% get list of function handles (full address of the function, including name and path)1072 ff=functions(list_func_handles{end});1073 % add a new function to the menu1074 if isequal(ACTION,'more...')1075 [FileName, PathName] = uigetfile( ...1076 {'*.m', ' (*.m)';1077 '*.m', '.m files '; ...1078 '*.*', 'All Files (*.*)'}, ...1079 'Pick a file',ff.file);1080 if length(FileName)<21081 return1082 end1083 [pp,ACTION,ext_fct]=fileparts(FileName);1084 if ~isequal(ext_fct,'.m')1085 msgbox_uvmat('ERROR','a Matlab function .m must be introduced');1086 return1087 end1088 1089 % insert the choice in the action menu1090 menu_str=update_menu(handles.ACTION,ACTION);%new action menu in which the new item has been appended if needed1091 index_ACTION=get(handles.ACTION,'Value');% currently selected index in the list1092 addpath(PathName)1093 list_func_handles{index_ACTION}=str2func(ACTION);% create the function handle corresponding to the newly seleced function1094 set(handles.ACTION,'UserData',list_func_handles)1095 set(handles.path_action,'enable','inactive')% indicate that the current path is accessible (not 'off')1096 %list_path{index_ACTION}=PathName;1097 if length(menu_str)>nb_builtin+5;1098 nbremove=length(menu_str)-nb_builtin-5;1099 menu_str(nb_builtin+1:end-5)=[];1100 list_func_handles(nb_builtin+1:end-4)=[];1101 index_ACTION=index_ACTION-nbremove;1102 set(handles.ACTION,'Value',index_ACTION)1103 set(handles.ACTION,'String',menu_str)1104 end1105 %record the current menu in personal file profil_perso1106 dir_perso=prefdir;1107 profil_perso=fullfile(dir_perso,'uvmat_perso.mat');1108 get_field_fct={};1109 for ilist=nb_builtin+1:length(menu_str)-11110 ff=functions(list_func_handles{ilist});1111 get_field_fct{ilist-nb_builtin}=ff.file;1112 end1113 if exist(profil_perso,'file')1114 save(profil_perso,'get_field_fct','-append')1115 else1116 txt=ver('MATLAB');1117 Release=txt.Release;1118 relnumb=str2num(Release(3:4));1119 if relnumb >= 141120 save(profil_perso,'get_field_fct','-V6')1121 else1122 save(profil_perso, 'get_field_fct')1123 end1124 end1125 end1126 1127 %check the current path to the selected function1128 h_fun=list_func_handles{index_ACTION};1129 if isa(h_fun,'function_handle')1130 func=functions(h_fun);1131 set(handles.path_action,'String',fileparts(func.file)); %show the path to the senlected function1132 GUI_input=h_fun();%handles.figure1 =handles of the GUI get_field1133 else1134 set(handles.path_action,'String','')1135 msgbox_uvmat('ERROR','unknown path to ACTION function, reload it')1136 return1137 end1138 1139 %prepare the GUI options for the selected ACTION1140 test_1Dplot=0;1141 test_scalar=0;1142 test_vector=0;1143 if iscell(GUI_input)1144 for ilist=1:size(GUI_input,1)1145 switch GUI_input{ilist,1}1146 %RootFile always visible1147 case 'CheckPlot1D'1148 test_1Dplot=isequal(GUI_input{ilist,2},'on');1149 case 'CheckScalar'1150 test_scalar=isequal(GUI_input{ilist,2},'on');1151 case 'CheckVector'1152 test_vector=isequal(GUI_input{ilist,2},'on');1153 end1154 end1155 end1156 set(handles.CheckPlot1D,'Value',test_1Dplot);1157 set(handles.CheckScalar,'Value',test_scalar);1158 set(handles.CheckVector,'Value',test_vector);1159 CheckPlot1D_Callback(hObject, eventdata, handles)1160 CheckScalar_Callback(hObject, eventdata, handles)1161 CheckVector_Callback(hObject, eventdata, handles)1162 1163 1164 %-----------------------------------------------------1165 % --- browse existing figures1166 %-----------------------------------------------------1167 function browse_fig(menu_handle)1168 hh=findobj(allchild(0),'Type','figure');1169 ilist=0;1170 list={};1171 for ifig=1:length(hh) %look for all existing figures1172 name=get(hh(ifig),'Name');1173 if ~strcmp(name,'uvmat')&& ~strcmp(name,'view_field') %case of uvmat GUI1174 hchild=get(hh(ifig),'children');% look for axes contained in each figure1175 nbaxe=0;1176 for ichild=1:length(hchild)1177 Type=get(hchild(ichild),'Type');1178 Tag=get(hchild(ichild),'Tag');1179 if isequal(Type,'axes')1180 if ~isequal(Tag,'Colorbar')& ~isequal(Tag,'legend')% don't select colorbars for plotting1181 nbaxe=nbaxe+1;%count the existing axis1182 end1183 end1184 end1185 if nbaxe==11186 ilist=ilist+1;%add a line in the list of axis1187 list{ilist,1}=num2str(hh(ifig));1188 elseif nbaxe>11189 for iaxe=1:nbaxe1190 ilist=ilist+1;%add a line in the list of axis1191 list{ilist,1}=[num2str(hh(ifig)) '_' num2str(iaxe)];1192 end1193 end1194 end1195 end1196 list=['uvmat';list];1197 set(menu_handle,'Value',1)1198 set(menu_handle,'String',list)1199 1200 1201 %-----------------------------------------------------1202 function list_fig_Callback(hObject, eventdata, handles)1203 %-----------------------------------------------------1204 list_fig=get(handles.list_fig,'String');1205 fig_val=get(handles.list_fig,'Value');1206 plot_fig=list_fig{fig_val};1207 if strcmp(plot_fig,'view_field')1208 % huvmat=findobj(allchild(0),'name','uvmat');1209 % if ~isempty(huvmat)1210 % uistack(huvmat,'top')1211 % end1212 else%if ~isequal(plot_fig,'new fig...') & ~isequal(plot_fig,'uvmat')1213 sep=regexp(plot_fig,'_');1214 if ~isempty(sep)1215 plot_fig=plot_fig([1:sep-1]);1216 end1217 if ishandle(str2num(plot_fig))1218 figure(str2num(plot_fig))% display existing figure1219 else1220 browse_fig(handles.list_fig); %reset the current list of figures1221 end1222 end1223 1044 1224 1045 -
trunk/src/series.m
r595 r596 873 873 switch FileType 874 874 case {'civx','civdata'} 875 [FieldList,ColorList]= calc_field;875 [FieldList,ColorList]=set_field_list('U','V','C'); 876 876 set(handles.FieldName,'String',[{'image'};FieldList;{'get_field...'}]);%standard menu for civx data 877 877 set(handles.FieldName,'Value',2) % set menu to 'velocity … … 2297 2297 function MenuExportConfig_Callback(hObject, eventdata, handles) 2298 2298 global Series 2299 [tild,Series,errormsg]=prepare_jobs(handles); 2300 % Series=read_GUI(handles.series); 2299 [Series,errormsg]=prepare_jobs(handles); 2301 2300 2302 2301 evalin('base','global Series')%make CurData global in the workspace -
trunk/src/series/aver_stat.m
r595 r596 5 5 %%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%% 6 6 % 7 % This function is used in four modes by the GUI series:8 % 1) config GUI: with no input argument, the function determine the suitable GUI configuration9 % 2) interactive input: the function is used to interactively introduce input parameters, and then stops10 % 3) RUN: the function itself runs, when an appropriate input structure Param has been introduced.11 % 4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.12 %13 % This function is used in four modes by the GUI series:14 % 1) config GUI: with no input argument, the function determine the suitable GUI configuration15 % 2) interactive input: the function is used to interactively introduce input parameters, and then stops16 % 3) RUN: the function itself runs, when an appropriate input structure Param has been introduced.17 % 4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.18 %19 7 %OUTPUT 20 % GUI_input=list ofoptions in the GUI series.fig needed for the function8 % ParamOut: sets options in the GUI series.fig needed for the function 21 9 % 22 10 %INPUT: 23 11 % In run mode, the input parameters are given as a Matlab structure Param copied from the GUI series. 24 12 % In batch mode, Param is the name of the corresponding xml file containing the same information 25 % In the absence of input(as activated when the current Action is selected26 % in series), the function ouput GUI_input set the activation of the needed GUI elements13 % when Param.Action.RUN=0 (as activated when the current Action is selected 14 % in series), the function ouput paramOut set the activation of the needed GUI elements 27 15 % 28 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to see the current structure Param) 16 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to 17 % see the current structure Param) 29 18 % .InputTable: cell of input file names, (several lines for multiple input) 30 19 % each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension} … … 33 22 % .Action: .ActionName: name of the current activated function 34 23 % .ActionPath: path of the current activated function 24 % .ActionExt: fct extension ('.m', Matlab fct, '.sh', compiled Matlab fct 25 % .RUN =0 for GUI input, =1 for function activation 26 % .RunMode='local','background', 'cluster': type of function use 27 % 35 28 % .IndexRange: set the file or frame indices on which the action must be performed 36 29 % .FieldTransform: .TransformName: name of the selected transform function 37 30 % .TransformPath: path of the selected transform function 38 % .TransformHandle: corresponding function handle39 31 % .InputFields: sub structure describing the input fields withfields 40 % .FieldName: name of the field32 % .FieldName: name(s) of the field 41 33 % .VelType: velocity type 42 34 % .FieldName_1: name of the second field in case of two input series 43 35 % .VelType_1: velocity type of the second field in case of two input series 36 % .Coord_y: name of y coordinate variable 37 % .Coord_x: name of x coordinate variable 44 38 % .ProjObject: %sub structure describing a projection object (read from ancillary GUI set_object) 45 39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -
trunk/src/series/merge_proj.m
r595 r596 3 3 % function ParamOut=merge_proj(Param) 4 4 %------------------------------------------------------------------------ 5 6 5 %%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%% 7 6 % 8 % This function is used in four modes by the GUI series:9 % 1) config GUI: with no input argument, the function determine the suitable GUI configuration10 % 2) interactive input: the function is used to interactively introduce input parameters, and then stops11 % 3) RUN: the function itself runs, when an appropriate input structure Param has been introduced.12 % 4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.13 %14 % This function is used in four modes by the GUI series:15 % 1) config GUI: with no input argument, the function determine the suitable GUI configuration16 % 2) interactive input: the function is used to interactively introduce input parameters, and then stops17 % 3) RUN: the function itself runs, when an appropriate input structure Param has been introduced.18 % 4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.19 %20 7 %OUTPUT 21 % GUI_input=list ofoptions in the GUI series.fig needed for the function8 % ParamOut: sets options in the GUI series.fig needed for the function 22 9 % 23 10 %INPUT: 24 11 % In run mode, the input parameters are given as a Matlab structure Param copied from the GUI series. 25 12 % In batch mode, Param is the name of the corresponding xml file containing the same information 26 % In the absence of input(as activated when the current Action is selected27 % in series), the function ouput GUI_input set the activation of the needed GUI elements13 % when Param.Action.RUN=0 (as activated when the current Action is selected 14 % in series), the function ouput paramOut set the activation of the needed GUI elements 28 15 % 29 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to see the current structure Param) 16 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to 17 % see the current structure Param) 30 18 % .InputTable: cell of input file names, (several lines for multiple input) 31 19 % each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension} … … 34 22 % .Action: .ActionName: name of the current activated function 35 23 % .ActionPath: path of the current activated function 24 % .ActionExt: fct extension ('.m', Matlab fct, '.sh', compiled Matlab fct 25 % .RUN =0 for GUI input, =1 for function activation 26 % .RunMode='local','background', 'cluster': type of function use 27 % 36 28 % .IndexRange: set the file or frame indices on which the action must be performed 37 29 % .FieldTransform: .TransformName: name of the selected transform function 38 30 % .TransformPath: path of the selected transform function 39 % .TransformHandle: corresponding function handle40 31 % .InputFields: sub structure describing the input fields withfields 41 % .FieldName: name of the field32 % .FieldName: name(s) of the field 42 33 % .VelType: velocity type 43 34 % .FieldName_1: name of the second field in case of two input series 44 35 % .VelType_1: velocity type of the second field in case of two input series 36 % .Coord_y: name of y coordinate variable 37 % .Coord_x: name of x coordinate variable 45 38 % .ProjObject: %sub structure describing a projection object (read from ancillary GUI set_object) 46 39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -
trunk/src/series/sub_background.m
r592 r596 18 18 %%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%% 19 19 % 20 % This function is used in four modes by the GUI series:21 % 1) config GUI: with no input argument, the function determine the suitable GUI configuration22 % 2) interactive input: the function is used to interactively introduce input parameters, and then stops23 % 3) RUN: the function itself runs, when an appropriate input structure Param has been introduced.24 % 4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.25 %26 20 %OUTPUT 27 % GUI_series_config=list ofoptions in the GUI series.fig needed for the function21 % ParamOut: sets options in the GUI series.fig needed for the function 28 22 % 29 23 %INPUT: 30 24 % In run mode, the input parameters are given as a Matlab structure Param copied from the GUI series. 31 25 % In batch mode, Param is the name of the corresponding xml file containing the same information 32 % In the absence of input(as activated when the current Action is selected33 % in series), the function ouput GUI_series_configset the activation of the needed GUI elements26 % when Param.Action.RUN=0 (as activated when the current Action is selected 27 % in series), the function ouput paramOut set the activation of the needed GUI elements 34 28 % 35 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to see the current structure Param) 29 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to 30 % see the current structure Param) 36 31 % .InputTable: cell of input file names, (several lines for multiple input) 37 32 % each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension} 38 33 % .OutputSubDir: name of the subdirectory for data outputs 39 % .OutputDirExt: extension for the directoryfor data outputs34 % .OutputDirExt: directory extension for data outputs 40 35 % .Action: .ActionName: name of the current activated function 41 36 % .ActionPath: path of the current activated function 37 % .ActionExt: fct extension ('.m', Matlab fct, '.sh', compiled Matlab fct 38 % .RUN =0 for GUI input, =1 for function activation 39 % .RunMode='local','background', 'cluster': type of function use 40 % 42 41 % .IndexRange: set the file or frame indices on which the action must be performed 43 42 % .FieldTransform: .TransformName: name of the selected transform function 44 43 % .TransformPath: path of the selected transform function 45 % .TransformHandle: corresponding function handle46 44 % .InputFields: sub structure describing the input fields withfields 47 % .FieldName: name of the field45 % .FieldName: name(s) of the field 48 46 % .VelType: velocity type 49 47 % .FieldName_1: name of the second field in case of two input series 50 48 % .VelType_1: velocity type of the second field in case of two input series 49 % .Coord_y: name of y coordinate variable 50 % .Coord_x: name of x coordinate variable 51 51 % .ProjObject: %sub structure describing a projection object (read from ancillary GUI set_object) 52 52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 53 54 53 55 54 function ParamOut=sub_background (Param) 56 55 -
trunk/src/series/time_series.m
r592 r596 6 6 %%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%% 7 7 % 8 % This function is used in four modes by the GUI series:9 % 1) config GUI: with no input argument, the function determine the suitable GUI configuration10 % 2) interactive input: the function is used to interactively introduce input parameters, and then stops11 % 3) RUN: the function itself runs, when an appropriate input structure Param has been introduced.12 % 4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.13 %14 % This function is used in four modes by the GUI series:15 % 1) config GUI: with no input argument, the function determine the suitable GUI configuration16 % 2) interactive input: the function is used to interactively introduce input parameters, and then stops17 % 3) RUN: the function itself runs, when an appropriate input structure Param has been introduced.18 % 4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.19 %20 8 %OUTPUT 21 % GUI_input=list ofoptions in the GUI series.fig needed for the function9 % ParamOut: sets options in the GUI series.fig needed for the function 22 10 % 23 11 %INPUT: 24 12 % In run mode, the input parameters are given as a Matlab structure Param copied from the GUI series. 25 13 % In batch mode, Param is the name of the corresponding xml file containing the same information 26 % In the absence of input(as activated when the current Action is selected27 % in series), the function ouput GUI_input set the activation of the needed GUI elements14 % when Param.Action.RUN=0 (as activated when the current Action is selected 15 % in series), the function ouput paramOut set the activation of the needed GUI elements 28 16 % 29 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to see the current structure Param) 17 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to 18 % see the current structure Param) 30 19 % .InputTable: cell of input file names, (several lines for multiple input) 31 20 % each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension} … … 34 23 % .Action: .ActionName: name of the current activated function 35 24 % .ActionPath: path of the current activated function 25 % .ActionExt: fct extension ('.m', Matlab fct, '.sh', compiled Matlab fct 26 % .RUN =0 for GUI input, =1 for function activation 27 % .RunMode='local','background', 'cluster': type of function use 28 % 36 29 % .IndexRange: set the file or frame indices on which the action must be performed 37 30 % .FieldTransform: .TransformName: name of the selected transform function 38 31 % .TransformPath: path of the selected transform function 39 % .TransformHandle: corresponding function handle40 32 % .InputFields: sub structure describing the input fields withfields 41 % .FieldName: name of the field33 % .FieldName: name(s) of the field 42 34 % .VelType: velocity type 43 35 % .FieldName_1: name of the second field in case of two input series 44 36 % .VelType_1: velocity type of the second field in case of two input series 37 % .Coord_y: name of y coordinate variable 38 % .Coord_x: name of x coordinate variable 45 39 % .ProjObject: %sub structure describing a projection object (read from ancillary GUI set_object) 46 40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 47 % 41 48 42 function ParamOut=time_series(Param) 49 43 -
trunk/src/uvmat.m
r595 r596 2602 2602 set(handles.ListObject_1,'Visible','off') 2603 2603 [PlotType,PlotParamOut]=plot_field(UvData.Field,handles.PlotAxes,read_GUI(handles.uvmat)); 2604 errormsg=fill_GUI(PlotParamOut,handles.uvmat);2605 %write_plot_param(handles,PlotParamOut) %update the auto plot parameters2604 %errormsg=fill_GUI(PlotParamOut,handles.uvmat); 2605 write_plot_param(handles,PlotParamOut) %update the auto plot parameters 2606 2606 2607 2607 %% 2D or 3D fieldname are generally projected … … 2713 2713 errormsg=fill_GUI(PlotParamOut,handles.uvmat); 2714 2714 else 2715 errormsg=fill_GUI(PlotParamOut, hview_field);2715 errormsg=fill_GUI(PlotParamOut,view_field_handle); 2716 2716 end 2717 2717 %write_plot_param(plot_handles{imap},PlotParamOut) %update the auto plot parameters
Note: See TracChangeset
for help on using the changeset viewer.