# HG changeset patch # User Mathieu Lagrange # Date 1495441564 -7200 # Node ID 8ce78cacb5cb5b167b96bb079b8522f2034baa9b # Parent 3c29a652e441243892e83b332438a224089d3298 replace warning to error display channel diff -r 3c29a652e441 -r 8ce78cacb5cb nonExposed/addUserOffsets.m --- a/nonExposed/addUserOffsets.m Mon May 22 10:19:52 2017 +0200 +++ b/nonExposed/addUserOffsets.m Mon May 22 10:26:04 2017 +0200 @@ -21,7 +21,7 @@ if length(scoreEvent)==1 && strcmp('',scoreEvent{1}{1}) % add the same offset to all the classes userOffset=[repmat(scoreEvent{1}{3},length(template),1) repmat(scoreEvent{1}{4},length(template),1) repmat(scoreEvent{1}{5},length(template),1) repmat(scoreEvent{1}{6},length(template),1)]; - warning('score.event if of length 1: classId will set to the class labels of the scene to replicate') + fprintf(2, 'score.event if of length 1: classId will set to the class labels of the scene to replicate') else % add class wise offsets for jj=1:length(scoreEvent) scoreEventClass{jj}=scoreEvent{jj}{1}; end; for ii=1:length(template) diff -r 3c29a652e441 -r 8ce78cacb5cb nonExposed/check_options.m --- a/nonExposed/check_options.m Mon May 22 10:19:52 2017 +0200 +++ b/nonExposed/check_options.m Mon May 22 10:26:04 2017 +0200 @@ -41,14 +41,10 @@ if strcmp(timeMode,'generate') && strcmp(timeMode,'generate') error('Score does not have a sceneDuration field') else - warning('score.sceneduration does not exist; sceneDuration will be set to the duration of the scene to replicate') + fprintf(2, 'score.sceneduration does not exist; sceneDuration will be set to the duration of the scene to replicate') end end -% if ~isfield(score,'backgrounds') -% warning('score does not have a backgrounds field; Noise background are going to be generated') -% end - if strcmp(timeMode,'generate') || strcmp(timeMode,'generate') if ~isfield(score,'events') error('score.event does not exist; score.event is needed if one of the modes is set to generate') @@ -57,7 +53,7 @@ if ~strcmp(timeMode,'generate') || ~strcmp(timeMode,'generate') if isfield(score,'events') - warning('score.event exist; score.events cells values will be used as offsets') + fprintf(2, 'score.event exist; score.events cells values will be used as offsets') end end diff -r 3c29a652e441 -r 8ce78cacb5cb nonExposed/getEvent.m --- a/nonExposed/getEvent.m Mon May 22 10:19:52 2017 +0200 +++ b/nonExposed/getEvent.m Mon May 22 10:26:04 2017 +0200 @@ -48,12 +48,12 @@ if (settings.start_time > score.sceneDuration) settings.start_time = score.sceneDuration; - warning(['Sart time of event class ' score.events{ii}{1} ' is superior to the scene Duration; start time has been set to the scene duration.']) + fprintf(2, ['Sart time of event class ' score.events{ii}{1} ' is superior to the scene Duration; start time has been set to the scene duration.']) end if (settings.end_time > score.sceneDuration) settings.end_time = score.sceneDuration; - warning(['End time of event class ' score.events{ii}{1} ' is superior to the scene Duration; end time has been set to the scene duration.']) + fprintf(2, ['End time of event class ' score.events{ii}{1} ' is superior to the scene Duration; end time has been set to the scene duration.']) end diff -r 3c29a652e441 -r 8ce78cacb5cb nonExposed/utils/process_options.m --- a/nonExposed/utils/process_options.m Mon May 22 10:19:52 2017 +0200 +++ b/nonExposed/utils/process_options.m Mon May 22 10:26:04 2017 +0200 @@ -123,7 +123,7 @@ end if (~found) if (warn) - warning(sprintf('Option ''%s'' not used.', args{i})); + fprintf(2, sprintf('Option ''%s'' not used.', args{i})); args{i} else nunused = nunused + 1; diff -r 3c29a652e441 -r 8ce78cacb5cb simScene.m --- a/simScene.m Mon May 22 10:19:52 2017 +0200 +++ b/simScene.m Mon May 22 10:26:04 2017 +0200 @@ -174,7 +174,7 @@ if isfield(score,'events') score.events=addUserOffsets(template.class,score.events,timeMode,ebrMode); else - warning('score.event is empty: score.event will be created from the scene to replicate'); + fprintf(2, 'score.event is empty: score.event will be created from the scene to replicate'); score.events=template.class; end if ~isfield(score,'sceneDuration')