Skip to content

Commit

Permalink
Merge pull request #3 from skumblex/dev
Browse files Browse the repository at this point in the history
v1.2.1
  • Loading branch information
hep-mh authored Feb 16, 2021
2 parents 2f5952a + dd5f125 commit 80157a9
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 13 deletions.
14 changes: 10 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Exclude scan results
/plots/data/*
/plots/*.pdf
/plots/*
# Intermediate data files
acropolis/data/*.dat

# AlterBBN files
alterbbn/*

# Temporary files
tmp/*

# Scan results
#/plots/data/*
/plots/*

# Byte-compiled / optimized / DLL files
__pycache__
*.py[cod]
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**A generiC fRamework fOr Photodisintegration Of LIght elementS**

![Language: Python3](https://img.shields.io/badge/language-Python3-blue.svg?style=flat-square)
![Version: 1.2](https://img.shields.io/badge/current_version-1.2-blue.svg?style=flat-square)
![Version: 1.2.1](https://img.shields.io/badge/current_dev_version-1.2.1-blue.svg?style=flat-square)

When using this code, please cite the following papers

Expand All @@ -19,11 +19,14 @@ The remarkable agreement between observations of the primordial light element ab

# Changelog

v1.2.1
- Fixed a bug in ``DecayModel``. Results that have been obtained with older versions can be corrected by multiplying the parameter ``n0a`` with an additional factor ``2.7012``. All results of our papers remain unchanged.
- Updated the set of initial abundances to the most recent values returned by AlterBBN v2.2 (explcitly, we used ``failsafe=12``)

v1.2
- Speed improvements when running non-thermal nucleosynthesis (by a factor 7)
- Modified the directory structure by moving ./data to ./acropolis/data to transform ACROPOLIS into a proper package, which can be installed via ``python3 setup.py install --user`` (also putting the executables ``decay`` and ``annihilation`` into your ``PATH``)
- Added the decay of neutrons and tritium to the calculation
- Included a new script 'tools/create_sm_cosmo_file.py' which allows to generate the file cosmo_file.dat for sm.tar.gz and can easily be modified by the user
- For AnnihilationModel, it is now possible to freely choose the dark-matter density parameter (default is 0.12)


Expand Down
24 changes: 23 additions & 1 deletion acropolis/cascade.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# pprint
from acropolis.pprint import print_warning, print_error
# params
from acropolis.params import me, me2, alpha, re
from acropolis.params import me, me2, alpha, re, hbar, tau_m
from acropolis.params import zeta3, pi2
from acropolis.params import Emin
from acropolis.params import approx_zero, eps, Ephb_T_max, E_EC_cut
Expand Down Expand Up @@ -648,6 +648,28 @@ def total_kernel_x(self, E, Ep, T, X):
)


class _MuonReactionWrapper(_ReactionWrapperScaffold): # TODO
pass

# RATES ###################################################################
# E is the energy of the incoming particle
# T is the temperature of the background photons

# MUON DECAY ##############################################################
def _rate_muon_decay(self, E, T):
return hbar/tau_m


# INVERSE COMPTON SCATTERING ##############################################
def _rate_inverse_compton(self, E, T):
return 0.


# TOTAL RATE ##############################################################
def total_rate(self, E, T):
return self._rate_inverse_compton(E, T) + self._rate_muon_decay(E, T)


class SpectrumGenerator(object):

def __init__(self, Y0, eta):
Expand Down
Binary file modified acropolis/data/sm.tar.gz
Binary file not shown.
3 changes: 2 additions & 1 deletion acropolis/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# nucl
from acropolis.nucl import NuclearReactor, MatrixGenerator
# params
from acropolis.params import zeta3
from acropolis.params import hbar, c_si, me2, alpha, tau_t
from acropolis.params import Emin
from acropolis.params import NY
Expand Down Expand Up @@ -223,7 +224,7 @@ def _number_density(self, T):
sf_ratio = self._sII.scale_factor(self._sT0)/self._sII.scale_factor(T)

delta_t = self._sII.time(T) - self._st0
n_gamma = (pi**2.)*(self._sT0**3.)/15.
n_gamma = (2.*zeta3)*(self._sT0**3.)/(pi**2.)

return self._sN0a * n_gamma * sf_ratio**3. * exp( -delta_t/self._sTau )

Expand Down
2 changes: 1 addition & 1 deletion acropolis/nucl.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
8 : "He4+a>d+d",
9 : "He4+a>n+p+d",
10: "Li6+a>n+p+He4",
11: "Li6+a>X", # Here we only consider the destruction of Li6
11: "Li6+a>X",
12: "Li7+a>t+He4",
13: "Li7+a>n+Li6",
14: "Li7+a>n+n+p+He4",
Expand Down
Binary file modified manual/manual.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions manual/manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -566,25 +566,25 @@ \subsubsection{Running parameter scans}
\centering
\includegraphics[width=0.495\textwidth]{plots/decay_aa_50MeV.pdf}
\includegraphics[width=0.495\textwidth]{plots/decay_aa_1e7s.pdf}
\caption{95\% C.L.\ constraints for decay of a decoupled MeV-scale BSM particle (implemented in \texttt{DecayModel}) into two photons ($\text{BR}_{\gamma \gamma} = 1 - \text{BR}_{e^+ e^-} = 1$) in $\tau_\phi - (n_\phi/n_\gamma)|_{T=T_0}$ plane (left) and $m_\phi - (n_\phi/n_\gamma)|_{T=T_0}$ plane (right) with $T_0 = 10 \, \mathrm{MeV}$ and $m_\phi = 50 \, \mathrm{MeV}$ (left) as well as $\tau_\phi = 10^7 \, \mathrm{s}$ (right). The limits from individual observables are shown separately: primordial deuterium abundance (orange high, grey low), helium-4 mass fraction $\mathcal{Y}_\text{p}$ (blue), and helium-3 abundance normalised by deuterium (green). The overall 95\% C.L.\ BBN limit is given by the black full line as an envelope of individual 95\% C.L.\ constraints neglecting correlations. Using $(n_\phi/n_\gamma)|_{T=T_0}$, i.e.\ \texttt{n0a}, as a \texttt{fast} parameter on a single computing node with two \texttt{AMD EPYC 7402 24-Core Processors} the scans took $\sim 25$ min (left) and $\sim 35$ min (right) for a $200 \times 200$ grid.}
\caption{95\% C.L.\ constraints for decay of a decoupled MeV-scale BSM particle (implemented in \texttt{DecayModel}) into two photons ($\text{BR}_{\gamma \gamma} = 1 - \text{BR}_{e^+ e^-} = 1$) in $\tau_\phi - (n_\phi/n_\gamma)|_{T=T_0}$ plane (left) and $m_\phi - (n_\phi/n_\gamma)|_{T=T_0}$ plane (right) with $T_0 = 10 \, \mathrm{MeV}$ and $m_\phi = 50 \, \mathrm{MeV}$ (left) as well as $\tau_\phi = 10^7 \, \mathrm{s}$ (right). The limits from individual observables are shown separately: primordial deuterium abundance (orange high, grey low), helium-4 mass fraction $\mathcal{Y}_\text{p}$ (blue), and helium-3 abundance normalised by deuterium (green). The overall 95\% C.L.\ BBN limit is given by the black full line as an envelope of individual 95\% C.L.\ constraints neglecting correlations. Using $(n_\phi/n_\gamma)|_{T=T_0}$, i.e.\ \texttt{n0a}, as a \texttt{fast} parameter on a single computing node with two \texttt{AMD EPYC 7402 24-Core Processors} the scans took $\sim 20$ min (left) and $\sim 30$ min (right) for a $200 \times 200$ grid.}
\label{fig:scan_decay}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.495\textwidth]{plots/annih_swave.pdf}
\includegraphics[width=0.495\textwidth]{plots/annih_pwave_1MeV.pdf}
\caption{95\% C.L.\ constraints for residual annihilations of DM (implemented in \texttt{AnnihilationModel}) into electron-positron pairs ($\text{BR}_{\gamma \gamma} = 1 - \text{BR}_{e^+ e^-} = 0$) for purely $s$-wave annihilations (left, $b = 0$) and purely $p$-wave annihilations (right, $a = 0$, $T_\mathrm{kd} = 1 \, \mathrm{MeV}$). For the explanation of the colour-coding see figure~\ref{fig:scan_decay}. Using $(n_\phi/n_\gamma)|_{T=T_0}$, i.e.\ \texttt{n0a}, as a \texttt{fast} parameter on a single computing node with two \texttt{AMD EPYC 7402 24-Core Processors} the scans took $\sim 85$ min each for a $200 \times 200$ grid.}
\caption{95\% C.L.\ constraints for residual annihilations of DM (implemented in \texttt{AnnihilationModel}) into electron-positron pairs ($\text{BR}_{\gamma \gamma} = 1 - \text{BR}_{e^+ e^-} = 0$) for purely $s$-wave annihilations (left, $b = 0$) and purely $p$-wave annihilations (right, $a = 0$, $T_\mathrm{kd} = 1 \, \mathrm{MeV}$). For the explanation of the colour-coding see figure~\ref{fig:scan_decay}. Using $(n_\phi/n_\gamma)|_{T=T_0}$, i.e.\ \texttt{n0a}, as a \texttt{fast} parameter on a single computing node with two \texttt{AMD EPYC 7402 24-Core Processors} the scans took $\sim 80$ min each for a $200 \times 200$ grid.}
\label{fig:scan_annih}
\end{figure}

In figure~\ref{fig:scan_decay} (left) we show the constraints for fixed $m_\phi = 50 \, \mathrm{MeV}$ in the $\tau_\phi - (n_\phi/n_\gamma)|_{T=T_0}$ plane with $T_0 = 10 \, \mathrm{MeV}$ and decays into two photons. The limits start around $\tau_\phi \sim 10^4 \, \mathrm{s}$, quickly become very stringent with increasing lifetime, and eventually flatten out excluding a number density far below the photon number density at $T_0 = 10 \, \mathrm{MeV}$. Note that due to this high sensitivity we are able to assume a standard cosmological history apart from photodisintegration as detailed in section~\ref{sec:decay_model}.
In the right panel of figure~\ref{fig:scan_decay} we show the constraints for fixed $\tau_\phi = 10^7 \, \mathrm{s}$ (right) in the $m_\phi - (n_\phi/n_\gamma)|_{T=T_0}$ plane with $T_0 = 10 \, \mathrm{MeV}$ and decays into two photons. The limits start at twice the disintegration threshold for deuterium, $m_\phi = 2 E_\mathrm{D}^\mathrm{th} \approx 4.4 \, \mathrm{MeV}$. Apart from some regions with more complex structure due to different disintegration reactions the limits become increasingly strong with larger $m_\phi$ as the energy density injected into the SM becomes larger. For masses above the pion threshold in particular, $m_\phi \gtrsim 280 \, \mathrm{MeV}$, hadrodisintegration may become relevant if $\phi$ has non-vanishing couplings to quarks, implying that $\text{BR}_{\gamma \gamma} + \text{BR}_{e^+ e^-} < 1$ in general. Also muons are kinematically available in the mass region (which are currently not implemented in \texttt{ACROPOLIS}).

The scans for figure~\ref{fig:scan_decay} took $\sim 25$ min (left) and $\sim 35$ min (right) for a $200 \times 200$ grid on two \texttt{AMD EPYC 7402 24-Core Processors}, clearly highlighting the performance improvement due to the \texttt{fast} parameter $(n_\phi/n_\gamma)|_{T=T_0}$, i.e.\ \texttt{n0a}, making the number of points in this direction computationally inexpensive (cf.\ also appendix~\ref{sec:benchmarks_single}). The runtime is thus determined mostly by the number of points in the direction of $\tau_\phi$ or $m_\phi$ (not \texttt{fast}).
The scans for figure~\ref{fig:scan_decay} took $\sim 20$ min (left) and $\sim 30$ min (right) for a $200 \times 200$ grid on two \texttt{AMD EPYC 7402 24-Core Processors}, clearly highlighting the performance improvement due to the \texttt{fast} parameter $(n_\phi/n_\gamma)|_{T=T_0}$, i.e.\ \texttt{n0a}, making the number of points in this direction computationally inexpensive (cf.\ also appendix~\ref{sec:benchmarks_single}). The runtime is thus determined mostly by the number of points in the direction of $\tau_\phi$ or $m_\phi$ (not \texttt{fast}).
%Note that the longer runtime for the right panel is a result of the database files for the electromagnetic cascade reaction rates having an upper limit on the energy of $m_\phi/2 = E_0 = 100 \, \mathrm{MeV}$, which often corresponds to the most interesting region in parameter space.

In figure~\ref{fig:scan_annih} we show the constraints for residual annihilations of DM into electron-positron pairs ($\text{BR}_{\gamma \gamma} = 1 - \text{BR}_{e^+ e^-} = 0$) for purely $s$-wave annihilations (left, $b = 0$) and purely $p$-wave annihilations (right, $a = 0$, $T_\mathrm{kd} = 1 \, \mathrm{MeV}$) as implemented in \texttt{AnnihilationModel}. These limits start at the disintegration threshold of deuterium, $m_\chi = E_\mathrm{D}^\mathrm{th} \approx 2.2 \, \mathrm{MeV}$, and closely resemble those presented in~\cite{Depta:2019lbe}, albeit with updated observationally inferred primordial abundances. We therefore refer to~\cite{Depta:2019lbe} for a detailed discussion. The scans took $\sim 85$ min each for a $200 \times 200$ grid on the aforementioned computing node.
In figure~\ref{fig:scan_annih} we show the constraints for residual annihilations of DM into electron-positron pairs ($\text{BR}_{\gamma \gamma} = 1 - \text{BR}_{e^+ e^-} = 0$) for purely $s$-wave annihilations (left, $b = 0$) and purely $p$-wave annihilations (right, $a = 0$, $T_\mathrm{kd} = 1 \, \mathrm{MeV}$) as implemented in \texttt{AnnihilationModel}. These limits start at the disintegration threshold of deuterium, $m_\chi = E_\mathrm{D}^\mathrm{th} \approx 2.2 \, \mathrm{MeV}$, and closely resemble those presented in~\cite{Depta:2019lbe}, albeit with updated observationally inferred primordial abundances. We therefore refer to~\cite{Depta:2019lbe} for a detailed discussion. The scans took $\sim 80$ min each for a $200 \times 200$ grid on the aforementioned computing node.
%At his point it is also worth noting injections of electron-positron pair usually takes a little more time, due to the final-state radiation of photons, which lead to a non-vanishing, continuouse injection spectum.

\section{Implementing your own models}
Expand Down

0 comments on commit 80157a9

Please sign in to comment.