Events

darksirens.events.abhmergerrate module

class darksirens.events.abhmergerrate.ABH_MRcalculator(cosmo)

Bases: object

This class computes the merger rate of astrophysical black holes (ABHs).

R_m(t_, z_m, a, b)

Returns the ABH merger rate as a function of time.

Parameters
  • t – the time.

  • z_m – the break redshift.

  • a – star formation rate parameter.

  • b – star formation rate parameter.

R_z(z_, z_m, a, b)

Returns the ABH merger rate as a function of redshift.

Parameters
  • z – the redshift.

  • z_m – the break redshift.

  • a – star formation rate parameter.

  • b – star formation rate parameter.

delay_time_distribution(t_d)

Returns the distribution of the delay time between the start of star formation and the formation of the first ABHs.

Parameters

t_d – the delay time.

star_formation_rate(t, z_m, a, b)

Returns the star formation rate as a function of time.

Parameters
  • t – the time in yrs

  • z_m – the break redshift.

  • a – star formation rate parameter.

  • b – star formation rate parameter.

star_formation_rate_z(z, z_m, a, b)

Returns the star formation rate as a function of redshift. See Springel & Hernquist 2002b and 2003, astro-ph/0206395 and astro-ph/0209183.

Parameters
  • z – the redshift.

  • z_m – the break redshift.

  • a – star formation rate parameter.

  • b – star formation rate parameter.

t_univ(z, cosmo)

Returns the age of the Universe in years at a given redshift.

Parameters
  • z – the redshift

  • cosmo – an instance of the Cosmology class.

darksirens.events.pbhmergerrate module

class darksirens.events.pbhmergerrate.PBH_MRcalculator(cosmo)

Bases: object

This class handles the computation of the PBH merger rate following 1709.06576.

Hubble(z, cosmo)

Returns the Hubble function \(H(z)\).

Parameters
  • z – the redshift.

  • cosmo – an instance of the Cosmology class.

Omega_PBH(f)

This function returns the fractional density of dark matter contained in PBHs i.e. \(\Omega_{\rm PBH}\).

Parameters

f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

P_a_j(a, j, f, M_PBH)

This function returns the probability distribution of the rescaled nearest neighbour separation

Parameters
  • a – the semi-major axis

  • j – the angular momentum

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

P_j(j, x, f, M_PBH)

This function returns the probability distribution of the angular momentum (eqn 19 1709.06576)

Parameters
  • j – the angular momentum

  • x – the comoving separation

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

P_of_t_analytical(t, f, M_PBH)

This function returns the integral of equation 26 of 1709.06576 at a given merger time.

Parameters
  • t – the merger time

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

P_t_integ(a, t, f, M_PBH)

This function returns equation 26 of 1709.06576.

Parameters
  • a – the semi-major axis

  • t – the merger time

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

P_t_of_z_analytical(z, f, M_PBH)

This function returns the integral of equation 26 of 1709.06576.

Parameters
  • z – the redshift.

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

Pnp(z, f)

This function returns the suppression factor due to clustering of the PBHs.

Parameters
  • z – the redshift.

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

R_t(t, f, M_PBH)

This function returns the PBH merger rate as a function of time.

Parameters
  • t – the merger time

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

R_z(z, f, M_PBH)

This function returns the PBH merger rate as a function of redshift.

Parameters
  • z – the redshift.

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

R_z_clust(z, f, M_PBH)

This function returns the PBH merger rate with clustering as a function of redshift.

Parameters
  • z – the redshift.

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

R_zvec(zvec, f, M_PBH)

This function returns a vectorised form of the PBH merger rate as a function of redshift.

Parameters
  • zvec – the vectorised redshift.

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

a_max(f, M_PBH)

This function returns the maximum value of the semi-major axis of a pair of PBHs

Parameters
  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

a_of_x(x, f, M_PBH)

This function returns the semi-major axis as a function of the comoving separation.

Parameters
  • x – the comoving separation between the PBHs

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

bigX(x, f, M_PBH)

This function returns the dimensionless comoving separation between PBHs (eqn 3 1709.06576)

Parameters
  • x – comoving separation

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

j_X(x, f, M_PBH)

Characteristic value of the angular momentum (eqn 22 1709.06576)

Parameters
  • x – the comoving separation

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

n_PBH(f, M_PBH)

This function returns the number of PBH per Gpc^3.

Parameters
  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

x_of_a(a, f, M_PBH)

This function returns the comoving separation as a function of semi-major axis.

Parameters
  • a – the semi-major axis of the PBH binary orbit

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

xbar(f, M_PBH)

This function returns the characteristic comoving separation between two PBHs.

Parameters
  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • M_PBH – mass of the PBH.

darksirens.events.numberofevents module

darksirens.events.numberofevents.detection_ratio_matrices(horizon_redshifts, redshift_grid, mTot_range, detection_coefficients)

This function creates a detection ratio matrix.

Parameters
class darksirens.events.numberofevents.event_number_calculator(cosmo, ABHpars, PBHpars, specs)

Bases: object

This class handles the calculation of the total number of events.

MRligoABH_calculator(ABHpars, cosmo)

This function computes the LIGO ABH merger rate.

Parameters
  • ABHpars – the ABH parameters passed by the user.

  • cosmo – an instance of the cosmology class.

MRligoPBH_calculator(PBHpars, cosmo)

This function computes the LIGO PBH merger rate.

Parameters
  • PBHpars – the PBH parameters passed by the user.

  • cosmo – an instance of the Cosmology class.

NABH_observed_eventscalculator(ABHpars, cosmo, zmaxET, Tobs, zmin, method='trapz')

This function computes the number of PBH merger events the Einstein Telescope will actually observe.

Parameters
  • ABHpars – the ABH parameters passed by the user.

  • cosmo – an instance of the Cosmology class.

  • zmaxET – the maximum redshift the Einstein Telescope will observe.

  • Tobs – the length of the observing run in years.

  • method – the interpolation method used.

NABHeventscalculator(ABHpars, cosmo, zmaxET, Tobs, method='trapz')

This function computes the total possible number of ABH merger events the Einstein Telescope could see.

Parameters
  • ABHpars – the PBH parameters passed by the user.

  • cosmo – an instance of the Cosmology class.

  • zmaxET – the maximum redshift the Einstein Telescope will observe.

  • Tobs – the length of the observing run in years.

  • method – the interpolation method used.

NPBH_observed_eventscalculator(PBHpars, cosmo, zmaxET, Tobs, zmin, method='trapz')

This function computes the number of PBH merger events the Einstein Telescope will actually observe.

Parameters
  • PBHpars – the PBH parameters passed by the user.

  • cosmo – an instance of the Cosmology class.

  • zmaxET – the maximum redshift the Einstein Telescope will observe.

  • Tobs – the length of the observing run in years.

  • method – the interpolation method used.

NPBHeventscalculator(PBHpars, cosmo, zmaxET, Tobs, method='trapz')

This function computes the total possible number of PBH merger events the Einstein Telescope could see.

Parameters
  • PBHpars – the PBH parameters passed by the user.

  • cosmo – an instance of the Cosmology class.

  • zmaxET – the maximum redshift the Einstein Telescope will observe.

  • Tobs – the length of the observing run in years.

  • method – the interpolation method used.

R_ABH_observed_z(z, ABHpars, cosmo)

Rate of observed ABH mergers, differential in z [Gpc^3 yr^-1].

Parameters
  • z – the redshift.

  • ABHpars – the ABH parameters passed by the user.

  • cosmo – an instance of the Cosmology class.

R_PBH_observed_z(z, PBHpars, cosmo)

Rate of observed PBH mergers, differential in z [Gpc^3 yr^-1].

Parameters
  • z – the redshift.

  • PBHpars – the PBH parameters passed by the user.

  • cosmo – an instance of the Cosmology class.

compute_ABH_norm(ABHpars, PBHpars, cosmo)

This function computes the normalisation of the ABH merger rate.

Parameters
  • ABHpars – the ABH parameters passed by the user.

  • PBHpars – the PBH parameters passed by the user.

  • cosmo – an instance of the Cosmology class.

dVTdz(z, cosmo, f, T0)

This function returns the differential sensitivity in units of Gpc^3 yr-1.

Parameters
  • z – the redshift.

  • cosmo – an instance of the cosmology class.

  • f – the ratio of \(\Omega_{\rm PBH}\) to \(\Omega_{\rm CDM}\).

  • T0 – the length of the observation time in years.

dVcdz(z, cosmo)

This function interpolates between the points computed for the probed comoving volume.

Parameters
  • z – the redshift.

  • cosmo – an instance of the Cosmology class.

dVcdz_full(z, cosmo)

This function returns the differential volume probed as a function of redshift.

Parameters
  • z – the redshift.

  • cosmo – an instance of the Cosmology class.

normalized_ABH_MRcalculator(ABHpars, z)

This function computes the normalised ABH merger rate.

Parameters
  • ABHpars – the ABH parameters passed by the user.

  • z – the redshift.

darksirens.events.numberofevents.events_integrator(integ, z1, z2, method='trapz')

Generic function to integrate a merger rate between two redshifts with the option to set different integration methods (trapz or quad) In fact, we can probably generalise this as an integrator for anything…

Parameters
  • z1 – start redshift.

  • z2 – end redshift.

  • method – method of integration.

darksirens.events.createevent module

class darksirens.events.createevent.event_generator(cosmo, ABHpars, PBHpars, progenitor, specs)

Bases: object

This class handles the generation of events.

get_redshift(final_pars)

This function assigns a redshift to the event. Redshifts are extracted from a probability distribution obtained from the merger rate.

Parameters

final_pars – the event parameters after restructuring.

get_single_event(progenitor)

This function updates the dictionary containing the event specifications.

Parameters

progenitor – progenitor type selected by the user.

merger_rate(zs, progenitor, m1, m2)

This function returns the merger rate given the progenitor type and the masses of the components.

Parameters
  • zs – array of event redshifts.

  • progenitor – the type of progenitor: binary neutron star, binary ABH, binary PBH.

  • m1 – mass of the first component.

  • m2 – mass of the second component.

probz(cosmo, m1, m2, progenitor)

This function creates the probability distribution from which the redshifts of the events are drawn.

Parameters
  • cosmo – an instance of the Cosmology class.

  • m1 – mass of the first component.

  • m2 – mass of the second component.

  • progenitor – the progenitor type.