 Timestamp:
 May 2, 2014, 10:49:00 PM (10 years ago)
 Location:
 trunk/src/series
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/series/civ_series.m
r763 r768 507 507 par_civ2.ImageA=par_civ1.ImageA; 508 508 else 509 [par_civ2.ImageA,VideoObject_A] = read_image(ImageName_A ,FileType_A,VideoObject_A,FrameIndex_A_Civ2(ifield));509 [par_civ2.ImageA,VideoObject_A] = read_image(ImageName_A_Civ2,FileType_A,VideoObject_A,FrameIndex_A_Civ2(ifield)); 510 510 end 511 511 ImageName_B_Civ2=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2_series_Civ2(ifield),[],j2_series_Civ2(ifield)); … … 513 513 par_civ2.ImageB=par_civ1.ImageB; 514 514 else 515 [par_civ2.ImageB,VideoObject_B] = read_image(ImageName_B ,FileType_B,VideoObject_B,FrameIndex_B_Civ2(ifield));515 [par_civ2.ImageB,VideoObject_B] = read_image(ImageName_B_Civ2,FileType_B,VideoObject_B,FrameIndex_B_Civ2(ifield)); 516 516 end 517 517 … … 572 572 par_civ2.SearchBoxSize(1)=2*ibx2+9;% search ara +4 pixels around the guess 573 573 par_civ2.SearchBoxSize(2)=2*iby2+9; 574 par_civ2.SearchBoxShift=[Shiftx(nbval>=1)./nbval(nbval>=1) Shifty(nbval>=1)./nbval(nbval>=1)]; 574 i1=i1_series_Civ2(ifield); 575 i2=i1; 576 if ~isempty(i2_series_Civ2) 577 i2=i2_series_Civ2(ifield); 578 end 579 j1=1; 580 if ~isempty(j1_series_Civ2) 581 j1=j1_series_Civ2(ifield); 582 end 583 j2=j1; 584 if ~isempty(j2_series_Civ1) 585 j2=j2_series_Civ2(ifield); 586 end 587 Civ2_Dt=time(i2+1,j2+1)time(i1+1,j1+1); 588 par_civ2.SearchBoxShift=(Civ2_Dt/Data.Civ1_Dt)*[Shiftx(nbval>=1)./nbval(nbval>=1) Shifty(nbval>=1)./nbval(nbval>=1)]; 575 589 par_civ2.Grid=[par_civ2.Grid(nbval>=1,1)par_civ2.SearchBoxShift(:,1)/2 par_civ2.Grid(nbval>=1,2)par_civ2.SearchBoxShift(:,2)/2];% grid taken at the extrapolated origin of the displacement vectors 576 590 if par_civ2.CheckDeformation … … 582 596 % caluclate velocity data (y and v in indices, reverse to y component) 583 597 [xtable ytable utable vtable ctable F] = civ (par_civ2); 584 585 598 list_param=(fieldnames(Param.ActionInput.Civ2))'; 586 599 Civ2_param=regexprep(list_param,'^.+','Civ2_$0');% insert 'Civ2_' before each string in list_param … … 589 602 Data.Civ2_ImageA=ImageName_A; 590 603 Data.Civ2_ImageB=ImageName_B; 591 i1=i1_series_Civ2(ifield);592 i2=i1;593 if ~isempty(i2_series_Civ2)594 i2=i2_series_Civ2(ifield);595 end596 j1=1;597 if ~isempty(j1_series_Civ2)598 j1=j1_series_Civ2(ifield);599 end600 j2=j1;601 if ~isempty(j2_series_Civ1)602 j2=j2_series_Civ2(ifield);603 end604 604 Data.Civ2_Time=(time(i2+1,j2+1)+time(i1+1,j1+1))/2; 605 Data.Civ2_Dt= time(i2+1,j2+1)time(i1+1,j1+1);605 Data.Civ2_Dt=Civ2_Dt; 606 606 % Data.Civ2_Time=1; 607 607 % Data.Civ2_Dt=1; 
trunk/src/series/time_series.m
r751 r768 113 113 ImageTypeOptions={'image','multimage','mmreader','video'}; 114 114 NcTypeOptions={'netcdf','civx','civdata'}; 115 FileType=cell(1,nbview); 116 FileInfo=cell(1,nbview); 117 MovieObject=cell(1,nbview); 118 CheckImage=cell(1,nbview); 119 CheckNc=cell(1,nbview); 120 frame_index=cell(1,nbview); 115 121 for iview=1:nbview 116 122 if ~exist(filecell{iview,1}','file') … … 119 125 end 120 126 [FileType{iview},FileInfo{iview},MovieObject{iview}]=get_file_type(filecell{iview,1}); 127 if strcmp(FileType{iview},'civdata')strcmp(FileType{iview},'civx') 128 if ~isfield(Param.InputFields,'VelType') 129 FileType{iview}='netcdf';% civ data read as usual netcdf files 130 end 131 end 121 132 CheckImage{iview}=~isempty(find(strcmp(FileType{iview},ImageTypeOptions)));% =1 for images 122 133 CheckNc{iview}=~isempty(find(strcmp(FileType{iview},NcTypeOptions)));% =1 for netcdf files 123 if ~isempty(j1_series{iview}) 134 if isempty(j1_series{iview}) 135 frame_index{iview}=i1_series{iview}; 136 else 124 137 frame_index{iview}=j1_series{iview}; 125 else126 frame_index{iview}=i1_series{iview};127 138 end 128 139 end … … 130 141 %% calibration data and timing: read the ImaDoc files 131 142 [XmlData,NbSlice_calib,time,errormsg]=read_multimadoc(RootPath,SubDir,RootFile,FileExt,i1_series,i2_series,j1_series,j2_series); 143 if ~isempty(errormsg) 144 disp_uvmat('ERROR',['error in reading xmlfile: ' errormsg],checkrun) 145 return 146 end 132 147 if size(time,1)>1 133 148 diff_time=max(max(diff(time)));
Note: See TracChangeset
for help on using the changeset viewer.