Skip to content
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

Recording just the scattering events in the trace #3

Open
dheligman opened this issue Nov 8, 2022 · 4 comments
Open

Recording just the scattering events in the trace #3

dheligman opened this issue Nov 8, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@dheligman
Copy link

Hi,

I was wondering if it was possible to just trace where scattering events occur and exclude the locations where the photon crosses a layer boundary?

best,
Daniel

@xopto
Copy link
Owner

xopto commented Nov 8, 2022

Hi,
It is possible but not during the MC simulation. You would have to do custom filtering of the trace data, based on the change in the direction, location, and weight of the packet. Note that 0-degree scattering events in a nonabsorbing medium cannot be resolved from a clean propagation step.

@dheligman
Copy link
Author

Would it be possible to add an extra flag to the trace flag to only record scattering events?

@dheligman
Copy link
Author

I am doing some simulations that take up a lot of memory and it could reduce memory requirements

@xopto
Copy link
Owner

xopto commented Nov 8, 2022

A general feature that would allow filtering of events in the kernel is planned but not yet available.
Feel free to modify the kernel template to fit your needs. I am attaching a modified mcml.template.c example that illustrates this with one additional bool variable (search for packet_scattered variable).
mcml.template.zip

@xopto xopto added the enhancement New feature or request label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants