plima.models.la#

Linear alignment intrinsic alignment models.

This module provides small composable functions for linear alignment LA intrinsic alignment calculations. The amplitude functions define different redshift, halo mass, or luminosity function dependent IA normalizations. The spectrum functions then convert those amplitudes into matter intrinsic and intrinsic intrinsic power spectra using the standard LA response.

The functions are backend independent. They do not require CCL or any other cosmology package. Callers provide the linear matter power spectrum, growth factor, and cosmological density parameter explicitly.

Functions

la_amplitude(z, *, a_ia)

Return a constant LA amplitude on a redshift grid.

la_mass_amplitude(*, a_ia, red_fraction, ...)

Return a galaxy type and halo mass dependent LA amplitude.

la_response(growth_factor, omega_m, *, amplitude)

Return the LA response multiplying the linear matter power spectrum.

la_z_amplitude(z, *, a_ia, b_ia[, ...])

Return the KiDS style redshift dependent LA amplitude.

lf_la_amplitude(z, ...[, red_fraction, ...])

Return a luminosity function weighted LA amplitude.

p_delta_i_la(linear_matter_power, ...[, ...])

Return the LA matter intrinsic power spectrum.

p_ii_la(linear_matter_power, growth_factor, ...)

Return the LA intrinsic intrinsic power spectrum.

red_fraction_from_luminosity_functions(z, *, ...)

Return the red galaxy fraction using LFKit luminosity functions.

plima.models.la.la_amplitude(z, *, a_ia)[source]#

Return a constant LA amplitude on a redshift grid.

Parameters:
  • z (ArrayLike) – Redshift values where the amplitude should be evaluated.

  • a_ia (float) – Constant intrinsic alignment amplitude.

Returns:

Array with the same shape as z containing the constant amplitude.

Raises:

ValueError – If any redshift value is not finite.

Return type:

ndarray[tuple[Any, …], dtype[float64]]

plima.models.la.la_mass_amplitude(*, a_ia, red_fraction, halo_mass, beta, pivot_halo_mass=31622776601683.793)[source]#

Return a galaxy type and halo mass dependent LA amplitude.

Parameters:
  • a_ia (float) – Overall intrinsic alignment amplitude.

  • red_fraction (ArrayLike) – Red galaxy fraction for each sample, bin, or object.

  • halo_mass (ArrayLike) – Halo mass values.

  • beta (float) – Power law dependence of the IA amplitude on halo mass.

  • pivot_halo_mass (float) – Pivot halo mass used to normalize the mass scaling.

Returns:

LA amplitude weighted by red fraction and halo mass.

Raises:
  • ValueError – If red_fraction is outside the interval from zero to one.

  • ValueError – If any halo mass value is not positive.

  • ValueError – If pivot_halo_mass is not positive.

Return type:

ndarray[tuple[Any, …], dtype[float64]]

plima.models.la.la_response(growth_factor, omega_m, *, amplitude, c1_rho_critical=0.0134)[source]#

Return the LA response multiplying the linear matter power spectrum.

Parameters:
  • growth_factor (ArrayLike) – Linear growth factor evaluated at the redshifts of interest.

  • omega_m (float) – Present day matter density fraction.

  • amplitude (ArrayLike | float) – LA amplitude. This may be a scalar or an array matching the shape of growth_factor.

  • c1_rho_critical (float) – Conventional LA normalization C1 * rho_crit.

Returns:

LA response factor used in P_deltaI = response * P_linear.

Raises:
  • ValueError – If any growth factor value is not positive.

  • ValueError – If omega_m is not positive.

  • ValueError – If c1_rho_critical is not positive.

Return type:

ndarray[tuple[Any, …], dtype[float64]]

plima.models.la.la_z_amplitude(z, *, a_ia, b_ia, pivot_redshift=0.62)[source]#

Return the KiDS style redshift dependent LA amplitude.

Parameters:
  • z (ArrayLike) – Redshift values where the amplitude should be evaluated. Values may be negative for future scale factors, but must be greater than -1.

  • a_ia (float) – Intrinsic alignment amplitude at the pivot redshift.

  • b_ia (float) – Linear scale factor dependence of the IA amplitude.

  • pivot_redshift (float) – Pivot redshift used to define the redshift dependence. This may be negative, but must be greater than -1.

Returns:

Redshift dependent LA amplitude evaluated at z.

Raises:
  • ValueError – If any redshift value is less than or equal to -1.

  • ValueError – If pivot_redshift is less than or equal to -1.

Return type:

ndarray[tuple[Any, …], dtype[float64]]

plima.models.la.lf_la_amplitude(z, luminosity_weighted_average, *, a_ia, red_fraction=1.0, eta_low_z=0.0, eta_high_z=0.0, low_z_pivot=0.3, high_z_pivot=0.75)[source]#

Return a luminosity function weighted LA amplitude.

Parameters:
  • z (ArrayLike) – Redshift values where the amplitude should be evaluated. Values may be negative for future scale factors, but must be greater than -1.

  • luminosity_weighted_average (ArrayLike) – Luminosity dependent IA weight, usually computed from a luminosity function or galaxy sample.

  • a_ia (float) – Overall intrinsic alignment amplitude.

  • red_fraction (ArrayLike | float) – Red galaxy fraction multiplying the IA amplitude.

  • eta_low_z (float) – Power law redshift evolution applied at all redshifts.

  • eta_high_z (float) – Additional high redshift power law evolution.

  • low_z_pivot (float) – Pivot redshift for the low redshift evolution term. This may be negative, but must be greater than -1.

  • high_z_pivot (float) – Redshift above which the high redshift evolution term is applied. This may be negative, but must be greater than -1.

Returns:

Redshift, red fraction, and luminosity weighted LA amplitude.

Raises:
  • ValueError – If any redshift value is less than or equal to -1.

  • ValueError – If either redshift pivot is less than or equal to -1.

  • ValueError – If red_fraction is outside the interval from zero to one.

Return type:

ndarray[tuple[Any, …], dtype[float64]]

plima.models.la.p_delta_i_la(linear_matter_power, growth_factor, omega_m, *, amplitude, c1_rho_critical=0.0134)[source]#

Return the LA matter intrinsic power spectrum.

Parameters:
  • linear_matter_power (ArrayLike) – Linear matter power spectrum values.

  • growth_factor (ArrayLike) – Linear growth factor evaluated consistently with linear_matter_power.

  • omega_m (float) – Present day matter density fraction.

  • amplitude (ArrayLike | float) – LA amplitude. This may be a scalar or an array matching linear_matter_power.

  • c1_rho_critical (float) – Conventional LA normalization C1 * rho_crit.

Returns:

Matter intrinsic power spectrum predicted by the LA model.

Raises:
  • ValueError – If any linear matter power value is not finite.

  • ValueError – If any growth factor value is not positive.

Return type:

ndarray[tuple[Any, …], dtype[float64]]

plima.models.la.p_ii_la(linear_matter_power, growth_factor, omega_m, *, amplitude, c1_rho_critical=0.0134)[source]#

Return the LA intrinsic intrinsic power spectrum.

Parameters:
  • linear_matter_power (ArrayLike) – Linear matter power spectrum values.

  • growth_factor (ArrayLike) – Linear growth factor evaluated consistently with linear_matter_power.

  • omega_m (float) – Present day matter density fraction.

  • amplitude (ArrayLike | float) – LA amplitude. This may be a scalar or an array matching linear_matter_power.

  • c1_rho_critical (float) – Conventional LA normalization C1 * rho_crit.

Returns:

Intrinsic intrinsic power spectrum predicted by the LA model.

Raises:
  • ValueError – If any linear matter power value is not finite.

  • ValueError – If any growth factor value is not positive.

Return type:

ndarray[tuple[Any, …], dtype[float64]]

plima.models.la.red_fraction_from_luminosity_functions(z, *, red_lf, all_lf, m_bright, m_faint, n_m=512)[source]#

Return the red galaxy fraction using LFKit luminosity functions.

Parameters:
  • z (ArrayLike) – Redshift values where the red fraction should be evaluated.

  • red_lf (Any) – LFKit luminosity function for the red galaxy population.

  • all_lf (Any) – LFKit luminosity function or callable for the full galaxy population.

  • m_bright (float) – Bright absolute magnitude limit.

  • m_faint (float) – Faint absolute magnitude limit.

  • n_m (int) – Number of magnitude samples used by LFKit for the integral.

Returns:

Red galaxy fraction evaluated at each redshift.

Raises:
  • ValueError – If any redshift value is less than or equal to -1.

  • ValueError – If m_faint is not greater than m_bright.

  • ValueError – If n_m is less than two.

  • ValueError – If LFKit returns values outside the interval from zero to one.

Return type:

ndarray[tuple[Any, …], dtype[float64]]