Ignore:
Timestamp:
Feb 24, 2014, 10:51:40 PM (10 years ago)
Author:
sommeria
Message:

fct improved by reducing the input file check when selected.

File:
1 edited

Legend:

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

    r676 r716  
    4343
    4444%% set the input elements needed on the GUI series when the action is selected in the menu ActionName or InputTable refreshed
    45 if isstruct(Param) && isequal(Param.Action.RUN,0)
     45if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN
    4646    ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
    4747    ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
     
    5555    ParamOut.OutputDirExt='.tseries';%set the output dir extension
    5656    ParamOut.OutputFileMode='NbSlice';% '=NbInput': 1 output file per input file index, '=NbInput_i': 1 file per input file index i, '=NbSlice': 1 file per slice
    57     filecell=get_file_series(Param);%check existence of the first input file
    58     if ~exist(filecell{1,1},'file')
    59         msgbox_uvmat('WARNING','the first input file does not exist')
     57    % check the existence of the first file in the series
     58        first_j=[];
     59    if isfield(Param.IndexRange,'first_j'); first_j=Param.IndexRange.first_j; end
     60    last_j=[];
     61    if isfield(Param.IndexRange,'last_j'); last_j=Param.IndexRange.last_j; end
     62    PairString='';
     63    if isfield(Param.IndexRange,'PairString'); PairString=Param.IndexRange.PairString; end
     64    [i1,i2,j1,j2] = get_file_index(Param.IndexRange.first_i,first_j,PairString);
     65    FirstFileName=fullfile_uvmat(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},...
     66        Param.InputTable{1,5},Param.InputTable{1,4},i1,i2,j1,j2);
     67    if ~exist(FirstFileName,'file')
     68        msgbox_uvmat('WARNING',['the first input file ' FirstFileName ' does not exist'])
    6069    elseif isequal(size(Param.InputTable,1),1) && ~isfield(Param,'ProjObject')
    6170        msgbox_uvmat('WARNING','a projection object  needs to be introduced for time_series')
Note: See TracChangeset for help on using the changeset viewer.