Changeset 1151 for trunk/src/series


Ignore:
Timestamp:
Jun 26, 2024, 6:37:49 PM (3 months ago)
Author:
sommeria
Message:

civ_3D updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/civ_3D.m

    r1150 r1151  
    289289        par_civ1.ImageA=zeros(2*SearchRange_z+1,npy,npx);
    290290        par_civ1.ImageB=zeros(2*SearchRange_z+1,npy,npx);
    291 
    292         for islice=par_civ1.Dz:NbSlice
    293             if par_civ1.Dz<2*SearchRange_z+1
    294             par_civ1.ImageA=circshift(par_civ1.ImageA,-par_civ1.Dz);
     291        %first vertical block centered at image index islice=par_civ1.Dz
     292        islice=par_civ1.Dz;
     293         for iz=1:par_civ1.Dz+SearchRange_z
     294              ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_series_Civ1(1,ifield),[],j1_series_Civ1(iz,1));%
     295            A= read_image(ImageName_A,FileType_A);
     296            ImageName_B=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2_series_Civ1(1,ifield),[],j1_series_Civ1(iz,1));
     297            B= read_image(ImageName_B,FileType_B);
     298            par_civ1.ImageA(iz+par_civ1.Dz-1,:,:) = A;
     299            par_civ1.ImageB(iz+par_civ1.Dz-1,:,:) = B;
     300         end
     301         % caluclate velocity data (y and v in indices, reverse to y component)
     302            [Data.Civ1_X(islice,:,:),Data.Civ1_Y(islice,:,:), utable, vtable,wtable, ctable, FF, result_conv, errormsg] = civ3D (par_civ1);
     303            if ~isempty(errormsg)
     304                disp_uvmat('ERROR',errormsg,checkrun)
     305                return
     306            end
     307        for islice=2*par_civ1.Dz:NbSlice% loop on slices for the first image in the pair
     308            par_civ1.ImageA=circshift(par_civ1.ImageA,-par_civ1.Dz);%shift the indces in the block upward by par_civ1.Dz
    295309            par_civ1.ImageB=circshift(par_civ1.ImageA,-par_civ1.Dz);
    296             end
    297310              for iz=1:par_civ1.Dz
    298             ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_series_Civ1(1,ifield),[],j1_series_Civ1(islice+SearchRange_z-iz+1,1));
     311            ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_series_Civ1(1,ifield),[],j1_series_Civ1(islice+SearchRange_z-par_civ1.Dz+iz,1));%
    299312            A= read_image(ImageName_A,FileType_A);
    300             ImageName_B=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2_series_Civ1(1,ifield),[],j1_series_Civ1(islice+SearchRange_z-iz+1,1));
     313            ImageName_B=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2_series_Civ1(1,ifield),[],j1_series_Civ1(islice+SearchRange_z-par_civ1.Dz+iz,1));
    301314            B= read_image(ImageName_B,FileType_B);
    302             par_civ1.ImageA(2*SearchRange_z+2-iz,:,:) = A;
    303             par_civ1.ImageB(2*SearchRange_z+2-iz,:,:) = B;
     315            par_civ1.ImageA(2*SearchRange_z+1-par_civ1.Dz+iz,:,:) = A;
     316            par_civ1.ImageB(2*SearchRange_z+1-par_civ1.Dz+iz,:,:) = B;
    304317            end
    305318            % caluclate velocity data (y and v in indices, reverse to y component)
Note: See TracChangeset for help on using the changeset viewer.