In [1]:
%matplotlib inline
In [2]:
# suppress warnings for these examples
import warnings
warnings.filterwarnings('ignore')
In [3]:
# imports
from matplotlib import pyplot as plt
from frb import frb
from frb.figures import dm as ffdm
from frb.figures import utils as ffutils
from frb.figures import galaxies as ffgalaxies
In [4]:
frb121102 = frb.FRB.by_name('FRB121102')
frb180924 = frb.FRB.by_name('FRB180924')
frbs = [frb121102, frb180924]
In [5]:
plt.clf()
# Fonts
ffutils.set_mplrc()
#
fig = plt.figure(figsize=(7., 5))
f, (ax1,ax2) = plt.subplots(1,2,sharey=True)
#
ffdm.sub_cartoon(ax1, ax2, frb180924.coord, frb180924.z, host_DM=50., halos=False,
FRB_DM=frb180924.DM.value, yscl=0.88)
#
plt.show()
In [6]:
hosts = [ifrb.grab_host() for ifrb in frbs]
In [7]:
plt.clf()
# Fonts
ffutils.set_mplrc()
#
fig = plt.figure(figsize=(7., 5))
ax = plt.gca()
#
ffgalaxies.sub_bpt(ax, hosts, ['b','r'], ['s','o'], SDSS_clr='Greys')
#
plt.show()
In [8]:
plt.clf()
# Fonts
ffutils.set_mplrc()
#
fig = plt.figure(figsize=(7., 5))
ax = plt.gca()
#
ffgalaxies.sub_sfms(ax, hosts, ['b','r'], ['s','o'])
#
plt.show()
In [9]:
plt.clf()
# Fonts
ffutils.set_mplrc()
#
fig = plt.figure(figsize=(7., 5))
ax = plt.gca()
#
ffgalaxies.sub_color_mag(ax, [hosts[1]], ['r'], ['o'])
#
plt.show()
In [ ]: