Ignore:
Timestamp:
Sep 7, 2018, 8:51:09 PM (6 years ago)
Author:
sommeria
Message:

merge_proj_polar updated + other corrected bugs

File:
1 edited

Legend:

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

    r1033 r1058  
    140140   
    141141    %% setting of  parameters specific to sub_background
    142     nbaver_init=23; %default number of images used for the sliding background: to be adjusted later to include an integer number of bursts 
    143     if nbfield_i~=1
     142    CheckVolume='No';
     143    nbaver_init=23; %default number of images used for the sliding background: to be adjusted later to include an integer number of bursts
     144     if nbfield_i~=1
    144145        nbaver=floor(nbaver_init/nbfield_j); % number of bursts used for the sliding background,
    145146        if isequal(mod(nbaver,2),0)% if nbaver is even
     
    148149        nbaver_init=nbaver*nbfield_j;%propose by default an integer number of bursts
    149150    end
    150    
     151    BrightnessRankThreshold=0.1;
     152    CheckSubmedian='No';
     153    SaturationCoeff=0;
     154    if isfield(Param,'ActionInput')
     155        if isfield(Param.ActionInput,'CheckVolume') && Param.ActionInput.CheckVolume
     156            CheckVolume='Yes';
     157        end
     158        if isfield(Param.ActionInput,'SlidingSequenceLength')
     159         nbaver_init=Param.ActionInput.SlidingSequenceLength;
     160        end
     161        if isfield(Param.ActionInput,'BrightnessRankThreshold')
     162          BrightnessRankThreshold=Param.ActionInput.BrightnessRankThreshold;
     163        end
     164        if isfield(Param.ActionInput,'CheckSubmedian') && Param.ActionInput.CheckSubmedian
     165        CheckSubmedian='Yes';
     166        end
     167        if isfield(Param.ActionInput,'SaturationCoeff')
     168            SaturationCoeff=Param.ActionInput.SaturationCoeff;
     169        end
     170    end   
    151171    prompt = {'volume scan mode (Yes/No)';...
    152172        'Number of images for the sliding background (MUST FIT IN COMPUTER MEMORY)';...
    153173        'the luminosity rank chosen to define the background (0.1=for dense particle seeding, 0.5 (median) for sparse particles';...
    154174        'set to 0 image levels below median(Yes/No)';...
    155         'image rescaling coefficient(high values reduce the influence of bright particles), =0 for no rescaling' };
     175        'image rescaling coefficient(=2 to reduce the influence of bright particles), =0 for no rescaling' };
    156176    dlg_title = 'get (slice by slice) a sliding background and substract to each image';
    157177    num_lines= 5;
    158     def     = { 'No';num2str(nbaver_init);'0.1';'No';'2'};
     178    def     = { CheckVolume;num2str(nbaver_init);num2str(BrightnessRankThreshold);CheckSubmedian;num2str(SaturationCoeff)};
    159179    answer = inputdlg(prompt,dlg_title,num_lines,def);
    160180    if isempty(answer)
Note: See TracChangeset for help on using the changeset viewer.