lfkit.luminosity_functions.integrals#

Luminosity-function integration utilities.

This module provides generic numerical integrals of luminosity function callables over finite absolute magnitude ranges.

The core API accepts a luminosity function callable with signature

lf(absolute_mag, z)

where absolute_mag and z are NumPy arrays that can be broadcast together. This keeps the integration machinery independent of any specific luminosity function parameterization, catalog selection, or cosmology backend.

The helper _bind_lf converts model functions with fixed parameters into this common callable form. Static luminosity functions that do not depend on redshift can be wrapped with _bind_static_lf.

These helpers are intentionally generic. Catalog completeness, LF-dependent redshift densities, luminosity-density calculations, selection fractions, and selection-weighted integrals can all call this module instead of duplicating magnitude-grid logic.

Functions

cumulative_number_density(z, lf, *, ...[, ...])

Return cumulative LF number density around a magnitude threshold.

cumulative_selection_function(z, lf, *, ...)

Return the cumulative LF selection fraction around a threshold.

integrated_luminosity_density(z, lf, *, ...)

Return luminosity density from a luminosity function.

integrated_number_density(z, lf, *, ...[, n_m])

Return finite-range number density from a luminosity function.

lf_weighted_integral(z, lf, *, m_bright, ...)

Return a weighted luminosity function integral.

luminosity_weight(absolute_mag[, _z, ...])

Return relative luminosity weights for absolute magnitudes.

magnitude_window_number_density(z, lf, *[, ...])

Return LF number density inside a magnitude-selection window.

mean_luminosity(z, lf, *, m_bright, m_faint)

Return mean luminosity over a finite magnitude range.

selection_fraction(z, lf, *, ...[, n_m])

Return the fraction of LF number density inside a selected window.

selection_weighted_number_density(z, lf, *, ...)

Return number density weighted by a selection function.