Changeset 858


Ignore:
Timestamp:
Jan 26, 2015, 7:43:23 PM (6 years ago)
Author:
sommeria
Message:

bugs_corrected

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_motion.m

    r856 r858  
    247247                   par_civ.Civ1_V_tps=Field.Civ1_V_tps;
    248248                   par_civ.Civ1_Dt=Field.Civ1_Dt;
     249                   par_civ.Civ2_Dt=Field.Civ2_Dt;
    249250                   shiftx=Field.ShiftX(ind_pt);
    250251                   shifty=Field.ShiftY(ind_pt);
     
    290291                par_civ.ImageWidth=size(par_civ.ImageA,2);
    291292                par_civ.Grid=[xround yround];% PIV calculation with a single point
    292                 Param.ActionInput.(CivOption)=par_civ;
    293                
    294                 %  .ImageA: first image for correlation (matrix)
    295 %  .ImageB: second image for correlation(matrix)
    296 %  .CorrBoxSize: 1,2 vector giving the size of the correlation box in x and y
    297 %  .SearchBoxSize:  1,2 vector giving the size of the search box in x and y
    298 %  .SearchBoxShift: 1,2 vector or 2 column matrix (for civ2) giving the shift of the search box in x and y
    299 %  .CorrSmooth: =1 or 2 determines the choice of the sub-pixel determination of the correlation max
    300 %  .ImageWidth: nb of pixels of the image in x
    301 %  .Dx, Dy: mesh for the PIV calculation
    302 %  .Grid: grid giving the PIV calculation points (alternative to .Dx .Dy)
    303 %  .Mask: name of a mask file or mask image matrix itself
    304 %  .MinIma: thresholds for image luminosity
    305 %  .MaxIma
    306 %  .CheckDeformation=1 for subpixel interpolation and image deformation (linear transform)
    307 %  .DUDX: matrix of deformation obtained from patch at each grid point
    308 %  .DUDY
    309 %  .DVDX:
    310 %  .DVDY
    311                
     293                Param.ActionInput.(CivOption)=par_civ;     
    312294                [Data,errormsg,result_conv]= civ_series(Param);
    313295                if ~isempty(errormsg)
     
    330312                            set(0,'CurrentFigure',corrfig(1))
    331313                            AxeData.CurrentCorrImage=imagesc(rangx,-rangy,result_conv,[0 1]);
    332                             AxeData.CurrentVector=line([0 Data.Civ1_U],[0 Data.Civ1_V],'Tag','vector');
    333                             AxeData.TitleHandle=title(num2str(par.Grid));
     314                            AxeData.CurrentVector=line([0 Data.([CivOption '_U'])],[0 Data.([CivOption '_V'])],'Tag','vector');
     315                            AxeData.TitleHandle=title(num2str(par_civ.Grid));
    334316                            colorbar
    335317                            set(CurrentAxes,'UserData',AxeData)
     
    340322                        set(AxeData.CurrentCorrImage,'XData',rangx)
    341323                        set(AxeData.CurrentCorrImage,'YData',-rangy)
    342                         set(AxeData.CurrentVector,'XData',[0 Data.Civ1_U],'YData',[0 Data.Civ1_V])
    343                         set(AxeData.TitleHandle,'String',num2str(par.Grid))
     324                        set(AxeData.CurrentVector,'XData',[0 Data.([CivOption '_U'])],'YData',[0 Data.([CivOption '_V'])]);
     325                        set(AxeData.TitleHandle,'String',num2str(par_civ.Grid))
    344326                    end
    345327                end
  • trunk/src/series/civ_input.m

    r856 r858  
    18881888     Param=rmfield(Param,'OutputSubDir'); %remove output file option from civ_series
    18891889     Param.ActionInput.Civ2.SmoothParam=0;% launch Civ2 with no data point (to get the image names for A and B)
     1890     set(handles.Civ1,'BackgroundColor',[1 1 0])
    18901891     [Data,errormsg]=civ_series(Param);% get the civ1+fix1 results
    18911892     
     
    19041905    hview_field=view_field(ImageData); %view the image in the GUI view_field
    19051906    set(0,'CurrentFigure',hview_field)
     1907    % plot the boundaries of the subdomains used for patch
    19061908    RectCentre=squeeze(mean(Data.Civ1_SubRange,2));
    19071909    for isub=1:size(Data.Civ1_SubRange,3);
     
    19121914        rectangle('Position',[pos_x pos_y width height],'EdgeColor',[0 0 1])
    19131915    end
    1914     hhview_field=guihandles(hview_field);
     1916    hhview_field=guihandles(hview_field);%
    19151917    set(hview_field,'CurrentAxes',hhview_field.PlotAxes)
    1916     ViewData=get(hview_field,'UserData');
     1918    %ViewData=get(hview_field,'UserData');
     1919    % store info in the UserData of view-field
    19171920    ViewData.CivHandle=handles.civ_input;% indicate the handle of the civ GUI in view_field
    19181921    ViewData.PlotAxes.B=imread(Data.Civ2_ImageB);%store the second image in the UserData of the GUI view_field
     
    19271930    ViewData.PlotAxes.Civ1_V_tps=Data.Civ1_V_tps;
    19281931    ViewData.PlotAxes.Civ1_Dt=Data.Civ1_Dt;
     1932    ViewData.PlotAxes.Civ2_Dt=Data.Civ2_Dt;
    19291933    set(hview_field,'UserData',ViewData)% store the info in the UserData of image view_field
    19301934   
  • trunk/src/series/civ_series.m

    r856 r858  
    671671            V_tps=par_civ2.Civ1_V_tps;
    672672            Civ1_Dt=par_civ2.Civ1_Dt;
     673            Civ2_Dt=par_civ2.Civ1_Dt;
    673674                         Data.ListVarName={};
    674675                Data.VarDimName={};
     
    709710        par_civ2.SearchBoxSize(1)=2*ibx2+9;% search ara +-4 pixels around the guess
    710711        par_civ2.SearchBoxSize(2)=2*iby2+9;
    711         if strcmp(Param.ActionInput.ListCompareMode,'displacement')
    712             Civ1_Dt=1;
    713             Civ2_Dt=1;
    714         elseif exist('time','var')
    715             Civ2_Dt=time(i2+1,j2+1)-time(i1+1,j1+1);
    716         else
    717             Civ2_Dt=1;%TO CHECK, TEST
     712        if CheckInputFile % else Dt given by par_civ2
     713            if strcmp(Param.ActionInput.ListCompareMode,'displacement')
     714                Civ1_Dt=1;
     715                Civ2_Dt=1;
     716            else
     717                Civ2_Dt=time(i2+1,j2+1)-time(i1+1,j1+1);
     718            end
    718719        end
    719720        par_civ2.SearchBoxShift=(Civ2_Dt/Civ1_Dt)*[Shiftx(nbval>=1)./nbval(nbval>=1) Shifty(nbval>=1)./nbval(nbval>=1)];
     
    725726            par_civ2.DVDY=DVDY./nbval;
    726727        end
     728        par_civ2
    727729        % calculate velocity data (y and v in indices, reverse to y component)
    728730        [xtable, ytable, utable, vtable, ctable, F,result_conv,errormsg] = civ (par_civ2);
Note: See TracChangeset for help on using the changeset viewer.