Thank you for your response and the information, I will see what I can learn from the source code. As for my script, please excuse the mess as it was still a work-in-progress. I have pasted the relevant bits down below. Essentially, I looked at the existing PHD script included with
VTS_MATLAB_v4.10.0Beta and replaced the fluence calculation. In other words, instead of the default "fluence=fs.FluenceOfRhoAndZ(...)" I use "fluence=MC_fluence(...)". Within "MC_fluence(...)" I am utilizing "VtsMonteCarlo.RunSimulations(...)". However, as you mentioned, this function is only using a scaled simulation? In that case, perhaps I need to perform the simulation using MCCL and then use that fluence to calculate the PHD?
%% Options
sd=20; %source-detector separation
mua=0.01; %absorption
musp=1.6; %reduced scattering
res=100; %bins
Nphot=100000; %number of photons
g=0.8;
n=1.4;
thick=20;
%% Initialization
% Setting up
op = [mua musp g n];
rhos = linspace(0,sd,res); %detectors
zs = linspace(0,thick,res); %z range
nop = size(op,1);
op_net = NET.createArray('Vts.OpticalProperties', nop);
for i=1:nop
op_net(i) = Vts.OpticalProperties;
op_net(i).Mua = op(i,1);
op_net(i).Musp = op(i,2);
op_net(i).G = op(i,3);
op_net(i).N = op(i,4);
end;
fs = Vts.Modeling.ForwardSolvers.PointSourceSDAForwardSolver();
fluence=MC_fluence(mua,musp,g,n,sd,thick,res,Nphot); %run Monte Carlo
%% Calculating photon hitting density (phd)
phd = Vts.Factories.ComputationFactory.GetPHD(fs, NET.convertArray(fluence,'System.Double'),...
sd, op_net, NET.convertArray(rhos,'System.Double'), NET.convertArray(zs,'System.Double'));
final = reshape(double(NET.invokeGenericMethod('System.Linq.Enumerable','ToArray',{'System.Double'},phd)),[length(zs) length(rhos) nop]);
Thank you again for all of your helpful advice.
Kind regards,
Jesse