py21cmmc.core.CoreLuminosityFunction#

class py21cmmc.core.CoreLuminosityFunction(sigma=None, name='', cosmo_params=None, n_muv_bins=100, **kwargs)[source]#

A Core Module that produces model luminosity functions at a range of redshifts.

Notes

This core is vectorized i.e., it accepts an array of astro_params.

Parameters:

sigma (float, callable, list of callables, or array_like) – The standard deviation on the luminosity function measurement. If a float, it is considered to be the standard deviation for all redshifts and luminosity bins. If a 1D array, it is assumed to be a function of luminosity, and must have the same length as the output luminosity from py21cmfast.wrapper.compute_luminosity_function(). If a callable, assumed to take a single argument – a UV magitude array – and return the standard deviation (the same for all redshifts). If a list of callables, must be the same length as redshift, with each callable having the same signature as already described. If a 2D array, must have shape (n_redshifts, n_luminosity_bins).

Other Parameters:

**kwargs – All other parameters are the same as CoreCoevalModule.

Methods

__init__([sigma, name, cosmo_params, n_muv_bins])

build_model_data(ctx)

Compute all data defined by this core and add it to the context.

convert_model_to_mock(ctx)

Update context entries for luminosity function to have randomness.

prepare_storage(ctx, storage)

Add variables to dict which cosmoHammer will automatically store with the chain.

run(astro_params, cosmo_params, ctx)

Return the luminosity function for given parameters.

setup()

Run post-init setup.

simulate_mock(ctx)

Generate all mock data and add it to the context.

Attributes

chain

Reference to the LikelihoodComputationChain containing this core.

core_primary

The first core that appears in the requirements.

parameter_names

Names of the parameters of the full chain.

required_cores

sigma

Either a list of callables, or list/array of arrays.