Priors¶
Default Priors¶
Parameter |
Support / Integration Limits |
Prior Type |
Analytical Form |
|---|---|---|---|
|
|
Uniform |
\(p(m_1)\propto 1\) |
|
|
Uniform |
\(p(m_2)\propto 1\) |
|
|
Uniform |
\(p(M)\propto 1\) |
|
|
Uniform |
\(p(\mathcal{M}_c)\propto 1\) |
|
\([ln\ 1,ln\ 100]\) |
Log-chirp-mass prior |
\(p(\ln\mathcal{M}_c)\propto e^{\ln\mathcal{M}_c}\) |
|
\([10^{-2},1-\epsilon]\) |
Mass-ratio prior |
\(p(q)\propto q^2\) |
|
derived from |
Derived prior |
Derived from the prior on |
|
derived from |
Derived prior |
Derived from the prior on |
|
derived from |
Derived prior |
Derived from the prior on |
|
derived from |
Derived prior |
Derived from the prior on |
|
\([0,360^o]\) |
Uniform |
\(p(\alpha)\propto 1\) |
|
\([-90^o,90^o]\) |
Isotropic sky prior |
\(p(\delta)\propto \cos\delta\) |
|
\([0,\pi]\) |
Sine prior |
\(p(\iota)\propto \sin\iota\) |
|
|
Uniform |
\(p(\cos\iota)\propto 1\) |
|
\([0,\pi]\) |
Uniform |
\(p(\psi)\propto 1\) |
|
|
Uniform |
\(p(t_{\rm coal})\propto 1\) |
|
\([-\pi,\pi]\) |
Uniform |
\(p(\phi_{\rm coal})\propto 1\) |
|
|
Uniform |
\(p(s_i)\propto 1\) |
|
|
Uniform |
\(p(s_i)\propto 1\) |
|
|
Uniform |
\(p(\chi_1)\propto 1\) |
|
\([0,2\pi]\) |
Uniform |
\(p(\phi_1)\propto 1\) |
|
\([0,\pi]\) |
Spherical-angle prior |
\(p(\theta_1)\propto \sin\theta_1\) |
|
|
Uniform |
\(p(\chi_2)\propto 1\) |
|
\([0,2\pi]\) |
Uniform |
\(p(\phi_2)\propto 1\) |
|
\([0,\pi]\) |
Spherical-angle prior |
\(p(\theta_2)\propto \sin\theta_2\) |
|
|
Uniform |
\(p(\chi_s)\propto 1\) |
|
|
Uniform |
\(p(\chi_a)\propto 1\) |
|
cosmology-dependent |
Astrophysical distance prior |
\(p(d_L)\propto \frac{dV_c}{dd_L}\frac{\mathrm{SFR}(z)}{1+z}\) |
|
derived from |
Derived prior |
Derived from the prior on |
|
derived from |
Derived prior |
Derived from the prior on |
|
derived from |
Derived prior |
Derived from the prior on |
|
derived from |
Derived prior |
Derived from the prior on |
|
derived from |
Derived prior |
Derived from the prior on |
Make your own prior¶
To redefine your priors define a dictionary with two arrays for each parameter, one for the support and another for the probability distribution.
For instance, to redefine the priors on dL, iota, Mc and eta as shown in the figure below, we can run the code snippet below.
import numpy as np
import GWDALI as gw
import matplotlib.pyplot as plt
FreeParams = "dL,Mc,eta,iota".split(',')
Priors_default = gw.Priors(FreeParams,name=None,new_priors=None,plot=False)
dL = np.linspace(.1,250,1000)
iota = np.linspace(0,np.pi,1000)
Mc = np.linspace(1,100,1000)
eta = np.linspace(0.0,0.25,1000)
l0 = np.pi/6
p_dL = np.exp(-.5*(dL-50)**2/50**2) ; p_dL/=sum(p_dL)
p_Mc = Mc**(-.5)+np.exp(-0.5*((Mc-50)/5)**2)/np.sqrt(2*np.pi*5**2) ; p_Mc/=sum(p_Mc)
p_eta = eta**2 ; p_eta/=sum(p_eta)
p_iota = np.sin(iota)*(iota<l0)+np.sin(iota)*(iota>np.pi-l0) ; p_iota/=sum(p_iota)
new_priors = {}
new_priors["dL"] = [dL,p_dL]
new_priors["iota"] = [iota,p_iota]
new_priors["Mc"] = [Mc,p_Mc]
new_priors["eta"] = [eta,p_eta]
Priors_modified = gw.Priors(FreeParams,new_priors=new_priors,plot=False)
for key in FreeParams:
p1 = Priors_default[key]
p2 = Priors_modified[key]
x1 = np.linspace(p1.minimum,p1.maximum,1000)
x2 = np.linspace(p2.minimum,p2.maximum,1000)
y1 = p1.prob(x1) ; y1/=max(y1)
y2 = p2.prob(x2) ; y2/=max(y2)
plt.subplot(2,2,FreeParams.index(key)+1)
plt.plot(x1,y1,'k-',label="Default Prior")
plt.plot(x2,y2,'r-',label="New Prior")
plt.xlabel(key)
plt.legend()
plt.grid(alpha=.3)
plt.tight_layout()
plt.show()