Changeset 874 for trunk/src/series


Ignore:
Timestamp:
Feb 19, 2015, 2:17:59 AM (9 years ago)
Author:
sommeria
Message:

merge_proj corrected + various bugs

Location:
trunk/src/series
Files:
3 edited

Legend:

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

    r873 r874  
    373373
    374374%% Civ1 parameters
    375 Param.CheckCiv1=1;
     375%Param.CheckCiv1=1;
    376376Param.Civ1.CorrBoxSize=[25 25];
    377377Param.Civ1.SearchBoxSize=[55 55];
     
    387387
    388388%% Fix1 parameters
    389 Param.CheckFix1=1;
     389%Param.CheckFix1=1;
    390390Param.Fix1.CheckFmin2=1;
    391391Param.Fix1.CheckF3=1;
     
    393393
    394394%% Patch1 parameters
    395 Param.CheckPatch1=1;
     395%Param.CheckPatch1=1;
    396396Param.Patch1.FieldSmooth=10;
    397397Param.Patch1.MaxDiff=1.5000;
     
    400400
    401401%% Civ2 parameters
    402 Param.CheckCiv2=1;
     402%Param.CheckCiv2=1;
    403403Param.Civ2.CorrBoxSize=[21 21];
    404404Param.Civ2.SearchBoxSize=[27 27];
     
    413413
    414414%% Fix2 parameters
    415 Param.CheckFix2=1;
     415%Param.CheckFix2=1;
    416416Param.Fix2.CheckFmin2=1;
    417417Param.Fix2.CheckF4=1;
     
    420420
    421421%% Patch2 parameters
    422 Param.CheckPatch2=1;
     422%Param.CheckPatch2=1;
    423423Param.Patch2.FieldSmooth=2;
    424424Param.Patch2.MaxDiff=1.5000;
  • trunk/src/series/merge_proj.m

    r867 r874  
    446446                        if iview==1
    447447                            %MergeData.(VarName)=Data{1}.(VarName);% initiate MergeData with the first field
     448                            MergeData.(VarName)(check_bad)=0; %set to zero NaN or data marked by error flag
    448449                            NbAver=~check_bad;% initiate NbAver: the nbre of good data for each point
    449450                        elseif size(Data{iview}.(VarName))~=size(MergeData.(VarName))
  • trunk/src/series/time_series.m

    r872 r874  
    9292        end
    9393    end
     94    % test for subtraction
     95       if size(Param.InputTable,1)==2
     96            answer=msgbox_uvmat('INPUT_Y-N','substract the two input file series (Yes) or concatene them (No)');
     97            ParamOut.ActionInput.CheckSub=str2double(answer);
     98        end
    9499    % check the existence of the first and last file in the series
    95100     first_j=[];
     
    161166CheckNc=cell(1,nbview);
    162167frame_index=cell(1,nbview);
     168
    163169for iview=1:nbview
    164170    if ~exist(filecell{iview,1}','file')
     
    284290    VarMesh=Param.ActionInput.VarMesh;
    285291    end
     292end
     293CheckSub=0;%default
     294if isfield(Parma,'ActionInput') && isfield(Param.ActionInput,'CheckSub')
     295CheckSub=ParamOut.ActionInput.CheckSub;
    286296end
    287297%%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%%
     
    312322        % coordinate transform (or other user defined transform)
    313323        if ~isempty(transform_fct)
    314             switch nargin(transform_fct)
    315                 case 4
    316                     if length(Data)==2
    317                         Field=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2});
    318                     else
     324            if CheckSub
     325                switch nargin(transform_fct)
     326                    case 4
     327                        if length(Data)==2
     328                            Field=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2});
     329                        else
     330                            Field=transform_fct(Data{1},XmlData{1});
     331                        end
     332                    case 3
     333                        if length(Data)==2
     334                            Field=transform_fct(Data{1},XmlData{1},Data{2});
     335                        else
     336                            Field=transform_fct(Data{1},XmlData{1});
     337                        end
     338                    case 2
    319339                        Field=transform_fct(Data{1},XmlData{1});
    320                     end
    321                 case 3
    322                     if length(Data)==2
    323                         Field=transform_fct(Data{1},XmlData{1},Data{2});
    324                     else
    325                         Field=transform_fct(Data{1},XmlData{1});
    326                     end
    327                 case 2
    328                     Field=transform_fct(Data{1},XmlData{1});
    329                 case 1
    330                     Field=transform_fct(Data{1});
     340                    case 1
     341                        Field=transform_fct(Data{1});
     342                end
     343            else
     344                if nargin(transform_fct)>=2
     345                    for iview=1:nbview
     346                        Data{iview}=transform_fct(Data{iview},XmlData{iview});
     347                    end
     348                else
     349                    for iview=1:nbview
     350                        Data{iview}=transform_fct(Data{iview});
     351                    end
     352                end
    331353            end
    332354        end
     
    344366            end
    345367        end
    346 %         nbfile=nbfile+1;
     368        %         nbfile=nbfile+1;
    347369       
    348370        % initiate the time series at the first iteration
     
    441463                VarVal=Field.(VarName);
    442464                if testsum(ivar)==2% test for recorded variable
    443                     if isempty(errormsg)                     
     465                    if isempty(errormsg)
    444466                        VarVal=shiftdim(VarVal,-1); %shift dimension
    445467                        DataOut.(VarName)(index,:,:)=VarVal;%concanete the current field to the time series
Note: See TracChangeset for help on using the changeset viewer.