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

added result report in order to indicate whether simulation output results (IRs) were found

parent 016c33fe
......@@ -565,8 +565,8 @@ classdef itaRavenProject < handle
% gather results
disp('[R] Simulation seems to be finished. Getting results...');
obj.gatherResults();
disp('[R] Done.');
[ numIRs, numOutputOther ] = obj.gatherResults();
disp([ '[R] Done. Result report: ' num2str(numIRs) ' room impulse response files and ' num2str(numOutputOther) ' other output files were found.']);
obj.simulationDone = true;
......@@ -5723,8 +5723,10 @@ classdef itaRavenProject < handle
%---------------------- PRIVATE METHODS ------------------------------%
methods (Access = 'private')
%------------------------------------------------------------------
function gatherResults(obj)
function [numFilesIR,numFilesOther] = gatherResults(obj)
numFilesIR=0; % count number of IRs
numFilesOther=0; % count number of other output data (histograms, plane wave lists, wall hit logs)
if obj.logPerformance
obj.initPerformanceData;
end
......@@ -5738,6 +5740,8 @@ classdef itaRavenProject < handle
obj.monoIR = obj.loadWaveFile(ir_files);
obj.monoIR_IS = obj.loadWaveFile(ir_files_IS);
obj.monoIR_RT = obj.loadWaveFile(ir_files_RT);
numFilesIR = numFilesIR + numel(ir_files) + numel(ir_files_IS) + numel(ir_files_RT);
else
obj.monoIR = [];
obj.monoIR_IS = [];
......@@ -5752,6 +5756,8 @@ classdef itaRavenProject < handle
obj.binauralIR = obj.loadWaveFile(ir_files);
obj.binauralIR_IS = obj.loadWaveFile(ir_files_IS);
obj.binauralIR_RT = obj.loadWaveFile(ir_files_RT);
numFilesIR = numFilesIR + numel(ir_files) + numel(ir_files_IS) + numel(ir_files_RT);
else
obj.binauralIR = [];
obj.binauralIR_IS = [];
......@@ -5762,6 +5768,8 @@ classdef itaRavenProject < handle
% read the wave files back from disk
obj.ambisonicsIR_IS = obj.loadWaveFile(ir_files_IS);
numFilesIR = numFilesIR + numel(ir_files_IS);
% check for combined results with ray tracing
if obj.generateRTHOA
......@@ -5769,6 +5777,9 @@ classdef itaRavenProject < handle
% read the wave files back from disk
obj.ambisonicsIR = obj.loadWaveFile(ir_files_combined);
numFilesIR = numFilesIR + numel(ir_files_combined);
else
obj.ambisonicsIR = [];
end
......@@ -5780,6 +5791,8 @@ classdef itaRavenProject < handle
% read the wave files back from disk
obj.ambisonicsIR_RT = obj.loadWaveFile(ir_files_RT);
numFilesIR = numFilesIR + numel(ir_files_RT);
else
obj.ambisonicsIR_RT = [];
end
......@@ -5789,13 +5802,17 @@ classdef itaRavenProject < handle
% read the wave files back from disk
obj.vbapIR_IS = obj.loadWaveFile(ir_files_IS);
numFilesIR = numFilesIR + numel(ir_files_IS);
% check for combined results with ray tracing
if obj.generateRTVBAP
ir_files_combined = obj.scan_output_folder(fullfile(obj.pathResults, obj.projectTag), {'\VBAP_Combined', 'PrimarySource', 'Receiver'}, '.wav');
% read the wave files back from disk
obj.vbapIR = obj.loadWaveFile(ir_files_combined);
numFilesIR = numFilesIR + numel(ir_files_combined);
else
obj.vbapIR = [];
end
......@@ -5807,6 +5824,8 @@ classdef itaRavenProject < handle
% read the wave files back from disk
obj.vbapIR_RT = obj.loadWaveFile(ir_files_RT);
numFilesIR = numFilesIR + numel(ir_files_RT);
else
obj.vbapIR_RT = [];
end
......@@ -5818,6 +5837,8 @@ classdef itaRavenProject < handle
% read the histogram files back from disk
obj.histogram = obj.readHistogram(histo_files);
obj.histogramRT = obj.readHistogram(raytracing_histo_files);
numFilesOther = numFilesOther + numel(histo_files) + numel(raytracing_histo_files);
else
obj.histogram = [];
obj.histogramRT = [];
......@@ -5830,6 +5851,9 @@ classdef itaRavenProject < handle
% read the wall hit logs back from disk
obj.wallHitLog_IS = obj.readWallHitLog_IS(wall_files_IS);
[obj.wallHitLog_RT, obj.initialParticleEnergy] = obj.readWallHitLog_RT(wall_files_RT);
numFilesOther = numFilesOther + numel(histo_files) + numel(raytracing_histo_files);
else
obj.wallHitLog_IS = [];
obj.wallHitLog_RT = [];
......@@ -5843,6 +5867,9 @@ classdef itaRavenProject < handle
% read the plane wave lists back from disk
obj.planeWaveList_IS = obj.readPlaneWaveList(planewave_files_IS);
obj.planeWaveList_RT = obj.readPlaneWaveList(planewave_files_RT);
numFilesOther = numFilesOther + numel(planewave_files_IS) + numel(planewave_files_RT);
else
obj.planeWaveList_IS = [];
obj.planeWaveList_RT = [];
......
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