Changeset 1199 for trunk/src/civ.m


Ignore:
Timestamp:
Mar 18, 2026, 12:44:56 PM (3 hours ago)
Author:
sommeria
Message:

bugs repaired

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r1198 r1199  
    6767shiftx=par_civ.SearchBoxShift(:,1);%use the input shift estimate, rounded to the next integer value
    6868shifty=par_civ.SearchBoxShift(:,2);%
    69 if numel(shiftx)==1% case of a unique shift for the whole field( civ1)
     69if isscalar(shiftx)% case of a unique shift for the whole field( civ1)
    7070    shiftx=shiftx*ones(nbvec,1);
    7171    shifty=shifty*ones(nbvec,1);
     
    106106%  100>=mask> 20: velocity not calculated, impermeable (no flux through mask boundaries)
    107107%  20>=mask: velocity=0
    108 checkmask=0;
     108checkmask=false;
     109check_undefined=zeros(npy_ima, npx_ima);
    109110MinA=min(min(par_civ.ImageA));
    110111if isfield(par_civ,'Mask') && ~isempty(par_civ.Mask)
    111     checkmask=1;
     112    checkmask=true;
    112113    if ~isequal(size(par_civ.Mask),[npy_ima npx_ima])
    113114        errormsg='mask must be an image with the same size as the images';
     
    125126    par_civ.CorrSmooth=2;% use SUBPIX2DGAUSS (take into account more points near the max)
    126127end
    127 
     128SearchRange_1=par_civ.SearchRange(1);
     129SearchRange_2=par_civ.SearchRange(2);
    128130if par_civ.CorrSmooth~=0 % par_civ.CorrSmooth=0 implies no civ computation (just input image and grid points given)
    129131    parfor ivec=1:nbvec
     
    136138        ibx2=floor(CorrBoxSizeX(ivec)/2);
    137139        iby2=floor(CorrBoxSizeY(ivec)/2);
    138         isx2=ibx2+ceil(par_civ.SearchRange(1));
    139         isy2=iby2+ceil(par_civ.SearchRange(2));
     140        isx2=ibx2+ceil(SearchRange_1);
     141        isy2=iby2+ceil(SearchRange_2);
    140142        subrange1_x=iref-ibx2:iref+ibx2;% x indices defining the first subimage
    141143        subrange1_y=jref-iby2:jref+iby2;% y indices defining the first subimage
Note: See TracChangeset for help on using the changeset viewer.