Commit bb455eb4 authored by Lukas Aspöck's avatar Lukas Aspöck
Browse files

Updated gather result routine, now including a result reporting counting the...

Updated gather result routine, now including a result reporting counting the number of output files. Also added a new routine to check for results when new file path convention is used (only applicable to new, unreleased versions of RavenConsole)
parent cad6c178
...@@ -65,6 +65,7 @@ classdef itaRavenProject < handle ...@@ -65,6 +65,7 @@ classdef itaRavenProject < handle
ravenExe ravenExe
ravenLogFile = 'RavenLog.txt' ravenLogFile = 'RavenLog.txt'
ravenProjectFile ravenProjectFile
rpfFolder
ravenIniFile ravenIniFile
projectName projectName
...@@ -361,6 +362,8 @@ classdef itaRavenProject < handle ...@@ -361,6 +362,8 @@ classdef itaRavenProject < handle
obj.rpf_ini = IniConfig(); obj.rpf_ini = IniConfig();
obj.rpf_ini.ReadFile(filename); obj.rpf_ini.ReadFile(filename);
obj.rpfFolder = fileparts(filename);
% [Global] % % [Global] %
obj.projectName = obj.rpf_ini.GetValues('Global', 'ProjectName', 'Matlab'); obj.projectName = obj.rpf_ini.GetValues('Global', 'ProjectName', 'Matlab');
obj.projectTag = obj.projectName; obj.projectTag = obj.projectName;
...@@ -470,14 +473,15 @@ classdef itaRavenProject < handle ...@@ -470,14 +473,15 @@ classdef itaRavenProject < handle
%% check input data files (HRTF, source directivity, room model) %% check input data files (HRTF, source directivity, room model)
% ToDo: also check if files are stored relative to rpf folder
% HRTF (also shows if DAFF file is v15 or v17) % HRTF (also shows if DAFF file is v15 or v17)
if (exist(obj.fileHRTF,'file') == 0) if (exist(obj.fileHRTF,'file') == 0)
warning('HRTF file not found at the specified location.'); warning('HRTF file not found at the specified location.');
else else
if (contains(obj.fileHRTF,'.v17.daff')) if (contains(obj.fileHRTF,'.v17.daff') || contains(obj.fileHRTF,'.v17.ir.daff'))
disp('itaRavenProject: Loaded DAFFv17 HRTF file'); disp('itaRavenProject: Loaded DAFFv17 HRTF file');
end end
if (contains(obj.fileHRTF,'.v15.daff')) if (contains(obj.fileHRTF,'.v15.daff') || contains(obj.fileHRTF,'.v15.ir.daff'))
disp('itaRavenProject: Loaded DAFFv15 HRTF file'); disp('itaRavenProject: Loaded DAFFv15 HRTF file');
end end
end end
...@@ -487,10 +491,10 @@ classdef itaRavenProject < handle ...@@ -487,10 +491,10 @@ classdef itaRavenProject < handle
if (exist([ obj.pathDirectivities '\' obj.sourceDirectivity{1}],'file') == 0) if (exist([ obj.pathDirectivities '\' obj.sourceDirectivity{1}],'file') == 0)
warning('Source directivity file not found at the specified location.'); warning('Source directivity file not found at the specified location.');
else else
if (contains(obj.sourceDirectivity{1},'.v17.daff')) if (contains(obj.sourceDirectivity{1},'.v17.daff') || contains(obj.sourceDirectivity{1},'.v17.ms.daff'))
disp('itaRavenProject: Loaded DAFFv17 source directivity file'); disp('itaRavenProject: Loaded DAFFv17 source directivity file');
end end
if (contains(obj.sourceDirectivity{1},'.v15.daff')) if (contains(obj.sourceDirectivity{1},'.v15.daff') || contains(obj.sourceDirectivity{1},'.v15.ms.daff'))
disp('itaRavenProject: Loaded DAFFv15 source directivity file'); disp('itaRavenProject: Loaded DAFFv15 source directivity file');
end end
end end
...@@ -568,6 +572,14 @@ classdef itaRavenProject < handle ...@@ -568,6 +572,14 @@ classdef itaRavenProject < handle
[ numIRs, numOutputOther ] = obj.gatherResults(); [ numIRs, numOutputOther ] = obj.gatherResults();
disp([ '[R] Done. Result report: ' num2str(numIRs) ' room impulse response files and ' num2str(numOutputOther) ' other output files were found.']); disp([ '[R] Done. Result report: ' num2str(numIRs) ' room impulse response files and ' num2str(numOutputOther) ' other output files were found.']);
% check if results are given in new rpf file path convention (relative paths to rpf file, not to RAVEN binaries!)
% only if no files at all were found
if (numIRs == 0 && numOutputOther==0)
disp('[R] No files were found, checking if new rpf file path convention was used...');
obj.gatherResultsFromSpecificFolder([ obj.rpfFolder '\' obj.pathResults ]);
end
obj.simulationDone = true; obj.simulationDone = true;
% delete results in raven folder structure -> they are copied now into this class % delete results in raven folder structure -> they are copied now into this class
...@@ -5605,7 +5617,12 @@ classdef itaRavenProject < handle ...@@ -5605,7 +5617,12 @@ classdef itaRavenProject < handle
% Only use this if you know what you are doing. % Only use this if you know what you are doing.
oldPath = obj.pathResults; oldPath = obj.pathResults;
obj.setOutputPath(path); obj.setOutputPath(path);
obj.gatherResults();
disp([ '[R] Trying to gather results from folder: ' path]);
[ numIRs, numOutputOther ] = obj.gatherResults();
disp([ '[R] Result report: ' num2str(numIRs) ' room impulse response files and ' num2str(numOutputOther) ' other output files were found.']);
obj.setOutputPath(oldPath); obj.setOutputPath(oldPath);
end end
...@@ -5874,6 +5891,9 @@ classdef itaRavenProject < handle ...@@ -5874,6 +5891,9 @@ classdef itaRavenProject < handle
obj.planeWaveList_IS = []; obj.planeWaveList_IS = [];
obj.planeWaveList_RT = []; obj.planeWaveList_RT = [];
end end
end end
%------------------------------------------------------------------ %------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment