popsynth.distributions.uniform_distribution module

class popsynth.distributions.uniform_distribution.LogUniLuminiosityDistribution(seed: int = 1234, name: str = 'logunilum')[source]

Bases: LuminosityDistribution

Lmin
Lmax
__init__(seed: int = 1234, name: str = 'logunilum')[source]

A broken power law luminosity distribution.

L ~ L^``alpha`` for L <= Lbreak L ~ L^``beta`` for L > Lbreak

Parameters
  • seed (int) – Random seed

  • name (str) – Name of the distribution

  • Lmin (DistributionParameter) – Minimum value of the luminosity

  • Lmax (DistributionParameter) – Maximum value of the luminosity

phi(L)[source]

The functional form of the distribution. not required for sampling :param luminosity: Luminosity

draw_luminosity(size=1)[source]

function to draw the luminosity via an alternative method must be implemented in child class

Parameters

size

Returns

class popsynth.distributions.uniform_distribution.UniformCosmoDistribution(seed: int = 1234, name: str = 'uniform_cosmo', is_rate: bool = True)[source]

Bases: CosmologicalDistribution

r0
zmin
zmax
__init__(seed: int = 1234, name: str = 'uniform_cosmo', is_rate: bool = True)[source]

A cosmological distribution where the density evolves uniformly.

Lambda (1+z)^``delta``

Parameters
  • seed (int) – Random seed

  • name (str) – Name of the distribution

  • is_rate (bool) – True if modelling a population of transient events, False if modelling a population of steady-state objects. Affects the time_adjustment method used in cosmo calculations. Default is True.

  • Lambda (DistributionParameter) – The local density in units of Gpc^-3

  • delta (DistributionParameter) – The index of the power law

dNdV(distance)[source]

The differential number of objects per volume element

Parameters

distance

Returns