Changeset 861 for trunk/src/series


Ignore:
Timestamp:
Jan 28, 2015, 11:48:49 AM (10 years ago)
Author:
sommeria
Message:

bugsrepaired

Location:
trunk/src/series
Files:
2 edited

Legend:

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

    r860 r861  
    17561756     Param.ActionInput.Civ1.CorrSmooth=0;% launch Civ1 with no data point (to get the image names for A and B)
    17571757     [Data,errormsg]=civ_series(Param);% get the civ1+fix1 results
    1758    
     1758     if ~isempty(errormsg), return, end % rmq: error msg displayed in civ_series
     1759     
    17591760 %% create image data ImageData for display
    17601761     ImageData.ListVarName={'ny','nx','A'};
  • trunk/src/series/civ_series.m

    r860 r861  
    401401                j2=j2_series_Civ1(ifield);
    402402            end
    403             Data.Civ1_Time=(time(i2+1,j2+1)+time(i1+1,j1+1))/2;
     403            if strcmp(Param.ActionInput.ListCompareMode,'displacement')
     404                Data.Civ1_Time=time(i2+1,j2+1);% the time is the time of the secodn image
     405                Data.Civ1_Dt=1;% time interval is 1, to yield displacement instead of velocity=displacement/Dt at reading
     406            else
     407            Data.Civ1_Time=(time(i2+1,j2+1)+time(i1+1,j1+1))/2;% the time is the time at the middle of the image pair
    404408            Data.Civ1_Dt=time(i2+1,j2+1)-time(i1+1,j1+1);
     409            end
    405410            for ilist=1:length(list_param)
    406411                Data.(Civ1_param{4+ilist})=Param.ActionInput.Civ1.(list_param{ilist});
     
    421426                par_civ1.Mask=mask; %use mask already opened
    422427            else
    423                 par_civ1.Mask=imread(par_civ1.Mask);%update the mask, an store it for future use
     428                try
     429                    par_civ1.Mask=imread(par_civ1.Mask);%update the mask, an store it for future use
     430                catch ME
     431                    if ~isempty(ME.message)
     432                        errormsg=['error reading input image: ' ME.message];
     433                        disp_uvmat('ERROR',errormsg,checkrun)
     434                        return
     435                    end
     436                end
    424437                mask=par_civ1.Mask;
    425438                maskname=par_civ1.Mask;
     
    710723            Data.Civ2_ImageA=ImageName_A;
    711724            Data.Civ2_ImageB=ImageName_B;
     725             if strcmp(Param.ActionInput.ListCompareMode,'displacement')
     726                Data.Civ2_Time=time(i2+1,j2+1);% the time is the time of the secodn image
     727                Data.Civ2_Dt=1;% time interval is 1, to yield displacement instead of velocity=displacement/Dt at reading
     728             else
    712729            Data.Civ2_Time=(time(i2+1,j2+1)+time(i1+1,j1+1))/2;
    713730            Data.Civ2_Dt=Civ2_Dt;
     731             end
    714732        end
    715733        %         Data.Civ2_Time=1;
Note: See TracChangeset for help on using the changeset viewer.