fangq / mmc

Mesh-based Monte Carlo (MMC)
Other
39 stars 32 forks source link

Leaky photons in immc vessel example #76

Open lewisfish opened 2 years ago

lewisfish commented 2 years ago

Hi, On runnning demo_immc_vessel.m I get the following output which does not match the figure in the accompanying paper (fig 7 d. in Light transport modeling in highly complex tissues using the implicit mesh-based Monte Carlo algorithm). demo_immc_vessels_fig

There are appears to be some "photon leakage" from the vessels as evidenced by the "shadow" lines emminating from the vessels. Is this a bug in immc or just the demo script?

Best, Lewis

fangq commented 2 years ago

@lewisfish, thanks for reporting this - I was able to reproduce the issue on my side. I went back to older versions and found that https://github.com/fangq/mmc/commit/a31a85bedb2cfef80700e6b761a0f6b5a448559e was the last commit that did not have leakage, and the leakage was introduced in the following commit - and of course we have seen this throughout the merge process.

immc_a31a85bedb2cfef80700e6b761a0f6b5a448559e

However, I do remember there was a reason we wanted the following commit because something else wasn't working entirely. The original immc code was developed in my student @yaoruoyang's fork: https://github.com/yuanyaos/mmc/ and all original publication results were made using the code in that fork (not sure which commit).

I will take a look and see if I can figure out what has caused this.