Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
cad6c178
Commit
cad6c178
authored
Oct 04, 2021
by
Lukas Aspöck
Browse files
added result report in order to indicate whether simulation output results (IRs) were found
parent
016c33fe
Changes
1
Show whitespace changes
Inline
Side-by-side
applications/SoundFieldSimulation/Raven/itaRavenProject.m
View file @
cad6c178
...
@@ -565,8 +565,8 @@ classdef itaRavenProject < handle
...
@@ -565,8 +565,8 @@ classdef itaRavenProject < handle
% gather results
% gather results
disp('[R] Simulation seems to be finished. Getting results...');
disp('[R] Simulation seems to be finished. Getting results...');
obj.gatherResults();
[ numIRs, numOutputOther ] =
obj.gatherResults();
disp('[R] Done.
'
);
disp(
[
'[R] Done.
Result report: ' num2str(numIRs) ' room impulse response files and ' num2str(numOutputOther) ' other output files were found.']
);
obj.simulationDone = true;
obj.simulationDone = true;
...
@@ -5723,8 +5723,10 @@ classdef itaRavenProject < handle
...
@@ -5723,8 +5723,10 @@ classdef itaRavenProject < handle
%---------------------- PRIVATE METHODS ------------------------------%
%---------------------- PRIVATE METHODS ------------------------------%
methods (Access = 'private')
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
if obj.logPerformance
obj.initPerformanceData;
obj.initPerformanceData;
end
end
...
@@ -5738,6 +5740,8 @@ classdef itaRavenProject < handle
...
@@ -5738,6 +5740,8 @@ classdef itaRavenProject < handle
obj.monoIR = obj.loadWaveFile(ir_files);
obj.monoIR = obj.loadWaveFile(ir_files);
obj.monoIR_IS = obj.loadWaveFile(ir_files_IS);
obj.monoIR_IS = obj.loadWaveFile(ir_files_IS);
obj.monoIR_RT = obj.loadWaveFile(ir_files_RT);
obj.monoIR_RT = obj.loadWaveFile(ir_files_RT);
numFilesIR = numFilesIR + numel(ir_files) + numel(ir_files_IS) + numel(ir_files_RT);
else
else
obj.monoIR = [];
obj.monoIR = [];
obj.monoIR_IS = [];
obj.monoIR_IS = [];
...
@@ -5752,6 +5756,8 @@ classdef itaRavenProject < handle
...
@@ -5752,6 +5756,8 @@ classdef itaRavenProject < handle
obj.binauralIR = obj.loadWaveFile(ir_files);
obj.binauralIR = obj.loadWaveFile(ir_files);
obj.binauralIR_IS = obj.loadWaveFile(ir_files_IS);
obj.binauralIR_IS = obj.loadWaveFile(ir_files_IS);
obj.binauralIR_RT = obj.loadWaveFile(ir_files_RT);
obj.binauralIR_RT = obj.loadWaveFile(ir_files_RT);
numFilesIR = numFilesIR + numel(ir_files) + numel(ir_files_IS) + numel(ir_files_RT);
else
else
obj.binauralIR = [];
obj.binauralIR = [];
obj.binauralIR_IS = [];
obj.binauralIR_IS = [];
...
@@ -5763,12 +5769,17 @@ classdef itaRavenProject < handle
...
@@ -5763,12 +5769,17 @@ classdef itaRavenProject < handle
% read the wave files back from disk
% read the wave files back from disk
obj.ambisonicsIR_IS = obj.loadWaveFile(ir_files_IS);
obj.ambisonicsIR_IS = obj.loadWaveFile(ir_files_IS);
numFilesIR = numFilesIR + numel(ir_files_IS);
% check for combined results with ray tracing
% check for combined results with ray tracing
if obj.generateRTHOA
if obj.generateRTHOA
ir_files_combined = obj.scan_output_folder(fullfile(obj.pathResults, obj.projectTag), {'\HOA_Combined', 'PrimarySource', 'Receiver'}, '.wav');
ir_files_combined = obj.scan_output_folder(fullfile(obj.pathResults, obj.projectTag), {'\HOA_Combined', 'PrimarySource', 'Receiver'}, '.wav');
% read the wave files back from disk
% read the wave files back from disk
obj.ambisonicsIR = obj.loadWaveFile(ir_files_combined);
obj.ambisonicsIR = obj.loadWaveFile(ir_files_combined);
numFilesIR = numFilesIR + numel(ir_files_combined);
else
else
obj.ambisonicsIR = [];
obj.ambisonicsIR = [];
end
end
...
@@ -5780,6 +5791,8 @@ classdef itaRavenProject < handle
...
@@ -5780,6 +5791,8 @@ classdef itaRavenProject < handle
% read the wave files back from disk
% read the wave files back from disk
obj.ambisonicsIR_RT = obj.loadWaveFile(ir_files_RT);
obj.ambisonicsIR_RT = obj.loadWaveFile(ir_files_RT);
numFilesIR = numFilesIR + numel(ir_files_RT);
else
else
obj.ambisonicsIR_RT = [];
obj.ambisonicsIR_RT = [];
end
end
...
@@ -5790,12 +5803,16 @@ classdef itaRavenProject < handle
...
@@ -5790,12 +5803,16 @@ classdef itaRavenProject < handle
% read the wave files back from disk
% read the wave files back from disk
obj.vbapIR_IS = obj.loadWaveFile(ir_files_IS);
obj.vbapIR_IS = obj.loadWaveFile(ir_files_IS);
numFilesIR = numFilesIR + numel(ir_files_IS);
% check for combined results with ray tracing
% check for combined results with ray tracing
if obj.generateRTVBAP
if obj.generateRTVBAP
ir_files_combined = obj.scan_output_folder(fullfile(obj.pathResults, obj.projectTag), {'\VBAP_Combined', 'PrimarySource', 'Receiver'}, '.wav');
ir_files_combined = obj.scan_output_folder(fullfile(obj.pathResults, obj.projectTag), {'\VBAP_Combined', 'PrimarySource', 'Receiver'}, '.wav');
% read the wave files back from disk
% read the wave files back from disk
obj.vbapIR = obj.loadWaveFile(ir_files_combined);
obj.vbapIR = obj.loadWaveFile(ir_files_combined);
numFilesIR = numFilesIR + numel(ir_files_combined);
else
else
obj.vbapIR = [];
obj.vbapIR = [];
end
end
...
@@ -5807,6 +5824,8 @@ classdef itaRavenProject < handle
...
@@ -5807,6 +5824,8 @@ classdef itaRavenProject < handle
% read the wave files back from disk
% read the wave files back from disk
obj.vbapIR_RT = obj.loadWaveFile(ir_files_RT);
obj.vbapIR_RT = obj.loadWaveFile(ir_files_RT);
numFilesIR = numFilesIR + numel(ir_files_RT);
else
else
obj.vbapIR_RT = [];
obj.vbapIR_RT = [];
end
end
...
@@ -5818,6 +5837,8 @@ classdef itaRavenProject < handle
...
@@ -5818,6 +5837,8 @@ classdef itaRavenProject < handle
% read the histogram files back from disk
% read the histogram files back from disk
obj.histogram = obj.readHistogram(histo_files);
obj.histogram = obj.readHistogram(histo_files);
obj.histogramRT = obj.readHistogram(raytracing_histo_files);
obj.histogramRT = obj.readHistogram(raytracing_histo_files);
numFilesOther = numFilesOther + numel(histo_files) + numel(raytracing_histo_files);
else
else
obj.histogram = [];
obj.histogram = [];
obj.histogramRT = [];
obj.histogramRT = [];
...
@@ -5830,6 +5851,9 @@ classdef itaRavenProject < handle
...
@@ -5830,6 +5851,9 @@ classdef itaRavenProject < handle
% read the wall hit logs back from disk
% read the wall hit logs back from disk
obj.wallHitLog_IS = obj.readWallHitLog_IS(wall_files_IS);
obj.wallHitLog_IS = obj.readWallHitLog_IS(wall_files_IS);
[obj.wallHitLog_RT, obj.initialParticleEnergy] = obj.readWallHitLog_RT(wall_files_RT);
[obj.wallHitLog_RT, obj.initialParticleEnergy] = obj.readWallHitLog_RT(wall_files_RT);
numFilesOther = numFilesOther + numel(histo_files) + numel(raytracing_histo_files);
else
else
obj.wallHitLog_IS = [];
obj.wallHitLog_IS = [];
obj.wallHitLog_RT = [];
obj.wallHitLog_RT = [];
...
@@ -5843,6 +5867,9 @@ classdef itaRavenProject < handle
...
@@ -5843,6 +5867,9 @@ classdef itaRavenProject < handle
% read the plane wave lists back from disk
% read the plane wave lists back from disk
obj.planeWaveList_IS = obj.readPlaneWaveList(planewave_files_IS);
obj.planeWaveList_IS = obj.readPlaneWaveList(planewave_files_IS);
obj.planeWaveList_RT = obj.readPlaneWaveList(planewave_files_RT);
obj.planeWaveList_RT = obj.readPlaneWaveList(planewave_files_RT);
numFilesOther = numFilesOther + numel(planewave_files_IS) + numel(planewave_files_RT);
else
else
obj.planeWaveList_IS = [];
obj.planeWaveList_IS = [];
obj.planeWaveList_RT = [];
obj.planeWaveList_RT = [];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment