Changeset 802


Ignore:
Timestamp:
Jul 29, 2014, 2:41:25 PM (10 years ago)
Author:
sommeria
Message:

sub_background corrected

File:
1 edited

Legend:

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

    r784 r802  
    115115    first_i=1;last_i=1;incr_i;%default
    116116    if isfield(Param.IndexRange,'first_i'); last_i=Param.IndexRange.first_i; end   
    117     if isfield(Param.IndexRange,'last_i'); last_i=Param.IndexRange.last_j; end
     117    if isfield(Param.IndexRange,'last_i'); last_i=Param.IndexRange.last_i; end
    118118    if isfield(Param.IndexRange,'incr_i')&&~isempty(Param.IndexRange.incr_i)
    119119        incr_i=Param.IndexRange.incr_i;
     
    218218if strcmp(lower(NomType{1}(end)),'a')
    219219    NomTypeOut=NomType{1};%case of letter appendix
    220 elseif isempty(j1_series)
     220elseif isempty(j1_series{1})
    221221    NomTypeOut='_1';
    222222else
     
    297297    Acor=(Acor>0).*Acor; % put to 0 the negative elements in Acor
    298298    ifile=indselect(ifield);
     299    j1=1;
    299300    if ~isempty(j1_series{1})
    300301        j1=j1_series{1}(ifile);
     
    331332        for iburst=1:step
    332333            ifile=indselect(ifield+iburst+step*halfnbaver);
    333             filename=fullfile_uvmat(RootPath{1},SubDir{1},RootFile{1},FileExt{1},NomType{1},i1_series{1}(ifile),[],j1_series{1}(ifile));
     334            j1=1;
     335    if ~isempty(j1_series{1})
     336        j1=j1_series{1}(ifile);
     337    end
     338            filename=fullfile_uvmat(RootPath{1},SubDir{1},RootFile{1},FileExt{1},NomType{1},i1_series{1}(ifile),[],j1);
    334339            Aread=read_image(filename,FileType{1},MovieObject{1},i1_series{1}(ifile));
    335340            if ndims(Aread)==3;%color images
Note: See TracChangeset for help on using the changeset viewer.