Changeset 904 for trunk/src/series


Ignore:
Timestamp:
May 30, 2015, 1:26:33 PM (9 years ago)
Author:
sommeria
Message:

walltime estimate introduced in series, and option of result file overwrite

Location:
trunk/src/series
Files:
3 edited

Legend:

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

    r897 r904  
    7070    Data.OutputSubDirMode='last'; %select the last subDir in the input table as root of the output subdir name (option 'all'/'first'/'last', 'all' by default)
    7171    Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar)
     72    Data.CheckOverwriteVisible='on'; % manage the overwrite of existing files (default=1)
    7273    return
    7374end
     
    325326maskname='';% initiate the mask name
    326327tic;
     328CheckOverwrite=1;%default
     329if isfield(Param,'CheckOverwrite')
     330    CheckOverwrite=Param.CheckOverwrite;
     331end
    327332for ifield=1:NbField
    328333    if ~isempty(RUNHandle)% update the waitbar in interactive mode with GUI series  (checkrun=1)
     
    350355                    j1_series_Civ1(ifield),j2_series_Civ1(ifield));
    351356            end
     357        end
     358        if ~CheckOverwrite && exist(ncfile,'file')         
     359        continue% skip iteration if the mode overwrite is desactivated and the result file already exists
    352360        end
    353361    end
     
    861869            disp(errormsg)
    862870        end
    863         disp(['ellapsed time ' num2str(toc) ' s'])
     871        disp(['ellapsed time ' num2str(toc/60,2) ' minutes'])
    864872    end
    865873end
  • trunk/src/series/ima_levels.m

    r810 r904  
    9595%% read input parameters from an xml file if input is a file name (batch mode)
    9696ParamOut=[];
     97RUNHandle=[];
     98WaitbarHandle=[];
    9799checkrun=1;
    98100if ischar(Param)
    99101    Param=xml2struct(Param);% read Param as input file (batch case)
    100102    checkrun=0;
    101 end
    102 hseries=findobj(allchild(0),'Tag','series');
    103 RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
    104 WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series
     103else% interactive mode in Matlab
     104    hseries=findobj(allchild(0),'Tag','series');
     105    RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
     106    WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series
     107end
    105108
    106109%% subdirectory for output files
     
    171174for ifile=1:nbfield
    172175            update_waitbar(WaitbarHandle,ifile/nbfield)
    173     if ~isempty(RUNHandle)&& ~strcmp(get(RUNHandle,'BusyAction'),'queue')
     176    if ~isempty(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue')
    174177        disp('program stopped by user')
    175178        return
  • trunk/src/series/sub_background.m

    r897 r904  
    189189%% read input parameters from an xml file if input is a file name (batch mode)
    190190checkrun=1;
     191RUNHandle=[];
     192WaitbarHandle=[];
    191193if ischar(Param)
    192194    Param=xml2struct(Param);% read Param as input file (batch case)
    193195    checkrun=0;
    194 end
     196else
    195197hseries=findobj(allchild(0),'Tag','series');
    196198RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
    197199WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series
     200end
    198201
    199202%% input preparation
     
    352355        for ifield = step*(halfnbaver+1):step:nbfield_series-step*(halfnbaver+1)% ifield +iburst=index of the current processed image
    353356            update_waitbar(WaitbarHandle,ifield/nbfield_series)
    354             if  ~strcmp(get(RUNHandle,'BusyAction'),'queue')
     357            if  ~isempty(RUNHandle)&&~strcmp(get(RUNHandle,'BusyAction'),'queue')
    355358                disp('program stopped by user')
    356359                return
Note: See TracChangeset for help on using the changeset viewer.