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

Make jfactor a parameter for DarkMatter models #5097

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

StFroese
Copy link
Member

It is common in dark matter analyses to have a prior on the J-Factor (see here).
In order to achieve this, the jfactor of the DarkMatterAnnihilationSpectralModel has to become a parameter.

I also renamed the J-Factor to D-Factor for the DarkMatterDecaySpectralModel and did the same there, this is also very common :)

Signed-off-by: Stefan Fröse <stefan.froese@udo.edu>
Signed-off-by: Stefan Fröse <stefan.froese@udo.edu>
Signed-off-by: Stefan Fröse <stefan.froese@udo.edu>
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (1474bb9) 75.04% compared to head (cac65e8) 75.21%.
Report is 86 commits behind head on main.

Files Patch % Lines
gammapy/astro/darkmatter/spectra.py 37.50% 10 Missing ⚠️
gammapy/astro/darkmatter/tests/test_spectra.py 0.00% 5 Missing ⚠️
gammapy/modeling/parameter.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5097      +/-   ##
==========================================
+ Coverage   75.04%   75.21%   +0.17%     
==========================================
  Files         233      234       +1     
  Lines       34622    34813     +191     
==========================================
+ Hits        25982    26186     +204     
+ Misses       8640     8627      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@StFroese
Copy link
Member Author

Maybe the jfactor should be given as log10(J) to avoid large values

Signed-off-by: Stefan Fröse <stefan.froese@udo.edu>
@StFroese
Copy link
Member Author

StFroese commented Feb 15, 2024

Maybe the jfactor should be given as log10(J) to avoid large values

Or a scale factor which is optimized instead.
$\langle \sigma \nu \rangle$ is also maximally degenerate to the J-Factor, this would make to linear scale factors to be optimised.
Any opinions on how to do this nicely?

@registerrier registerrier added this to the 1.3 milestone Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants