Dear Dr. Fang
I hope find you well. I have a question regarding the normalization process in optical simulations. I would greatly appreciate it if you could provide some insights or explanations on the following points:
1. How is normalization performed in optical simulations in “mcxlab”? Could you please explain the process to achieve it?
mcx/mcxlab/pmcx handles normalization the same way - by default, the cfg.isnormalized flag is set to 1, so a normalization is performed, unless you setting it to 0 explicitly.
the goal of the "normalization" step is to cancel out the effect of number of simulated photons, voxel sizes and source type differences, so that on the same "physical domain", regardless of your simulation settings, you can get a repeatable, verifiable solution.
you can probably see there are many ways to do this, but our
target is set to match the solution against the "Green's function"
of the underlying PDE (RTE or diffusion). The Green's function is
a unique solution produced by setting the source term
(right-hand-side) of the PDE to a Diract-delta-function, which
when you integrate the entire source, it should have a total
integration value (or energy) of 1, i.e. a unitary source. please
read more about Green's function if you are not familar with it.
https://en.wikipedia.org/wiki/Green%27s_function
a simple example, when we solve the diffusion equation in an infinite homogeneous domain, you can write the Green's function as
Phi(r)=exp(-sqrt(3*mua*musp)*r)/(4*pi*D*r )
where D=1/(3*(mua+musp)) is the diffusion coefficient. This is
derived by setting the source term of the Diffusion equation to a
delta(r) function.
this is the solution mcx/mcxlab is trying to match,
voxel-by-voxel. After normalization. No matter how many photons
you simulation, what voxel size you choose, mcx's fluence output
(cfg.outputtype='fluence') will always match this analytical
solution, if it does exists, when solved in the same physical
domain. Of course, in complex domains, such analytical solution
does not exist, but mcx/mcxlab still perform the same
normalization formula, so that you can assume the fluence it
computes should match the distribution produced by a unitary
source in that complex domain.
the Green's function mcx's normalization formula trying to match
is not limited to static Green's function, but can have a
time-dependency. So, in general, we say mcx produces the TPSF -
time point spread function, which is just another name of a 4D
(x/y/z/t) Green's function. here is our analytical formula of a
semin-infinite domain for CW (static) and time-varying
(time-domain) Green's function, and we match these in our
publications
https://github.com/fangq/mcx/blob/master/utils/tddiffusion.m
https://github.com/fangq/mcx/blob/master/utils/cwdiffusion.m
2. In the case where data has already been normalized, so how to do the procedure for reverse normalization? How can one transform the normalized data back to its original scale?
the first output of mcxlab, flux, contains a subfield called
stat, which stores the normalization factor as
flux.stat.normalizer. You can simply divide this factor to undo
the normalization if it has been done, or simply setting
cfg,isnormalized to 0 and rerun the simulation.
https://github.com/fangq/mcx/blob/011943121de9114832ca3b99867f3d12963be9d0/src/mcxlab.cpp#L104
3. In “mcxlab” , “cfg.isnormalized =1” was been used, not the fluence are not ranged in [0 1]. Please you please clarify what’s the scales of the normalization. What’s the unit in the simulation? Is W/mm^2?
as I mentioned, mcx's normalization is not aimed to make the
max/min value to 1 (which is quite problematic) - instead, it
normalizes the total source energy to 1 to generate analytically
understandable Green's function.
the exact formula to compute mcx's normalization factor is dependent on the output type, you can see the full source code here
let me know if these make sense.
Qianqian
Thank you very much for your time and assistance. I look forward to your valuable input and the opportunity to learn from your expertise.
Best regards,
Kathy
--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/a6b3a6c9-5cc0-4c43-8fb6-b5377b1b86fan%40googlegroups.com.
Dear Dr. Fang,
Thank you for your prompt response. I have some further inquiries regarding the simulation capabilities of "mcxlab" on the following topics:
1. Multi-angle Source Simulation:
- How can I simulate multiple angles of light sources in "mcxlab"? Do I need to simulate each angle separately and then combine the results?
- How should I handle the normalization process when simulating multiple angles of light sources? Are there specific functions or settings in "mcxlab" for this?
2. Different Intensity Simulation:
- What is the recommended approach for simulating different light intensities in "mcxlab"? Are there direct simulation functions or parameter settings available?
I would appreciate any insights or guidance on these topics, especially regarding implementation details or specific functions/commands within the "mcxlab" framework.
Thank you for your time and assistance. I look forward to your valuable insights.
Best regards,
Kathy Young
Dear Dr. Fang,
Thank you for your prompt response. I have some further inquiries regarding the simulation capabilities of "mcxlab" on the following topics:
1. Multi-angle Source Simulation:
- How can I simulate multiple angles of light sources in "mcxlab"? Do I need to simulate each angle separately and then combine the results?
yes, this is the recommended way, given the current code.
- How should I handle the normalization process when simulating multiple angles of light sources? Are there specific functions or settings in "mcxlab" for this?
mcx volumetric solution (fluence/flux/energy) is linearly proportional to the source intensity, you can use mcx to simulate multiple angular components with normalization on - and then multiply different angles with their corresponding relative intensity and sum the solutions together. this is equivalent to simulating angularly modulated source, which mcx currently does not support (planned, but not implemented: https://github.com/fangq/mcx/issues/129)
there is no particular mcxlab function do this. you just call
mcxlab for each angular component, and do the weighted sum outside
of mcxlab.
2. Different Intensity Simulation:
- What is the recommended approach for simulating different light intensities in "mcxlab"? Are there direct simulation functions or parameter settings available?
again, mcx solution is linear to the source intensity - once you
simulate a source of unitary intensity by default, you can
multiply it by a scalar to simulate any other intensity levels.
the above linear summation of multiple simulation approach works
fine for multiple discrete sources, it, however, will be tedious
and less efficient if you have many components.
Qianqian
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/1944c579-bf8e-4d8d-811b-8d9e7686013cn%40googlegroups.com.
that's also why many of these physical models can be discretized
as a matrix/linear equation and solve numerically (such as in
finite element, finite difference, method of moment etc). "Coupled
ODEs" and PDEs are tricky and may produces nonlinearity.
if you really want to read about this, you can search the relevant keywords and find some online lectures on math methods/pde or functional analyses
Qianqian
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/f753de1d-ad7d-493f-8f5d-3118e3c62aabn%40googlegroups.com.
Thanks very much for your patience with my questions. Your suggestions are very helpful for me to understand this mathematical mechanism. I will search for materials following your comments. Thanks a lot.