Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
985 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
|
||
echo " Recomputing Gravitational Wave posteriors on f_PBH (may take ~ 1 hour...)" | ||
echo " " | ||
|
||
for NOBS in 1 80 | ||
do | ||
for PRIOR in J LF | ||
do | ||
python src/tabulate_posteriors_O3.py -N_obs $NOBS -prior $PRIOR -M_PBH 0.5 | ||
done | ||
done | ||
|
||
for NOBS in 1 24000 | ||
do | ||
for PRIOR in J LF | ||
do | ||
python src/tabulate_posteriors_ET.py -N_obs $NOBS -prior $PRIOR | ||
done | ||
done |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Total source frame mass 20 M_sun | ||
# Columns: Redshift, Fraction detectable | ||
7.678380919212519 0.5 | ||
28.52205602981411 0.1 | ||
95.87373195587614 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Figure 1 (dashed green line) of https://arxiv.org/pdf/1808.04771.pdf | ||
# Columns: Component Mass [M_sun], Horizon [Mpc] | ||
0.1981205951448708 27.286681430014227 | ||
0.3008613938919342 38.37156747012553 | ||
0.4004698512137823 48.75339548973085 | ||
0.5000783085356305 58.784038259116684 | ||
0.6003132341425216 68.46363328229641 | ||
0.7005481597494128 77.70424674270178 | ||
0.800156617071261 86.8569263865389 | ||
0.9003915426781521 95.83415090927964 | ||
1.0025058731401724 104.8117879440606 |
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
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
matplotlib==3.0.3 | ||
scipy==1.2.1 | ||
numpy==1.16.2 | ||
tqdm==4.19.9 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
""" Cosmo.py | ||
Functions/constants for calculating cosmological quantities | ||
such as the Hubble rate and various distances. | ||
""" | ||
|
||
import numpy as np | ||
|
||
from scipy.integrate import cumtrapz, quad, dblquad | ||
from scipy.interpolate import interp1d | ||
|
||
#--- Some constants ------------ | ||
#------------------------------- | ||
|
||
G_N = 4.302e-3 #(pc/solar mass) (km/s)^2 | ||
G_N_Mpc = 1e-6*4.302e-3 #(Mpc/solar mass) (km/s)^2 | ||
|
||
h = 0.678 | ||
Omega_DM = 0.1186/(h**2) | ||
H0 = 100.0*h #(km/s) Mpc^-1 | ||
H0_peryr = 67.8*(3.24e-20)*(60*60*24*365) | ||
ageUniverse = 13.799e9 #y | ||
Omega_L = 0.692 | ||
Omega_m = 0.308 | ||
Omega_r = 9.3e-5 | ||
|
||
D_H = (3000/h) #Mpc | ||
|
||
c = 3e5 #km/s | ||
|
||
|
||
#------------------------------- | ||
|
||
#--- Useful cosmological functions --- | ||
#------------------------------------- | ||
|
||
|
||
rho_critical = 3.0*H0**2/(8.0*np.pi*G_N_Mpc) #Solar masses per Mpc^3 | ||
|
||
def Hubble(z): | ||
return H0_peryr*np.sqrt(Omega_L + Omega_m*(1+z)**3 + Omega_r*(1+z)**4) | ||
|
||
def Hubble2(z): | ||
return H0*np.sqrt(Omega_L + Omega_m*(1+z)**3 + Omega_r*(1+z)**4) | ||
|
||
def HubbleLaw(age): | ||
return H0_peryr*age | ||
|
||
def rho_z(z): | ||
return 3.0*Hubble2(z)**2/(8*np.pi*G_N) | ||
|
||
def t_univ(z): | ||
integ = lambda x: 1.0/((1+x)*Hubble(x)) | ||
return quad(integ, z, np.inf)[0] | ||
|
||
def Omega_PBH(f): | ||
return f*Omega_DM | ||
|
||
#Luminosity distance (Mpc) | ||
def calcdL(z): | ||
c = 3.06594845e-7 | ||
return c*(1+z)*quad(lambda x: Hubble(x)**-1, 0, z)[0] | ||
|
||
#https://arxiv.org/pdf/astro-ph/9905116.pdf | ||
#Comoving distance (in a flat universe, in Mpc) | ||
def D_C(z): | ||
return c*quad(lambda z: 1/Hubble2(z), 0, z)[0] | ||
|
||
#Comoving volume out to redshift z (in Mpc^3) | ||
def V_C(z): | ||
return (4*np.pi/3)*(D_C(z))**3 | ||
|
||
def dVdz(z): | ||
return 4*np.pi*D_C(z)**2*(c/Hubble2(z)) |
Oops, something went wrong.