Changeset 1154 for trunk/src/series


Ignore:
Timestamp:
Jul 7, 2024, 11:22:00 PM (3 months ago)
Author:
sommeria
Message:

various improvements

Location:
trunk/src/series
Files:
1 added
3 edited

Legend:

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

    r1153 r1154  
    141141        iview_image=2;%line # for the input images
    142142    otherwise
    143         if ~strcmp(FieldType,'image')
    144         msgbox_uvmat('ERROR','civ_series needs images, scalar fields in netcdf format, or civ data as input')
    145         return
    146         end
     143        % if ~strcmp(FileType,'image')
     144        % msgbox_uvmat('ERROR','civ_series needs images, scalar fields in netcdf format, or civ data as input')
     145        % return
     146        % end
    147147end
    148148       
  • trunk/src/series/civ_series.m

    r1153 r1154  
    127127    end
    128128    if isfield(Param,'InputTable')
    129         [tild,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
     129        [~,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
    130130        iview_A=0;% series index (iview) for the first image series
    131131        iview_B=0;% series index (iview) for the second image series (only non zero for option 'shift' comparing two image series )
     
    195195                j2_series_Civ2=j2_series_Civ1;
    196196                NomTypeNc='_1';
    197             case 'PIV volume'
    198                 % TODO, TODO
    199197        end
    200198        %determine frame indices for input with movie or other multiframe input file
     
    252250Data.Conventions='uvmat/civdata';% states the conventions used for the description of field variables and attributes
    253251Data.Program='civ_series';
     252if isfield(Param,'UvmatRevision')
     253    Data.Program=[Data.Program ', uvmat r' Param.UvmatRevision];
     254end
    254255Data.CivStage=0;%default
    255256
     
    509510            % caluclate velocity data (y and v in indices, reverse to y component)
    510511            tstart_civ1=tic;
    511             [xtable, ytable, utable, vtable, ctable, F, result_conv, errormsg] = civ (par_civ1);
     512            [xtable, ytable, utable, vtable, ctable, FF, result_conv, errormsg] = civ (par_civ1);
    512513            if ~isempty(errormsg)
    513514                disp_uvmat('ERROR',errormsg,checkrun)
     
    519520            Data.Civ1_V=reshape(-vtable,[],1);
    520521            Data.Civ1_C=reshape(ctable,[],1);
    521             Data.Civ1_FF=reshape(F,[],1);
     522            Data.Civ1_FF=reshape(FF,[],1);
    522523            time_civ1=toc(tstart_civ1);
    523524        end
     
    601602
    602603        % perform Patch calculation using the UVMAT fct 'filter_tps'
    603        
    604604        [Data.Civ1_SubRange,Data.Civ1_NbCentres,Data.Civ1_Coord_tps,Data.Civ1_U_tps,Data.Civ1_V_tps,tild,Ures, Vres,tild,FFres]=...
    605605            filter_tps([Data.Civ1_X(ind_good) Data.Civ1_Y(ind_good)],Data.Civ1_U(ind_good),Data.Civ1_V(ind_good),[],Data.Patch1_SubDomainSize,Data.Patch1_FieldSmooth,Data.Patch1_MaxDiff);
    606606        Data.Civ1_U_smooth(ind_good)=Ures;% take the interpolated (smoothed) velocity values for good vectors, keep civ1 data for the other
    607607        Data.Civ1_V_smooth(ind_good)=Vres;
    608         Data.Civ1_FF(ind_good)=uint8(FFres);
     608        Data.Civ1_FF(ind_good)=uint8(4*FFres);
    609609        time_patch1=toc(tstart_patch1);
    610610        disp('patch1 performed')
     
    770770        % calculate velocity data (y and v in image indices, reverse to y component)
    771771       
    772         [xtable, ytable, utable, vtable, ctable, F,result_conv,errormsg] = civ (par_civ2);
     772        [xtable, ytable, utable, vtable, ctable, FF,result_conv,errormsg] = civ (par_civ2);
    773773       
    774774        list_param=(fieldnames(Param.ActionInput.Civ2))';
     
    810810        Data.Civ2_V=reshape(-vtable,[],1);
    811811        Data.Civ2_C=reshape(ctable,[],1);
    812         Data.Civ2_FF=reshape(F,[],1);
     812        Data.Civ2_FF=reshape(FF,[],1);
    813813        disp('civ2 performed')
    814814        time_civ2=toc(tstart_civ2);
     
    821821                return
    822822            end
    823 %         elseif isfield(Param,'Civ2_X')% use Civ2 data as input in Param (test mode)
    824 %             Data.ListGlobalAttribute={};
    825 %             Data.ListVarName={};
    826 %             Data.VarDimName={};
    827 %             Data.Civ2_X=Param.Civ2_X;
    828 %             Data.Civ2_Y=Param.Civ2_Y;
    829 %             Data.Civ2_U=Param.Civ2_U;
    830 %             Data.Civ2_V=Param.Civ2_V;
    831 %             Data.Civ2_FF=Param.Civ2_FF;
    832823        end
    833824    end
     
    886877        Data.Civ2_U_smooth(ind_good)=Ures;
    887878        Data.Civ2_V_smooth(ind_good)=Vres;
    888         Data.Civ2_FF(ind_good)=FFres;
     879        Data.Civ2_FF(ind_good)=uint8(4*FFres);
    889880        Data.CivStage=Data.CivStage+1;
    890881        time_patch2=toc(tstart_patch2);
     
    921912% OUTPUT:
    922913% xtable: set of x coordinates
    923 % ytable: set of y coordiantes
     914% ytable: set of y coordinates
    924915% utable: set of u displacements (along x)
    925916% vtable: set of v displacements (along y)
     
    12781269% FF=2, for too small correlation
    12791270% FF=3, for velocity outside bounds
    1280 % FF=4 for exclusion by difference with the smoothed field, not set in this function
     1271% FF=4 for exclusion by difference with the smoothed field, set by call to function filter_tps
    12811272
    12821273if isfield (Param,'MinCorr')
Note: See TracChangeset for help on using the changeset viewer.