fangq / mcx

Monte Carlo eXtreme (MCX) - GPU-accelerated photon transport simulator
http://mcx.space
Other
132 stars 73 forks source link

Gaussian divergence for slit source #213

Closed kdreher closed 7 months ago

kdreher commented 8 months ago

Currently, the slit source is defined with a single-direction vector for all photons meaning that all photons launched from that source will have the exact same direction. In reality, however, e.g. a laser slit will have some Gaussian-like intensity distribution instead of a collimated, sharply defined slit. The option to include a beam divergence angle in the source parameters to model this behaviour would be really nice. Usually, these angles can be measured for a real laser slit at its full-width-at-half maximum.

This feature could help model a digital twin of these slit sources more exactly.

fangq commented 8 months ago

I've merged the patch and added a follow up commit to reduce register use.

Please test the updated code and verify if the new source still works as expected. Once verified, feel free to close this ticket.

thanks for contributing!

lkeegan commented 7 months ago

I tested the master branch and it all works great, many thanks!

kdreher commented 7 months ago

Great, I also tested it and it seems to run perfectly! Thanks for the fast response!