Changeset 1123


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

various improvements

Location:
trunk/src
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/fill_GUI.m

    r1122 r1123  
    6060        hh=[];
    6161        input_data=Param.(fields{ifield});
     62        if isfield(Param,'Type') && isa(Param.Type,'matlab.graphics.primitive.Rectangle')
     63            input_data='rectangle';
     64        end
    6265        check_done=0;
    6366        if isfield(handles,fields{ifield})
  • trunk/src/find_field_bounds.m

    r1107 r1123  
    3434%% analyse input field
    3535[CellInfo,NbDimArray,errormsg]=find_field_cells(Field);% analyse  the input field structure
     36if isempty(CellInfo)
     37    errormsg='bad input field'
     38    return
     39end
    3640if ~isempty(errormsg)
    37     errormsg=['uvmat /refresh_field / find_field_cells / ' errormsg];% display error
     41    errormsg=['uvmat /refresh_field / find_field_cells / ' errormsg]% display error
    3842    return
    3943end
  • trunk/src/script_readlvm.m

    r971 r1123  
    6161
    6262%% check camera signal
    63 ind_start=find(Data.Trig_Cam>3.5,1,'first')
     63ind_start=find(Data.Trig_cam>3.5,1,'first')
    6464disp(['camera starts at time ' num2str(Data.Time(ind_start))])
    6565%% transform and filter conductivity probe signals into [temperature-corrected] density
  • trunk/src/series.m

    r1120 r1123  
    27202720
    27212721%% NbSlice visibility
     2722if isfield(ParamOut,'OutputFileMode')&& strcmp(ParamOut.OutputFileMode,'NbSlice')
     2723    ParamOut.NbSlice='on';
     2724end
    27222725if isfield(ParamOut,'NbSlice') && (strcmp(ParamOut.NbSlice,'on')||isnumeric(ParamOut.NbSlice))
    27232726    set(handles.num_NbSlice,'Visible','on')
  • trunk/src/series/civ_series.m

    r1122 r1123  
    8989        end
    9090    end
    91     % estimated CPUTime
    92 %     CPUtime_unit=0.01;%estimated time for a multiplication (in microsecond)
    93 %     if isfield(Param.SeriesData,'FileInfo')&&isfield(Param.SeriesData.FileInfo{1},'Height')&&isfield(Param.SeriesData.FileInfo{1},'Width')
    94 %         pixnbre=Param.SeriesData.FileInfo{1}.Height*Param.SeriesData.FileInfo{1}.Width; % total number of pxels for input images 
    95 %         CPUtime=0;
    96 %         if isfield(Data.ActionInput,'Civ1')
    97 %             %BoxSize=Data.ActionInput.Civ1.CorrBoxSize(1)*Data.ActionInput.Civ1.CorrBoxSize(2);
    98 %             tic
    99 %             testboxa=rand(Data.ActionInput.Civ1.CorrBoxSize(1),Data.ActionInput.Civ1.CorrBoxSize(2));
    100 %             testboxb=rand(Data.ActionInput.Civ1.SearchBoxSize(1),Data.ActionInput.Civ1.SearchBoxSize(2));
    101 %             anss=conv2(testboxa,testboxb);
    102 %             CPUtime_unit=toc;
    103 %             nb_box=pixnbre/(Data.ActionInput.Civ1.Dx*Data.ActionInput.Civ1.Dy);   
    104 %             %nbpos=Data.ActionInput.Civ1.SearchBoxSize-Data.ActionInput.Civ1.CorrBoxSize;
    105 %             CPUtime=2*CPUtime_unit*nb_box%*BoxSize*nbpos(1)*nbpos(2);% adjustement factor 2 used
    106 %         end
    107 %         if isfield(Data.ActionInput,'Patch1')
    108 %             CPUtime=2*CPUtime;
    109 %         end
    110 %         if isfield(Data.ActionInput,'Civ2')
    111 %             tic
    112 %             testboxa=rand(Data.ActionInput.Civ2.CorrBoxSize(1),Data.ActionInput.Civ2.CorrBoxSize(2));
    113 %             testboxb=rand(Data.ActionInput.Civ2.SearchBoxSize(1),Data.ActionInput.Civ2.SearchBoxSize(2));
    114 %             anss=conv2(testboxa,testboxb);
    115 %             CPUtime_unit=toc;
    116 %             nb_box=pixnbre/(Data.ActionInput.Civ2.Dx*Data.ActionInput.Civ2.Dy);
    117 %             %BoxSize=Data.ActionInput.Civ2.CorrBoxSize(1)*Data.ActionInput.Civ2.CorrBoxSize(2);
    118 %             %nbpos=Data.ActionInput.Civ2.SearchBoxSize-Data.ActionInput.Civ2.CorrBoxSize;
    119 %             CPUtime=CPUtime+2*CPUtime_unit*nb_box;%*BoxSize*nbpos(1)*nbpos(2);
    120 %         end
    121 %         if isfield(Data.ActionInput,'Patch2')
    122 %             CPUtime=(4/3)*CPUtime;
    123 %         end
    124 %         Data.CPUTime=ceil(CPUtime/6); % estimated CPU time per field pair in minute
    125 %         Data.CPUTime=Data.CPUTime/10; % displqy CPU time with 1 digit beyond dot
    126 %     end
    12791    return
    12892end
  • 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);
  • trunk/src/uvmat.m

    r1121 r1123  
    50005000        menu={'civ1';'filter1';'civ2';'filter2';'civ3';'filter3'};
    50015001        imax=[0 1 1 2 3 3 4 5 5 6];
    5002         imax=imax(Civ+1);
     5002        imax=imax(min(Civ+1,10));
    50035003%         if isequal(Civ,0)
    50045004%             imax=0;
Note: See TracChangeset for help on using the changeset viewer.