Ignore:
Timestamp:
Aug 21, 2023, 5:53:05 PM (6 months ago)
Author:
sommeria
Message:

various improvements

Location:
trunk/src/transform_field
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/transform_field/FFT2_detrend.m

    r1113 r1123  
    6868        VarName=DataIn.ListVarName{ivar};
    6969        z=DataIn.(VarName);
     70        z(isnan(z))=0;% set to 0 NaN values
    7071        rhs(1) = sum(sum(x.*z)); rhs(2) = sum(sum(y.*z)); rhs(3) = sum(sum(z));
    7172        lin_coeff = inv(coeff)*rhs';
     
    7576        spec2 = spec2(Iy,Ix);
    7677        spec2 = spec2(ss,:);
    77         %DataOut.(VarName) = log(spec2);
    78         DataOut.(VarName) = spec2;
     78        DataOut.(VarName) = log10(spec2);
     79        %DataOut.(VarName) = spec2;
    7980        spec_sum=sum(sum(spec2));
    8081        kx_mean=sum(sum(spec2.*kx))/spec_sum;
  • trunk/src/transform_field/signal_spectrum.m

    r1107 r1123  
    170170    if numel(ind_good)>WindowLength
    171171        NbPos=NbPos+1;
    172         if ~isempty(ind_bad)
     172        if ~isempty(ind_bad)WindowLength
    173173            sample=sample(ind_good); % keep only  non NaN data
    174174            NbNan=NbNan+numel(ind_bad);
Note: See TracChangeset for help on using the changeset viewer.