Distributions
distributions
¶
Core functions for distributions module.
Functions¶
broken_power_law_log_normalization_constant
¶
broken_power_law_log_normalization_constant(x_min: float, x_max: float, transition: float, alpha_1: float, alpha_2: float) -> jax.Array
Log normalization constant of a broken power law distribution.
References: - GWTC-4.0: Population Properties of Merging Compact Binaries: https://arxiv.org/abs/2508.18083
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x_min
|
float
|
The minimum value of the distribution. |
required |
x_max
|
float
|
The maximum value of the distribution. |
required |
transition
|
float
|
The transition point where the power law changes. |
required |
alpha_1
|
float
|
The power law index for x < transition. |
required |
alpha_2
|
float
|
The power law index for x >= transition. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
The log normalization constant of the distribution. |
broken_power_law_logpdf
¶
broken_power_law_logpdf(x: Array, x_min: float, x_max: float, transition: float, alpha_1: float, alpha_2: float) -> jax.Array
Log probability density function of a broken power law distribution.
References: - GWTC-4.0: Population Properties of Merging Compact Binaries: https://arxiv.org/abs/2508.18083
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Array
|
The input value. |
required |
x_min
|
float
|
The minimum value of the distribution. |
required |
x_max
|
float
|
The maximum value of the distribution. |
required |
transition
|
float
|
The transition point where the power law changes. |
required |
alpha_1
|
float
|
The power law index for x < transition. |
required |
alpha_2
|
float
|
The power law index for x >= transition. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
An array with the log probability density at x. |
broken_power_law_unnormalized_logpdf
¶
broken_power_law_unnormalized_logpdf(x: Array, x_min: float, x_max: float, transition: float, alpha_1: float, alpha_2: float) -> jax.Array
Unnormalized log probability density function of a broken power law distribution.
References: - GWTC-4.0: Population Properties of Merging Compact Binaries: https://arxiv.org/abs/2508.18083
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Array
|
The input value. |
required |
x_min
|
float
|
The minimum value of the distribution. |
required |
x_max
|
float
|
The maximum value of the distribution. |
required |
transition
|
float
|
The transition point where the power law changes. |
required |
alpha_1
|
float
|
The power law index for x < transition. |
required |
alpha_2
|
float
|
The power law index for x >= transition. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
An array with the unnormalized log probability density at x. |
mass_ratio_pairing_cdf
¶
mass_ratio_pairing_cdf(mass_ratio: Array, primary_mass: Array, beta: float, secondary_minimum: float, minimum: float = 0.0) -> Array
Return the normalized conditional pairing CDF P(q' <= q | m1).
mass_ratio_pairing_pdf
¶
mass_ratio_pairing_pdf(mass_ratio: Array, primary_mass: Array, beta: float, secondary_minimum: float, minimum: float = 0.0) -> Array
Return the normalized conditional pairing density p(q | m1).
power_law_plus_peak_cdf
¶
power_law_plus_peak_cdf(mass: Array, alpha: float, minimum: float, maximum: float, lambda_peak: float, peak_mean: float, peak_sigma: float, peak_maximum: float) -> Array
Return the normalized Talbot-Thrane-style power-law-plus-peak CDF.
power_law_plus_peak_pdf
¶
power_law_plus_peak_pdf(mass: Array, alpha: float, minimum: float, maximum: float, lambda_peak: float, peak_mean: float, peak_sigma: float, peak_maximum: float) -> Array
Return the normalized Talbot-Thrane-style power-law-plus-peak density.
planck_tapering_function
¶
planck_tapering_function(x: Array, x_min: float, delta: float) -> Array
Planck tapering function to smoothly transition between 0 and 1.
References: - GWTC-4.0: Population Properties of Merging Compact Binaries: https://arxiv.org/abs/2508.18083
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Array
|
The input value. |
required |
x_min
|
float
|
The minimum value of the transition region. |
required |
delta
|
float
|
The width of the transition region. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
An array with the value of the tapering function at x. |