Simulate depth sensitivity

320 views
Skip to first unread message

Yueqi Guo

unread,
Nov 19, 2019, 11:14:27 AM11/19/19
to mcx-users
Hi Dr. Fang,

I'm wondering if there is an easy way to simulate the depth sensitivity for intrinsic imaging? i.e. delta Signal / delta mua? I read about the measurement in the review paper by Ying Ma et al. 2016, but the method wasn't very clear to me. 
I also read another method by Peifang Tian to measure depth sensitivity in a different way, by setting the absorbers to different layers, and simply calculate the contribution of that layer of absorber. Do you know which is a more reasonable measurement, or which one is easier to achieve with MCX?

Thank you so much!

-Yueqi

Qianqian Fang

unread,
Nov 19, 2019, 11:18:46 AM11/19/19
to mcx-...@googlegroups.com, Yueqi Guo

hi Yueqi

the depth sensitivity is basically the Jacobian (to mua/mus). you can compute it either based on the standard "adjoint method", or using our direct approach called "photon replay".

the formulas are provided in our paper published last year

https://www.osapublishing.org/boe/abstract.cfm?uri=boe-9-10-4588

and the sample codes can be found in

https://github.com/fangq/mcx/blob/master/mcxlab/examples/demo_mcxlab_replay.m

let me know if this is what you are looking for

Qianqian



Thank you so much!

-Yueqi
--
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/b4dd5fc7-5308-4958-b123-11391302ad58%40googlegroups.com.


Yueqi Guo

unread,
Nov 23, 2019, 4:20:53 PM11/23/19
to mcx-users
Hi Dr. Fang,

Thank you for answering! I have two more questions... 
1) I'm simulating 6 different wavelengths. When I run the "replay" and output Jacobian, do I have to re-run the standard simulation for each wavelength? Or can I just change the newcfg.prop for each "replay" run?
2) I tried to show that as the wavelength becomes longer (smaller mua), the signal should be more sensitive to deeper locations (as seen in Ying Ma et al., 2016). However, the result didn't show much difference. Meanwhile, the flux map did show very different patterns for each wavelength. (figures attached) Is there something I didn't understand correctly? 
Thank you so much!

On Tuesday, November 19, 2019 at 11:18:46 AM UTC-5, q.fang wrote:
On 11/19/19 11:14 AM, Yueqi Guo wrote:
Hi Dr. Fang,

I'm wondering if there is an easy way to simulate the depth sensitivity for intrinsic imaging? i.e. delta Signal / delta mua? I read about the measurement in the review paper by Ying Ma et al. 2016, but the method wasn't very clear to me. 
I also read another method by Peifang Tian to measure depth sensitivity in a different way, by setting the absorbers to different layers, and simply calculate the contribution of that layer of absorber. Do you know which is a more reasonable measurement, or which one is easier to achieve with MCX?


hi Yueqi

the depth sensitivity is basically the Jacobian (to mua/mus). you can compute it either based on the standard "adjoint method", or using our direct approach called "photon replay".

the formulas are provided in our paper published last year

https://www.osapublishing.org/boe/abstract.cfm?uri=boe-9-10-4588

and the sample codes can be found in

https://github.com/fangq/mcx/blob/master/mcxlab/examples/demo_mcxlab_replay.m

let me know if this is what you are looking for

Qianqian



Thank you so much!

-Yueqi
--
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-...@googlegroups.com.
image.png

Yueqi Guo

unread,
Nov 23, 2019, 4:59:47 PM11/23/19
to mcx-users
I'm sorry... I made some mistakes when converting 4D Jacobian output to 2D image for display... here should be the correct version.
Is it normal that the flux map looks very different, but the jacobian is not that different?
-Yueqi
Annotation 2019-11-23 165715.png

Qianqian Fang

unread,
Nov 23, 2019, 5:13:08 PM11/23/19
to mcx-...@googlegroups.com, Yueqi Guo
On 11/23/19 4:20 PM, Yueqi Guo wrote:
Hi Dr. Fang,

Thank you for answering! I have two more questions... 
1) I'm simulating 6 different wavelengths. When I run the "replay" and output Jacobian, do I have to re-run the standard simulation for each wavelength? Or can I just change the newcfg.prop for each "replay" run?


if you ignore the mus differences between wavelengths (for example, they are close to each other), then you don't need to rerun. otherwise, if mus is different in the replay, they will not not be detected again.

unless you have a lot of wavelengths to process and speed is a concern, I would just rerun them, mcx is pretty fast if you have a good hardware.


2) I tried to show that as the wavelength becomes longer (smaller mua), the signal should be more sensitive to deeper locations (as seen in Ying Ma et al., 2016). However, the result didn't show much difference. Meanwhile, the flux map did show very different patterns for each wavelength. (figures attached) Is there something I didn't understand correctly?


your jacobian produced by replay is pretty much overwhelmed by noise. in this case, I strongly suggest you to use the adjoint method - it is actually quite easy to do -

1. run a forward at the source, Phi_s(r)
2. run another forward solution by treating your detector as a source, get Phi_d(r)
3. use this formula, you can get your Jacobian:

Jmua=Vvox*Phi_s(r).*Phi_d(r)

where Vvox is the volume of your voxel. (see Eq. 9 in this old paper of mine: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2844097/)

this will give you a lot of SNR in the results.


Thank you so much!

On Tuesday, November 19, 2019 at 11:18:46 AM UTC-5, q.fang wrote:
On 11/19/19 11:14 AM, Yueqi Guo wrote:
Hi Dr. Fang,

I'm wondering if there is an easy way to simulate the depth sensitivity for intrinsic imaging? i.e. delta Signal / delta mua? I read about the measurement in the review paper by Ying Ma et al. 2016, but the method wasn't very clear to me. 
I also read another method by Peifang Tian to measure depth sensitivity in a different way, by setting the absorbers to different layers, and simply calculate the contribution of that layer of absorber. Do you know which is a more reasonable measurement, or which one is easier to achieve with MCX?


hi Yueqi

the depth sensitivity is basically the Jacobian (to mua/mus). you can compute it either based on the standard "adjoint method", or using our direct approach called "photon replay".

the formulas are provided in our paper published last year

https://www.osapublishing.org/boe/abstract.cfm?uri=boe-9-10-4588

and the sample codes can be found in

https://github.com/fangq/mcx/blob/master/mcxlab/examples/demo_mcxlab_replay.m

let me know if this is what you are looking for

Qianqian



Thank you so much!

-Yueqi
--
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-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/b4dd5fc7-5308-4958-b123-11391302ad58%40googlegroups.com.


--
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/90de8ba6-b052-437c-a7b9-92a924a65389%40googlegroups.com.

Yueqi Guo

unread,
Nov 23, 2019, 7:42:17 PM11/23/19
to mcx-users
Thank you for your prompt reply! I'll give it a try. 
Could you elaborate more on "Phi_s(r) and Phi_d(r)"? Is it a measurement of total photon weights? Should it be a matrix of the same size as the volume?
Also, my light source is a narrow cone entering the medium from the surface center, and the detector covers almost the entire surface. Will that still work? It seems if I switch detector and source the #detected photons will become really small... 

Qianqian Fang

unread,
Nov 24, 2019, 3:33:58 PM11/24/19
to mcx-...@googlegroups.com, Yueqi Guo
On 11/23/19 7:42 PM, Yueqi Guo wrote:
Thank you for your prompt reply! I'll give it a try. 
Could you elaborate more on "Phi_s(r) and Phi_d(r)"? Is it a measurement of total photon weights? Should it be a matrix of the same size as the volume?


volumetric fluence as a matrix, this gives you spatially resolved Jacobian, if you are interested in total sensitivity within a particular region, just add the Jacobian values in that region.

for example, if you want to get the total sensitivity to mua changes of layer#2, then add all voxels within the layer#2 in the volumetric Jacobian to get the total sensitivity

Also, my light source is a narrow cone entering the medium from the surface center, and the detector covers almost the entire surface. Will that still work? It seems if I switch detector and source the #detected photons will become really small...


then when you simulate your detector as if it was a source, you need to pick a source type that covers the entire surface. this is only for the adjoint method. it does not use detected photons at all.


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/d0bb7fb7-6029-4776-9d99-7704a11cb6d7%40googlegroups.com.


Yueqi Guo

unread,
Nov 25, 2019, 2:22:41 PM11/25/19
to mcx-users
Hi Dr. Fang,

Here I tried the adjoint Jacobian method. The two fluence matrices were obtained by summing across the 4th dimension of first output. The 1st simulation has a cone source in the middle, the 2nd simulation has a disk source covering the whole field, which was the detector in the 1st simulation., and I simply multiplied these two matrices to get 3. Jacobian. The final results indeed show a deeper "most sensitive depth" as the wavelength increase. Do these figures look correct to you? Please let me know I'm understanding anything wrong... 
Thanks again for providing so much helpful advice!

-Yueqi 
Annotation 2019-11-25 142213.png

Qianqian Fang

unread,
Dec 7, 2019, 12:55:38 AM12/7/19
to mcx-...@googlegroups.com, Yueqi Guo
On 11/25/19 2:22 PM, Yueqi Guo wrote:
Hi Dr. Fang,

Here I tried the adjoint Jacobian method. The two fluence matrices were obtained by summing across the 4th dimension of first output. The 1st simulation has a cone source in the middle, the 2nd simulation has a disk source covering the whole field, which was the detector in the 1st simulation., and I simply multiplied these two matrices to get 3. Jacobian. The final results indeed show a deeper "most sensitive depth" as the wavelength increase. Do these figures look correct to you? Please let me know I'm understanding anything wrong...


just keep in mind that sensitivity is only one side of the equation, and the other side to consider is SNR of the signal.

just an example - in fNIRS, the larger the src/detector separation, the better the sensitivity of your measurements to the brain (deeper layers), but that does not mean you should use the latest separation possible, because the signal will diminish and becomes noisy. so, you will have to balance the sensitivity with the SNR of your signal (or detector) given the source power.

hope this helps.

Qianqian


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/4c921efa-f9cd-459d-beae-8ea304591c59%40googlegroups.com.

Yueqi Guo

unread,
Dec 21, 2019, 10:43:34 PM12/21/19
to mcx-users
Hi Dr. Fang,

Thank you for your answers! Just a follow up question about the Jacobian obtained by the adjoint method... 
What is the unit of this direct output of "Jmua=Vvox*Phi_s(r).*Phi_d(r)"? As I understand, the fluence has units of 1/mm^2, and Vvox has a unit of mm^3, so Jmua would have a unit of 1/mm. How does it related to "sensitivity to mua"? In other words, how do I interpret the numbers in terms of delta(detected signal amplitude)/delta(mua)?
Thanks again! 

Qianqian Fang

unread,
Dec 22, 2019, 2:51:56 AM12/22/19
to mcx-...@googlegroups.com
Jmua is defined as delta(fluence)/delta(mua).

Fluence has a unit of 1/mm2 and mua has 1/mm, so Jmua gets a unit of 1/mm, which matches the adjoint formula.

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/0aa1b85f-b8dd-477a-a543-030588b1f1d2%40googlegroups.com.

Yueqi Guo

unread,
Dec 22, 2019, 4:44:15 PM12/22/19
to mcx-users
So in this "Jmus = delta(fluence)/delta(mua)", the fluence refers the fluence at the detector surface? If so, is there a relationship between the "detected total photon weights" and this fluence measurement? 
I'm just trying to make sense of the physical meanings... because I used total photon weights as a measurement of detected signal amplitude, whereas the change of signal amplitude is given by Jacobian, which has a different unit. It's not super clear to me how these measurements are directly comparable...
Thanks for your answers!

-Yueqi

Fang, Qianqian

unread,
Dec 25, 2019, 8:41:15 AM12/25/19
to mcx-...@googlegroups.com

Hi Yueqi

 

The replay Jacobian is d(total diffuse reflectance)/d(mua).

 

Please see our discussions in Section 2.2 of the Replay paper. We discussed the considerations to compare the adjoint vs replay jacobians.

 

Qianqian

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/84f19077-d21c-4203-84f6-4ef70bda6c5c%40googlegroups.com.

 

Reply all
Reply to author
Forward
0 new messages