MCXlab returning 0s after first time point?

129 views
Skip to first unread message

Jesse Fine

unread,
Jan 29, 2019, 10:31:44 AM1/29/19
to mcx-users
Hi,

I'm trying to run the attached script and it seems to work properly for the first time point, but results in all 0s for any subsequent time point. Any guidance in correcting or understanding this is much appreciated. I run into this issue whenever I construct a model with multiple layers and an additional internal geometry.
Thank you! 


demo_sphere_cube_subpixel_troubleshoot2_lowres.m

Qianqian Fang

unread,
Jan 29, 2019, 10:45:16 AM1/29/19
to mcx-...@googlegroups.com, Jesse Fine
On 1/29/19 10:31 AM, Jesse Fine wrote:
Hi,

I'm trying to run the attached script and it seems to work properly for the first time point, but results in all 0s for any subsequent time point. Any guidance in correcting or understanding this is much appreciated. I run into this issue whenever I construct a model with multiple layers and an additional internal geometry.

hi Jesse

the mua/mus values in cfg.prop looks very big, I think you must have scaled them by 1/cfg.unitinmm. if yes, this should be undone.

the mua/mus in cfg.prop should always be given in the unit of 1/mm, independent of your cfg.unitinmm settings. mcx does the scaling internally. if you pre-scaled these values, it will be done twice and give you incorrect results.

Qianqian


Thank you! 


--
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 post to this group, send email to mcx-...@googlegroups.com.
Visit this group at https://groups.google.com/group/mcx-users.
For more options, visit https://groups.google.com/d/optout.


Jesse Fine

unread,
Jan 29, 2019, 2:19:54 PM1/29/19
to mcx-users
Thank you! I can't believe I made that mistake. I have another quick question- is there a way to keep the excitation source on for all time steps?

Thanks again
Jesse 

Qianqian Fang

unread,
Jan 29, 2019, 3:28:47 PM1/29/19
to mcx-...@googlegroups.com, Jesse Fine
On 1/29/19 2:19 PM, Jesse Fine wrote:
Thank you! I can't believe I made that mistake. I have another quick question- is there a way to keep the excitation source on for all time steps?


for that, what you need is a convolution as a post-processing to the TPSF of the fluence from mcx/mmc.

mcx/mmc only solves for the IRF (impulse response function) assuming the source is a delta at t=0. An arbitrary waveform of the source should be convolved to the TPSF to get the final solution.

Qianqian

Reply all
Reply to author
Forward
0 new messages