py21cmfast.wrapper.compute_luminosity_function(*, redshifts, user_params=None, cosmo_params=None, astro_params=None, flag_options=None, nbins=100, mturnovers=None, mturnovers_mini=None, component=0)[source]

Compute a the luminosity function over a given number of bins and redshifts.

  • redshifts (array-like) – The redshifts at which to compute the luminosity function.

  • user_params (UserParams, optional) – Defines the overall options and parameters of the run.

  • cosmo_params (CosmoParams, optional) – Defines the cosmological parameters used to compute initial conditions.

  • astro_params (AstroParams, optional) – The astrophysical parameters defining the course of reionization.

  • flag_options (FlagOptions, optional) – Some options passed to the reionization routine.

  • nbins (int, optional) – The number of luminosity bins to produce for the luminosity function.

  • mturnovers (array-like, optional) – The turnover mass at each redshift for massive halos (ACGs). Only required when USE_MINI_HALOS is True.

  • mturnovers_mini (array-like, optional) – The turnover mass at each redshift for minihalos (MCGs). Only required when USE_MINI_HALOS is True.

  • component (int, optional) – The component of the LF to be calculated. 0, 1 an 2 are for the total, ACG and MCG LFs respectively, requiring inputs of both mturnovers and mturnovers_MINI (0), only mturnovers (1) or mturnovers_MINI (2).


  • Muvfunc (np.ndarray) – Magnitude array (i.e. brightness). Shape [nredshifts, nbins]

  • Mhfunc (np.ndarray) – Halo mass array. Shape [nredshifts, nbins]

  • lfunc (np.ndarray) – Number density of haloes corresponding to each bin defined by Muvfunc. Shape [nredshifts, nbins].