In [1]:
# imports
import numpy as np
from astropy import units as u
from astropy.cosmology import Planck15
from astropy import constants
from ne2001 import density
from ne2001.density import NEobject
from pyigm.cgm.models import ModifiedNFW, MB04, YF17
In [2]:
FRB_l = 36.4
FRB_b = -53.6
In [3]:
ne = density.ElectronDensity()#**PARAMS)
In [4]:
DM_disk = ne.DM(FRB_l, FRB_b, 100.)
DM_disk
Out[4]:
In [5]:
Mhalo = np.log10(1.5e12)
f_hot = 0.75 # Allows for disk + ISM
c = 7.7
In [6]:
# MB
mb04 = MB04(log_Mhalo=Mhalo, f_hot=f_hot, c=c)
DM_halo = mb04.Ne_Rperp(8*u.kpc) # This is approximate. Should do proper l,b but may make little difference
DM_halo/2 # Only get 1/2 for our Galaxy
Out[6]:
In [7]:
params = dict(F=1., e_density=1.)
model_ne = NEobject(mb04.ne, **params)
In [8]:
DM_halo2 = model_ne.DM(FRB_l, FRB_b, mb04.r200.to('kpc').value)
DM_halo2
Out[8]:
In [9]:
DM_halo2_10 = model_ne.DM(FRB_l, FRB_b, 10.)
DM_halo2_10
Out[9]:
In [10]:
Mhost = np.log10(1e10)
f_hot_host = 0.5 # Allows for 50% blow-out
c = 7.7
In [11]:
mb04_host = MB04(log_Mhalo=Mhost, f_hot=f_hot_host, c=c)
DM_host = mb04_host.Ne_Rperp(1*u.kpc)
DM_host/2 # Only get 1/2
Out[11]:
In [12]:
rhob = Planck15.Ob0 * Planck15.critical_density0
rhob
Out[12]:
In [17]:
n_b = rhob / 1.3 / constants.m_p
n_b.decompose().cgs
Out[17]:
In [23]:
neff_b = n_b * 0.7 # Approximate
In [19]:
DM_IGM = 50 * u.pc / u.cm**3
In [24]:
D_IGM = DM_IGM / neff_b
D_IGM.to('Mpc')
Out[24]:
In [ ]: