py21cmmc.likelihood.LikelihoodBase.reduce_data#

LikelihoodBase.reduce_data(ctx)[source]#

Perform reduction on raw data (from all cores in the chain).

This should perform whatever reduction operations are required on the real/mock data to obtain the form used directly in the likelihood. That is, keep in mind that this method will be called on mock data produced by the core modules in this chain to obtain the static data which is used in the likelihood. In this regard it is called, if applicable, once at setup(). For efficiency then, this method should reduce the data as far as possible so that no un-necessary calculations are required per-iteration.

Furthermore, it should be a deterministic calculation.

Parameters:

ctx ; dict-like – A context filled with model data from all cores in the chain. Specifically, this is the context obtained by using the __call__ method of each core in sequence.

Returns:

model (dict) – A dictionary containing all reduced quantities required for obtaining the likelihood.