Changeset 917 for trunk/src/series


Ignore:
Timestamp:
Jun 25, 2015, 12:33:52 PM (9 years ago)
Author:
sommeria
Message:

series modified to deal with NbSlice? in local mode, subbackground fixed, edge detection introduced

File:
1 edited

Legend:

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

    r908 r917  
    8686    %% root input file(s) and type
    8787    % check the existence of the first file in the series
    88         first_j=[];
    89     if isfield(Param.IndexRange,'first_j'); first_j=Param.IndexRange.first_j; end
     88        first_j=[];% note that the function will propose to cover the whole range of indices
     89    if isfield(Param.IndexRange,'MinIndex_j'); first_j=Param.IndexRange.MinIndex_j; end
    9090    last_j=[];
    91     if isfield(Param.IndexRange,'last_j'); last_j=Param.IndexRange.last_j; end
     91    if isfield(Param.IndexRange,'MaxIndex_j'); last_j=Param.IndexRange.MaxIndex_j; end
    9292    PairString='';
    9393    if isfield(Param.IndexRange,'PairString'); PairString=Param.IndexRange.PairString; end
     
    131131    end
    132132    first_i=1;last_i=1;incr_i=1;%default
    133     if isfield(Param.IndexRange,'first_i'); last_i=Param.IndexRange.first_i; end   
    134     if isfield(Param.IndexRange,'last_i'); last_i=Param.IndexRange.last_i; end
     133    if isfield(Param.IndexRange,'MinIndex_i'); first_i=Param.IndexRange.MinIndex_i; end   
     134    if isfield(Param.IndexRange,'MaxIndex_i'); last_i=Param.IndexRange.MaxIndex_i; end
    135135    if isfield(Param.IndexRange,'incr_i')&&~isempty(Param.IndexRange.incr_i)
    136136        incr_i=Param.IndexRange.incr_i;
     
    156156    def     = { 'No';num2str(nbaver_init);'0.1'};
    157157    answer = inputdlg(prompt,dlg_title,num_lines,def);
    158    
     158    if isempty(answer)
     159        return
     160    end
    159161    %check input consistency
    160162    if strcmp(answer{1},'No') && ~isequal(NbSlice_i,1)
     
    252254nbfield_j=size(i1_series{1},1); %nb of fields for the j index (bursts or volume slices)
    253255nbfield_i=size(i1_series{1},2); %nb of fields for the i index
    254 nbfield=nbfield_j*nbfield_i; %total number of fields
     256
    255257if Param.ActionInput.CheckVolume
    256258    step=2;% we assume the burst contains only one image pair
     
    262264        NbSlice_j=1;
    263265        NbSlice=NbSlice_i;
    264     nbfield_i=floor(nbfield/NbSlice_i);%total number of  indexes in a slice (adjusted to an integer number of slices)
    265     nbfield=nbfield_i*NbSlice_i; %total number of fields after adjustement
    266     nbfield_series=nbfield;
    267 end
     266    %nbfield_i=floor(nbfield_i/NbSlice_i);%total number of  indexes in a slice (adjusted to an integer number of slices)
     267    %nbfield=nbfield_i*NbSlice_i; %total number of fields after adjustement
     268    nbfield_series=nbfield_i*nbfield_j;
     269end
     270nbfield=nbfield_j*nbfield_i; %total number of fields
    268271nbaver_ima=Param.ActionInput.SlidingSequenceLength;%number of images for the sliding background
    269272nbaver=ceil(nbaver_ima/step);%number of bursts for the sliding background
Note: See TracChangeset for help on using the changeset viewer.