ler.gw_source_population.powerlaw_plus_peak

Module Contents

Functions

powerlaw_plus_peak_unnormalized(m[, mminbh, mmaxbh, ...])

Compute unnormalized PDF for power-law + Gaussian model.

powerlaw_plus_peak_pdf(m[, mminbh, mmaxbh, alpha, ...])

Evaluate fully normalized primary-mass probability density (power-law + Gaussian model).

powerlaw_plus_peak_cdf(size[, mminbh, mmaxbh, alpha, ...])

Compute cumulative distribution function for power-law + Gaussian mass model.

powerlaw_plus_peak_function(m[, mminbh, mmaxbh, ...])

Evaluate the redshift-dependent merger rate density for the power-law + Gaussian mass model.

powerlaw_plus_peak_rvs(size[, mminbh, mmaxbh, alpha, ...])

Generate random samples from the power-law + Gaussian mass distribution.

ler.gw_source_population.powerlaw_plus_peak.powerlaw_plus_peak_unnormalized(m, mminbh=4.98, mmaxbh=112.5, alpha=3.78, mu_g=32.27, sigma_g=3.88, lambda_peak=0.003, delta_m=4.8)[source]

Compute unnormalized PDF for power-law + Gaussian model.

Evaluates the unnormalized mixture of power-law and Gaussian distributions with low-mass smoothing applied, prior to normalization.

Parameters:
mnumpy.ndarray

Mass values (solar masses).

mminbhfloat

Minimum BH mass (solar masses).

mmaxbhfloat

Maximum BH mass (solar masses).

alphafloat

Power-law spectral index.

mu_gfloat

Mean of Gaussian peak (solar masses).

sigma_gfloat

Standard deviation of Gaussian peak (solar masses).

lambda_peakfloat

Fraction in Gaussian component (0-1).

delta_mfloat

Smoothing width (solar masses).

Returns:
densitynumpy.ndarray

Unnormalized probability density values.

ler.gw_source_population.powerlaw_plus_peak.powerlaw_plus_peak_pdf(m, mminbh=4.98, mmaxbh=112.5, alpha=3.78, mu_g=32.27, sigma_g=3.88, lambda_peak=0.003, delta_m=4.8, normalization_size=500)[source]

Evaluate fully normalized primary-mass probability density (power-law + Gaussian model).

Computes the normalized PDF combining a power-law distribution with a single Gaussian peak for black hole primary masses.

Parameters:
mnumpy.ndarray

Mass values to evaluate (solar masses).

mminbhfloat

Minimum BH mass (solar masses).

mmaxbhfloat

Maximum BH mass (solar masses).

alphafloat

Power-law spectral index for the power-law component.

mu_gfloat

Mean of the Gaussian peak (solar masses).

sigma_gfloat

Standard deviation of the Gaussian peak (solar masses).

lambda_peakfloat

Fraction of sources in the Gaussian component (0-1).

delta_mfloat

Low-mass smoothing width (solar masses).

normalization_sizeint

Grid size for normalization. default: 500

Returns:
pdfnumpy.ndarray

Normalized probability density values.

Examples

>>> from ler.gw_source_population.prior_functions import powerlaw_plus_peak_pdf
>>> import numpy as np
>>> m = np.array([20.0, 40.0, 60.0])
>>> pdf_values = powerlaw_plus_peak_pdf(m, mminbh=5, mmaxbh=100, alpha=2.3, mu_g=50, sigma_g=10, lambda_peak=0.1, delta_m=5)
>>> print(pdf_values)
ler.gw_source_population.powerlaw_plus_peak.powerlaw_plus_peak_cdf(size, mminbh=4.98, mmaxbh=112.5, alpha=3.78, mu_g=32.27, sigma_g=3.88, lambda_peak=0.003, delta_m=4.8)[source]

Compute cumulative distribution function for power-law + Gaussian mass model.

Evaluates the CDF using numerical integration for primary mass distribution.

Parameters:
sizeint

Number of grid points for CDF computation.

mminbhfloat

Minimum BH mass (solar masses).

mmaxbhfloat

Maximum BH mass (solar masses).

alphafloat

Power-law spectral index.

mu_gfloat

Mean of the Gaussian peak (solar masses).

sigma_gfloat

Standard deviation of the Gaussian peak (solar masses).

lambda_peakfloat

Fraction in Gaussian component (0-1).

delta_mfloat

Low-mass smoothing width (solar masses).

Returns:
cdf_valuesnumpy.ndarray

Normalized CDF values at each grid point.

ler.gw_source_population.powerlaw_plus_peak.powerlaw_plus_peak_function(m, mminbh=4.98, mmaxbh=112.5, alpha=3.78, mu_g=32.27, sigma_g=3.88, lambda_peak=0.003, delta_m=4.8, normalization_size=500, R0=16.158, kappa=3.166, z_eval=0.2)[source]

Evaluate the redshift-dependent merger rate density for the power-law + Gaussian mass model. Combines the normalized mass distribution with a redshift evolution model to compute the merger rate density as a function of mass and redshift.

Parameters:
mnumpy.ndarray

Mass values to evaluate (solar masses).

mminbhfloat

Minimum BH mass (solar masses).

mmaxbhfloat

Maximum BH mass (solar masses).

alphafloat

Power-law spectral index for the mass distribution.

mu_gfloat

Mean of the Gaussian peak (solar masses).

sigma_gfloat

Standard deviation of the Gaussian peak (solar masses).

lambda_peakfloat

Fraction of sources in the Gaussian component (0-1).

delta_mfloat

Low-mass smoothing width (solar masses).

normalization_sizeint

Grid size for normalization of the mass distribution. default: 500

R0float

Local merger rate density at z=0 (Gpc^-3 yr^-1). default: 16.158

kappafloat

Power-law index for redshift evolution of the merger rate. default: 3.166

z_evalfloat

Redshift at which to evaluate the merger rate density. default: 0.2

Returns:
rate_densitynumpy.ndarray

Merger rate density as a function of mass at the specified redshift (Gpc^-3 yr^-1 Msun^-1).

ler.gw_source_population.powerlaw_plus_peak.powerlaw_plus_peak_rvs(size, mminbh=4.98, mmaxbh=112.5, alpha=3.78, mu_g=32.27, sigma_g=3.88, lambda_peak=0.003, delta_m=4.8, normalization_size=500)[source]

Generate random samples from the power-law + Gaussian mass distribution.

Parameters:
sizeint

Number of samples to draw.

mminbhfloat

Minimum BH mass (solar masses).

mmaxbhfloat

Maximum BH mass (solar masses).

alphafloat

Power-law spectral index for the power-law component.

mu_gfloat

Mean of the Gaussian peak (solar masses).

sigma_gfloat

Standard deviation of the Gaussian peak (solar masses).

lambda_peakfloat

Fraction of sources in the Gaussian component (0-1).

delta_mfloat

Low-mass smoothing width (solar masses).

normalization_sizeint

Grid size for CDF computation. default: 500

Returns:
samplesnumpy.ndarray

Mass samples drawn from the specified distribution (solar masses).