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

Momentum Diffusion #444

Closed lukasmerten closed 8 months ago

lukasmerten commented 8 months ago

This is a rewrite of the content of PR #279, which will be closed.

The module introduces a momentum diffusion module, that allows to treat 2nd order Fermi acceleration in the ensemble averaged picture. It is meant to be used together with the DiffusionSDE module. In the future the module can be extended to include more complicated dependencies of the momentum diffusion scalar.

Unit tests and documentation / example code are included.

rafaelab commented 8 months ago

Hi @lukasmerten Thanks for this update. It runs just fine in my laptop, and so does the example notebook. I left a few (very minor) comments regarding CRPropa's style convention. I also left a comment about the limit option in this module, if we want to leave it as a keyword argument with default value as in other modules.

lukasmerten commented 8 months ago

@rafaelab I adressed all your style convention comments and added a new constructor that allows for direct setting of the limit parameter. Let me know if there is anything else that needs to be done.