Created
November 6, 2017 00:57
-
-
Save andrewfowlie/b69509ff26cf58b03864ca0facb6606b to your computer and use it in GitHub Desktop.
Figure for WIMP freeze out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
WIMP miracle | |
============ | |
""" | |
import matplotlib | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.ticker import MaxNLocator | |
from scipy.interpolate import spline | |
from numpy.random import normal | |
matplotlib.rc('text', usetex=False) | |
plt.xkcd() | |
matplotlib.rc('font', **{'size': 25}) | |
fig, ax = plt.subplots(figsize=(8, 8)) | |
T = np.linspace(0, 50, 10) | |
def equilibrium(x): | |
""" | |
""" | |
k = 1 | |
return k * x**1.5 * np.exp(-x) | |
def freezeout(x, x_fo=500.): | |
""" | |
""" | |
if x < x_fo: | |
return equilibrium(x) | |
else: | |
return equilibrium(x_fo) | |
x = np.logspace(0, 4, 100) | |
eq = equilibrium(x) | |
fo = map(freezeout, x) | |
plt.loglog(x, fo, color="RoyalBlue", lw=4, label="DM abundance") | |
plt.loglog(x, eq, ls="--", color="Crimson", lw=4, label="Equilibrium") | |
plt.setp(ax, yticklabels=[], xticklabels=[]) | |
plt.text(3, 1E-179, "Freezes-out at correct\nabundance for\nweak interaction") | |
plt.xlabel("1/Temperature") | |
plt.ylabel("Abundance") | |
ax.legend(loc='lower left') | |
plt.title("WIMP miracle") | |
plt.savefig("freeze_out.png") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment