In [10]:
%matplotlib notebook
In [16]:
# imports
from pkg_resources import resource_filename
from matplotlib import pyplot as plt
import numpy as np
from frb.galaxies import frbgalaxy
In [6]:
host121102 = frbgalaxy.FRBHost.by_name('121102')
In [7]:
host121102.z
Out[7]:
In [8]:
host121102.morphology
Out[8]:
In [9]:
host121102.neb_lines
Out[9]:
In [21]:
plt.clf()
ax_BPT = plt.gca()
# Plot FRB 121102
ax_BPT.plot([np.log10(host121102.neb_lines['[NII] 6583']/host121102.neb_lines['Ha'])],
[np.log10(host121102.neb_lines['[OIII] 5007']/host121102.neb_lines['Hb'])], 'bo',
label='Repeater')
# Axes
ax_BPT.set_xlabel(r"$\log \, ({\rm [NII]/H_\alpha)}$")
ax_BPT.set_ylabel(r"$\log \, ({\rm [OIII]/H_\beta)}$")
ax_BPT.set_xlim(-1.5, 0.5)
ax_BPT.set_ylim(-1, 1.2)
# Standard curves
demarc = lambda x: 0.61 / (x - 0.05) + 1.3 # Kauffman et al 2003, MNRAS, 346, 4, pp. 1055-1077. Eq 1
demarc_kewley = lambda x: 0.61 / (
x - 0.47) + 1.19 # Kewley F., Dopita M., Sutherland R., Heisler C., Trevena J., 2001, ApJ, 556,121
demarc_liner = lambda x: 1.01 * x + 0.48 # Cid Fernandes et al 2010, MNRAS, 403,1036 Eq 10
ax_BPT.plot(np.linspace(-2, 0), demarc(np.linspace(-2, 0)), "k-", lw=2)#, label="Kauffman et al 2003")
ax_BPT.plot(np.linspace(-2, 0.25), demarc_kewley(np.linspace(-2, 0.25)), "k--", lw=2)#, label="Kewley et al 2001")
ax_BPT.plot(np.linspace(-0.43, 0.5), demarc_liner(np.linspace(-0.43, 0.5)), "k:", lw=2)#, label="Cid Fernandes et al 2010")
# Labels
lsz = 13.
ax_BPT.annotate("Star-forming", (-1.30, 0), fontsize=lsz)
ax_BPT.annotate("LINER", (0.23, 0), fontsize=lsz)
ax_BPT.annotate("Seyfert", (-0.5, 1), fontsize=lsz)
# Legend
ax_BPT.legend(loc="lower left")
#
plt.show()
In [ ]: