Ignore:
Timestamp:
Jan 21, 2015, 7:02:04 PM (6 years ago)
Author:
sommeria
Message:

bugrepair

File:
1 edited

Legend:

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

    r810 r854  
    145145    if nbfield_i~=1
    146146        nbaver=floor(nbaver_init/nbfield_j); % number of bursts used for the sliding background,
    147         if isequal(floor(nbaver/2),nbaver)
     147        if isequal(mod(nbaver,2),0)% if nbaver is even
    148148            nbaver=nbaver+1;%put the number of burst to an odd number (so the middle burst is defined)
    149149        end
     
    170170        step=nbfield_j;%case of bursts: the sliding background is shifted by the length of one burst
    171171    end
    172     nbaver_ima=str2num(answer{2});%number of images for the sliding background
     172    nbaver_ima=str2double(answer{2});%number of images for the sliding background
    173173    nbaver=ceil(nbaver_ima/step);%number of bursts for the sliding background
    174     if isequal(floor(nbaver/2),nbaver)
     174    if isequal(mod(nbaver,2),0)% if nbaver is even
    175175        nbaver=nbaver+1;%set the number of bursts to an odd number (so the middle burst is defined)
    176176    end
     
    178178    ParamOut.ActionInput.CheckVolume=strcmp(answer{1},'Yes');
    179179    ParamOut.ActionInput.SlidingSequenceLength=nbaver_ima;
    180     ParamOut.ActionInput.BrightnessRankThreshold=str2num(answer{3});
     180    ParamOut.ActionInput.BrightnessRankThreshold=str2double(answer{3});
    181181   
    182182    % apply the image rescaling function 'level' (avoid the blinking effects of bright particles)
     
    198198
    199199%% input preparation
    200 nbaver_ima=Param.ActionInput.SlidingSequenceLength;
    201200NbSlice=Param.IndexRange.NbSlice;
    202201if ~isequal(NbSlice,1)
     
    251250nbaver_ima=Param.ActionInput.SlidingSequenceLength;%number of images for the sliding background
    252251nbaver=ceil(nbaver_ima/step);%number of bursts for the sliding background
    253 if isequal(floor(nbaver/2),nbaver)
     252if isequal(mod(nbaver,2),0)
    254253    nbaver=nbaver+1;%set the number of bursts to an odd number (so the middle burst is defined)
    255254end
Note: See TracChangeset for help on using the changeset viewer.