gwpopulation_pipe.data_analysis.compute_rate_posterior

compute_rate_posterior(posterior, selection)[source]

Compute the rate posterior as a post-processing step.

This method is the same as described in https://dcc.ligo.org/T2000100. To get the rate at \(z=0\) we stop after step four.

The total surveyed four-volume is given as

\[V_{\rm tot}(\Lambda) = T_{\rm obs} \int dz \frac{1}{1+z} \frac{dVc}{dz} \psi(z|\Lambda)\]

Note that \(\psi(z=0|\Lambda) = 1\)

The sensitive four-volume is then \(\mu V_{\rm tot}\) where \(\mu\) is the fraction of injections which are found.

We draw samples from the gamma distribution with mean N_EVENTS + 1

These samples of this are then divided by the sensitive four-volume to give the average rate over the surveyed volume with units \(Gpc^{-3}yr^{-1}\).

Parameters:
posterior: pd.DataFrame

DataFrame containing the posterior samples

selection: vt_helper.InjectionResamplingVT
Object that computes:
  • the mean and variance of the survey completeness

  • the total surveyed 4-volume weighted by the redshift distribution