Skip to content

Commit

Permalink
Added SlantedRecessedFiber detector to loadMCResults.m and load_resul…
Browse files Browse the repository at this point in the history
…ts_script.m
  • Loading branch information
hayakawa16 committed Feb 13, 2024
1 parent 21f0ef9 commit 4c0fcfc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
7 changes: 7 additions & 0 deletions matlab/post_processing/loadMCResults.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
SurfaceFiber.SecondMoment = SurfaceFiber_txt.SecondMoment;
SurfaceFiber.Stdev = sqrt((SurfaceFiber.SecondMoment - (SurfaceFiber.Mean .* SurfaceFiber.Mean)) / (json.N));
results{di}.SurfaceFiber = SurfaceFiber;
case 'SlantedRecessedFiber'
SlantedRecessedFiber.Name = detector.Name;
SlantedRecessedFiber_txt = readAndParseJson([datadir slash detector.Name '.txt']);
SlantedRecessedFiber.Mean = SlantedRecessedFiber_txt.Mean;
SlantedRecessedFiber.SecondMoment = SlantedRecessedFiber_txt.SecondMoment;
SlantedRecessedFiber.Stdev = sqrt((SlantedRecessedFiber.SecondMoment - (SlantedRecessedFiber.Mean .* SlantedRecessedFiber.Mean)) / (json.N));
results{di}.SlantedRecessedFiber = SlantedRecessedFiber;
case 'RDiffuse'
RDiffuse.Name = detector.Name;
RDiffuse_txt = readAndParseJson([datadir slash detector.Name '.txt']);
Expand Down
13 changes: 11 additions & 2 deletions matlab/post_processing/load_results_script.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
addpath([pwd slash 'jsonlab']);

% names of individual MC simulations
datanames = { 'one_layer_all_detectors' };
datanames = { 'no_curvature_1310_Flat_7Layer_10M' };
% datanames = { 'results_mua0.1musp1.0' 'results_mua0.1musp1.1' }; %...etc

% outdir = 'C:\Projects\vts\src\Vts.MonteCarlo.CommandLineApplication\bin\Release';
outdir = '.';

show.SurfaceFiber = 1;
show.SlantedRecessedFiber = 1;
show.RDiffuse = 1;
show.ROfRho = 1;
show.ROfRhoRecessed = 1;
Expand Down Expand Up @@ -94,7 +95,15 @@
num2str(results{di}.SurfaceFiber.Mean - 3 * results{di}.SurfaceFiber.Stdev) ' - ' ...
num2str(results{di}.SurfaceFiber.Mean + 3 * results{di}.SurfaceFiber.Stdev)]);
end


if isfield(results{di}, 'SlantedRecessedFiber') && show.SlantedRecessedFiber
disp(['Total reflectance captured by SlantedRecessedFiber detector: ' num2str(results{di}.SlantedRecessedFiber.Mean)]);
disp(['Standard Deviation captured by SlantedRecessedFiber detector: ' num2str(results{di}.SlantedRecessedFiber.Stdev)]);
disp(['+/- 3sigma by SlantedRecessedFiber detector: ' ...
num2str(results{di}.SlantedRecessedFiber.Mean - 3 * results{di}.SlantedRecessedFiber.Stdev) ' - ' ...
num2str(results{di}.SlantedRecessedFiber.Mean + 3 * results{di}.SlantedRecessedFiber.Stdev)]);
end

if isfield(results{di}, 'RDiffuse') && show.RDiffuse
disp(['Total reflectance captured by RDiffuse detector: ' num2str(results{di}.RDiffuse.Mean)]);
end
Expand Down

0 comments on commit 4c0fcfc

Please sign in to comment.