--
You received this message because you are subscribed to the Google Groups "mmc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mmc-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mmc-users/232a2a48-a835-4ea4-9261-921f9d1b4c8fn%40googlegroups.com.
hi Angelo,
using spatially distributed sources (like disk, planar, pattern), either internal or outside of the meshed object requires an extra preprocessing step - mesh retessellation. the details on this approach is described in
https://opg.optica.org/boe/viewmedia.cfm?uri=boe-7-1-171&html=true
briefly, mmc requires the knowledge of the index of the tetrahedral element (cfg.e0) enclosing the photon's position at any given time. Imagine you have a internal disk source spanning across a few tetrahedral elements, the launch position of the photon is dynamically computed, if you set cfg.e0 using the srcpos position, but this element is incorrect if the launch position moves to a different element. This gets harder when the disk is outside of the mesh (i.e. widefield), because there is no element enclosing the launch position.
in the case of a widefield source, you must call mmcaddsrc() and expand the mesh to include the entire launch aperture of the source, and properly label the element (label=-1) that enclose the source. see examples
https://github.com/fangq/mmc/blob/master/mmclab/example/demo_sfdi_2layer.m
is your disk source outside of the original mesh? or inside?
Qianqian
To view this discussion visit https://groups.google.com/d/msgid/mmc-users/CAJNg7oyCtdEu_s6OZsatE6SLEkF4f51nn0uNy%3DonHOa2kAxj-w%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/mmc-users/eb2c0a9c-9a39-43f0-8b72-b1ef55529fd3%40neu.edu.
hi Angelo,
you were correct. immc currently failed to track the partial-path lengths when photons enter the ROI (node/edge/face). instead, the label of the element that carries the ROI is used.
I just created a new issue on github
https://github.com/fangq/mmc/issues/116
and was able to fix it using the below patch
https://github.com/fangq/mmc/commit/7be94c0f48ba382b2fbbc3a7219ac4ac0db810ef
please redownload the automatically built github-action packages from
https://mcx.space/nightly/github/
I also found that you set cfg.steps to 0.001 mm spacing - making the output grid 1001^3 voxels. On my laptop with 16GB memory, this caused a crash because the memory needs for this output exceeds my memory (8GB per output, 2x to copy to matlab). I suggest you use a bigger steps size, say 0.01. having exceedingly refined output volume while photon number is small won't actually gain better accuracy.
Qianqian
To view this discussion visit https://groups.google.com/d/msgid/mmc-users/CAJNg7ozx2xcb7rin_tej6Rhk%2BKetL4zRAi1LucjXuEAj2NDQkQ%40mail.gmail.com.