Changeset 1131 for trunk/src/series
- Timestamp:
- Apr 11, 2024, 7:30:52 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_series.m
r1127 r1131 21 21 % if absent no file is produced, result in the output structure Data (test mode) 22 22 % Param.ActionInput: substructure with the parameters provided by the GUI civ_input 23 % .Civ1: parameters for civ1 23 % .Civ1: parameters for civ1cc 24 24 % .Fix1: parameters for fix1 25 25 % .Patch1: … … 286 286 end 287 287 for ifield=1:NbField 288 tic 288 tstart=tic; 289 time_civ1=0; 290 time_patch1=0; 291 time_civ2=0; 292 time_patch2=0; 289 293 if ~isempty(RUNHandle)% update the waitbar in interactive mode with GUI series (checkrun=1) 290 294 update_waitbar(WaitbarHandle,ifield/NbField) … … 382 386 continue 383 387 end 388 tsart_input=tic; 384 389 [par_civ1.ImageA,VideoObject_A] = read_image(ImageName_A,FileType_A,VideoObject_A,FrameIndex_A_Civ1(ifield)); 390 time_input=toc(tsart_input); 385 391 end 386 392 ImageName_B=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2_series_Civ1(ifield),[],j2_series_Civ1(ifield)); … … 501 507 else %usual PIV 502 508 % caluclate velocity data (y and v in indices, reverse to y component) 509 tstart_civ1=tic; 503 510 [xtable, ytable, utable, vtable, ctable, F, result_conv, errormsg] = civ (par_civ1); 504 511 if ~isempty(errormsg) … … 512 519 Data.Civ1_C=reshape(ctable,[],1); 513 520 Data.Civ1_F=reshape(F,[],1); 521 time_civ1=toc(tstart_civ1); 514 522 end 515 523 else% we use existing Civ1 data … … 561 569 if isfield (Param.ActionInput,'Patch1') 562 570 disp('patch1 started') 571 tstart_patch1=tic; 563 572 if check_civx 564 573 errormsg='Civ Matlab input needed for patch'; … … 600 609 601 610 % perform Patch calculation using the UVMAT fct 'filter_tps' 611 602 612 [Data.Civ1_SubRange,Data.Civ1_NbCentres,Data.Civ1_Coord_tps,Data.Civ1_U_tps,Data.Civ1_V_tps,tild,Ures, Vres,tild,FFres]=... 603 613 filter_tps([Data.Civ1_X(ind_good) Data.Civ1_Y(ind_good)],Data.Civ1_U(ind_good),Data.Civ1_V(ind_good),[],Data.Patch1_SubDomainSize,Data.Patch1_FieldSmooth,Data.Patch1_MaxDiff); … … 605 615 Data.Civ1_V_smooth(ind_good)=Vres; 606 616 Data.Civ1_FF(ind_good)=int8(FFres); 617 time_patch1=toc(tstart_patch1); 607 618 disp('patch1 performed') 608 619 end … … 611 622 if isfield (Param.ActionInput,'Civ2') 612 623 disp('civ2 started') 624 tstart_civ2=tic; 613 625 par_civ2=Param.ActionInput.Civ2; 614 626 if CheckInputFile % read input images (except in mode Test where it is introduced directly in Param.ActionInput.Civ1.ImageNameA and B) … … 765 777 766 778 % calculate velocity data (y and v in image indices, reverse to y component) 779 767 780 [xtable, ytable, utable, vtable, ctable, F,result_conv,errormsg] = civ (par_civ2); 768 781 … … 806 819 Data.Civ2_F=reshape(F,[],1); 807 820 disp('civ2 performed') 821 time_civ2=toc(tstart_civ2); 808 822 elseif ~isfield(Data,'ListVarName') % we start there, using existing Civ2 data 809 823 if exist('ncfile','var') … … 836 850 end 837 851 Data.ListGlobalAttribute=[Data.ListGlobalAttribute Fix2_param]; 838 %839 % ListFixParam=fieldnames(Param.ActionInput.Fix2);840 % for ilist=1:length(ListFixParam)841 % ParamName=ListFixParam{ilist};842 % ListName=['Fix2_' ParamName];843 % eval(['Data.ListGlobalAttribute=[Data.ListGlobalAttribute ''' ParamName '''];'])844 % eval(['Data.' ListName '=Param.ActionInput.Fix2.' ParamName ';'])845 % end846 852 if check_civx 847 853 if ~isfield(Data,'fix2') … … 865 871 if isfield (Param.ActionInput,'Patch2') 866 872 disp('patch2 started') 873 tstart_patch2=tic; 867 874 list_param=fieldnames(Param.ActionInput.Patch2)'; 868 875 list_param(strcmp('TestPatch2',list_param))=[];% remove the parameter TestCiv1 from the list … … 894 901 disp_uvmat('ERROR','all vectors of civ2 are bad, check input parameters' ,checkrun) 895 902 return 896 end 903 end 904 897 905 [Data.Civ2_SubRange,Data.Civ2_NbCentres,Data.Civ2_Coord_tps,Data.Civ2_U_tps,Data.Civ2_V_tps,tild,Ures,Vres,tild,FFres]=... 898 906 filter_tps([Data.Civ2_X(ind_good) Data.Civ2_Y(ind_good)],Data.Civ2_U(ind_good),Data.Civ2_V(ind_good),[],Data.Patch2_SubDomainSize,Data.Patch2_FieldSmooth,Data.Patch2_MaxDiff); … … 901 909 Data.Civ2_FF(ind_good)=FFres; 902 910 Data.CivStage=Data.CivStage+1; 911 time_patch2=toc(tstart_patch2); 903 912 disp('patch2 performed') 904 913 end … … 913 922 disp(errormsg) 914 923 end 915 disp(['ellapsed time ' num2str(toc/60,2) ' minutes']) 924 time_total=toc(tstart); 925 disp(['ellapsed time ' num2str(time_total/60,2) ' minutes']) 926 disp(['time image reading ' num2str(time_input/60,2) ' minutes']) 927 disp(['time civ1 ' num2str(time_civ1/60,2) ' minutes']) 928 disp(['time patch1 ' num2str(time_patch1/60,2) ' minutes']) 929 disp(['time civ2 ' num2str(time_civ2/60,2) ' minutes']) 930 disp(['time patch2 ' num2str(time_patch2/60,2) ' minutes']) 931 disp(['time other ' num2str((time_total-time_input-time_civ1-time_patch1-time_civ2-time_patch2)/60,2) ' minutes']) 916 932 end 917 933 end
Note: See TracChangeset
for help on using the changeset viewer.