-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect exit position of detected photons #77
Comments
@devhello145, I am not sure I understood what was the problem. The detector sphere covers the entire surface of the domain, so, all photons are detected and are located on the mesh surface. This to me is expected. |
As I understand, photons are detected after leaving a mesh. In this example, all detected photons should be located on the surface of sphere (or r=sqrt(x^2+y^2+z^2) =1). Min detp.p (radius): 0.000000 <-- See HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Max detp.p (radius): 0.999994
Min detp.ppath: 0.994178
Max detp.ppath: 1.000085 Gpu (opencl) version of code (gpuid=1) doesnot have this problem (all photons have r=1). |
Can you say when you plan to fix this bug? |
I have already been working on it. all invalid positions are [0,0,0] (while ppath is nearly 1). inside the ray-tracer thread, no such position appears, but somehow they are set to 0 when copied to the host. you can use their position to remove these photons or use OpenCL output before I find a fix. |
Thank you for your fast feedback. I more often use cpu version due to gpu version is less stable. // Note: When i run gpu version with large number photons, it's quickly run till 98% and stuck for 4 hours (or more). It's hard to find bug |
@devhello145, sorry for taking a long time for me to finally fix this issue. if you still have needs for using the CPU based simulations, please download the automatically compiled binaries from http://mcx.space/nightly/github/ once this github action script is complete (show green checks) https://github.com/fangq/mmc/actions/runs/6044719776/job/16403710100 |
Some detected photons (many) have incorrect exit position.
In this example I created a sphere of R=1, and detector with R=2 (centers of them are [0,0,0]).
At the end of simulation, position of detected photons are inside sphere of R=1 and even equal to [0, 0, 0].
Code to reproduce (Octave, run on Linux):
Output:
The text was updated successfully, but these errors were encountered: