Ignore:
Timestamp:
Jun 12, 2012, 12:29:19 AM (12 years ago)
Author:
sommeria
Message:

bugs repaired in aver_stat and check_data_file

sub_background largely modified. Tests needed
other functions not yet translated

File:
1 edited

Legend:

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

    r447 r451  
    114114        Tabchar=message;
    115115    else
    116         datnum=zeros(1,nbfield);
    117116        Tabchar={};
    118117        %LOOP ON SLICES
     
    120119            index_slice=i_slice:NbSlice:nbfield;
    121120            filefound={};
     121            datnum=zeros(1,nbfield_j);
    122122            for ifile=1:nbfield_i
    123 %                 index(ifile)=index_slice(ifile);
    124123                stopstate=get(hseries.RUN,'BusyAction');
    125124                if isequal(stopstate,'queue')% enable STOP command
     
    129128                    detect=exist(file,'file'); % check the existence of the file
    130129                    if detect==0
    131                         count=count+1;
     130%                         count=count+1;
    132131                        lastfield='not found';
    133132                    else
     
    135134                        if isfield(datfile,'datenum')
    136135                            datnum(ifile)=datfile.datenum;
    137                         end
    138                         filefound(ifile)={datfile.name};
     136                            filefound(ifile)={datfile.name};
     137                        end                     
    139138                        lastfield='';
    140139                        [FileType,FileInfo,Object]=get_file_type(file);
     
    152151            end
    153152        end
    154 %         if isempty(datnum)||isempty(filefound)
    155153        if isempty(filefound)
    156154            if NbSlice>1
     
    161159        else
    162160            datnum=datnum(find(datnum));%keep the non zero values corresponding to existing files
     161            filefound=filefound(find(datnum));
    163162            [first,ind]=min(datnum);
    164163            [last,indlast]=max(datnum);
    165             message={['oldest modification:  ' cell2mat(filefound(ind)) ' : ' datestr(first)];...
    166                 ['latest modification:  ' cell2mat(filefound(indlast)) ' : ' datestr(last)]};
     164            message={['oldest modification:  ' filefound{ind} ' : ' datestr(first)];...
     165                ['latest modification:  ' filefound{indlast} ' : ' datestr(last)]};
    167166        end
    168167        if ~isempty(Tabchar)
Note: See TracChangeset for help on using the changeset viewer.