-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathannihilation
executable file
·37 lines (29 loc) · 1.3 KB
/
annihilation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /usr/bin/env python3
# sys
import sys
# pprint
from acropolis.pprint import print_Yf
from acropolis.pprint import print_error, print_version
# models
from acropolis.models import AnnihilationModel
# Print version information
print_version()
# Extact the number of command line arguments...
N = len(sys.argv)
# ...and check if there are six or seven
if N not in [7, 8]:
print_error("Would you kindly specify the following command-line arguments:\n"
+ " 1. The mass of the dark-matter particle [in MeV]\n"
+ " 2. The s-wave constribution to the cross-section [in cm^3/s]\n"
+ " 3. The p-wave constribution to the cross-section [in cm^3/s]\n"
+ " 4. The kinetic decoupling temperature of the\n"
+ " dark-matter particle [in MeV]\n"
+ " 5. The branching ratio into electron-positron pairs\n"
+ " 6. The branching ratio into two photons.\n"
+ " 7. The density parameter of dark-matter (optional, default: 0.12).")
# Extract the input parameters
params = [float(arg) for arg in sys.argv[1:]]
# Run the code
Yf = AnnihilationModel(*params).run_disintegration()
# Print the result
print_Yf(Yf)