lfkit.photometry.conditional_lf_models module#
Conditional luminosity function model utilities.
This module provides conditional wrappers around existing LFKit luminosity function models.
A conditional luminosity function has the form Phi(M | x), where M is
absolute magnitude and x is an external conditioning variable. The
conditioning variable is intentionally generic. It may represent redshift,
halo mass, environment, galaxy type, richness, stellar mass, or any other
quantity.
This module does not implement HOD or halo-model machinery.
- lfkit.photometry.conditional_lf_models.conditional_double_schechter(absolute_mag, condition, *, phi_star, m_star, alpha, beta, m_transition)[source]#
Evaluate a conditional double-power-law Schechter luminosity function.
- Parameters:
absolute_mag (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Absolute magnitude value(s).
condition (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Values of the conditioning variable.
phi_star (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Overall normalization. May be scalar, array-like, or callable of
condition.m_star (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Characteristic absolute magnitude. May be scalar, array-like, or callable of
condition.alpha (float) – Bright/intermediate faint-end slope parameter.
beta (float) – Additional faint-end slope modifier.
m_transition (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Transition magnitude. May be scalar, array-like, or callable of
condition.
- Returns:
Conditional double-power-law Schechter luminosity function values.
- Return type:
ndarray[tuple[Any, …], dtype[float64]]
- lfkit.photometry.conditional_lf_models.conditional_evolving_schechter(absolute_mag, condition, *, phi_model='linear_p', phi_kwargs=None, m_star_model='linear_q', m_star_kwargs=None, alpha_model='constant', alpha_kwargs=None)[source]#
Evaluate a conditional Schechter LF using LFKit parameter models.
This is the conditional LF analogue of
evolving_schechter. The conditioning variable is passed to LFKit’s registered parameter models.- Parameters:
absolute_mag (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Absolute magnitude value(s).
condition (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Values of the conditioning variable.
phi_model (str) – Evolution/condition model for
phi_star.phi_kwargs (Mapping[str, float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]] | None) – Keyword arguments passed to the selected
phi_starmodel.m_star_model (str) – Evolution/condition model for
M_star.m_star_kwargs (Mapping[str, float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]] | None) – Keyword arguments passed to the selected
M_starmodel.alpha_model (str) – Evolution/condition model for
alpha.alpha_kwargs (Mapping[str, float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]] | None) – Keyword arguments passed to the selected
alphamodel.
- Returns:
Conditional Schechter luminosity function values.
- Raises:
ValueError – If an unsupported parameter model is requested.
- Return type:
ndarray[tuple[Any, …], dtype[float64]]
- lfkit.photometry.conditional_lf_models.conditional_schechter(absolute_mag, condition, *, phi_star, m_star, alpha)[source]#
Evaluate a conditional Schechter luminosity function.
- Parameters:
absolute_mag (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Absolute magnitude value(s).
condition (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Values of the conditioning variable.
phi_star (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Schechter normalization. May be scalar, array-like, or callable of
condition.m_star (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Characteristic absolute magnitude. May be scalar, array-like, or callable of
condition.alpha (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Faint-end slope. May be scalar, array-like, or callable of
condition.
- Returns:
Conditional Schechter luminosity function values.
- Return type:
ndarray[tuple[Any, …], dtype[float64]]
- lfkit.photometry.conditional_lf_models.lognormal_conditional_lf(absolute_mag, condition, *, mean_absolute_mag, sigma_log_luminosity, amplitude=1.0)[source]#
Evaluate a lognormal conditional luminosity function in magnitudes.
- Parameters:
absolute_mag (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Absolute magnitude value(s).
condition (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Values of the conditioning variable.
mean_absolute_mag (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Mean absolute magnitude. May be scalar, array-like, or callable of
condition.sigma_log_luminosity (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Scatter in
log10(L)at fixed condition. May be scalar, array-like, or callable ofcondition.amplitude (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Non-negative amplitude of the component. May be scalar, array-like, or callable of
condition.
- Returns:
Lognormal conditional luminosity function values.
- Return type:
ndarray[tuple[Any, …], dtype[float64]]
- lfkit.photometry.conditional_lf_models.modified_schechter_conditional_lf(absolute_mag, condition, *, phi_star, m_star, alpha)[source]#
Evaluate a modified Schechter conditional luminosity function.
This uses a squared exponential cutoff in luminosity ratio instead of the standard Schechter exponential cutoff.
- Parameters:
absolute_mag (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Absolute magnitude value(s).
condition (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Values of the conditioning variable.
phi_star (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Component normalization.
m_star (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Characteristic absolute magnitude.
alpha (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Faint-end slope.
- Returns:
Modified Schechter conditional luminosity function values.
- Return type:
ndarray[tuple[Any, …], dtype[float64]]
- lfkit.photometry.conditional_lf_models.two_component_conditional_lf(absolute_mag, condition, *, lognormal_mean_absolute_mag, lognormal_sigma_log_luminosity, modified_phi_star, modified_alpha, lognormal_amplitude=1.0, modified_m_star=None, modified_luminosity_fraction=0.562)[source]#
Evaluate the sum of lognormal and modified Schechter components.
- Parameters:
absolute_mag (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Absolute magnitude value(s).
condition (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]) – Values of the conditioning variable.
lognormal_mean_absolute_mag (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Mean absolute magnitude of the lognormal component. May be scalar, array-like, or callable of
condition.lognormal_sigma_log_luminosity (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Scatter in
log10(L)for the lognormal component. May be scalar, array-like, or callable ofcondition.modified_phi_star (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Normalization of the modified Schechter component. May be scalar, array-like, or callable of
condition.modified_alpha (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Faint-end slope of the modified Schechter component. May be scalar, array-like, or callable of
condition.lognormal_amplitude (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Non-negative amplitude of the lognormal component. May be scalar, array-like, or callable of
condition.modified_m_star (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]] | None) – Characteristic absolute magnitude of the modified Schechter component. If omitted, it is derived from
lognormal_mean_absolute_magandmodified_luminosity_fraction.modified_luminosity_fraction (float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] | Callable[[ndarray[tuple[Any, ...], dtype[float64]]], float | Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]]]) – Ratio used to derive the modified Schechter characteristic luminosity from the lognormal mean luminosity when
modified_m_staris omitted.
- Returns:
Combined conditional luminosity function values.
- Return type:
ndarray[tuple[Any, …], dtype[float64]]