CRPropa / CRPropa3

CRPropa is a public astrophysical simulation framework for propagating extraterrestrial ultra-high energy particles. https://crpropa.github.io/CRPropa3/
https://crpropa.desy.de
GNU General Public License v3.0
65 stars 66 forks source link

Improvemente of Directed Emission Module #433

Closed simonerossoni1996 closed 10 months ago

simonerossoni1996 commented 1 year ago

This PR introduces changes to the SourceDirectedEmission() module.

The SourceDirectedEmission() module samples a random vector from the von Mises-Fischer distribution defined by a mean direction and a concentration parameter. This vector is then used for the injection of the candidate. The sampling was done as in http://people.csail.mit.edu/jstraub/download/straub2017vonMisesFisherInference.pdf .

Given the presence of a function for random sampling from a von Mises-Fischer distribution (in Random.cpp), the sampling procedure was modified. Some functions in the module are no longer needed.

Thanks to @avvliet for help with the changes and with the PR.

JulienDoerner commented 12 months ago

Hey @simonerossoni1996,

thanks for your improvement.

If I see it correctly this PR is not based on the current CRPropa master. Can you rebase it on the current master and resolve the merge conflicts (or maybe prepare a new PR based on the current master).

The current version is not able to compile due to some conflicts from the newer features as the "tagOrigin".