firecrown.models.two_point

TwoPoint theory support.

Classes

TwoPointTheory

Making predictions for TwoPoint statistics.

Functions

determine_ccl_kind(sacc_data_type)

Determine the CCL kind for this SACC data type.

calculate_pk(pk_name, tools, tracer0, tracer1)

Return the power spectrum named by pk_name.

at_least_one_tracer_has_hm(tools, tracer0, tracer1)

Compute a power spectrum with the halo model.

at_least_one_tracer_has_pt(tools, tracer0, tracer1)

Compute the power spectrum with the perturbation theory.

Module Contents

firecrown.models.two_point.determine_ccl_kind(sacc_data_type)[source]

Determine the CCL kind for this SACC data type.

Parameters:

sacc_data_type (str) – the name of the SACC data type

Returns:

the CCL kind

Return type:

str

firecrown.models.two_point.calculate_pk(pk_name, tools, tracer0, tracer1)[source]

Return the power spectrum named by pk_name.

If the modeling tools already has the power spectrum, it is returned. If not, is is computed with the help of the modeling tools.

Parameters:
Returns:

The power spectrum.

Return type:

pyccl.Pk2D

firecrown.models.two_point.at_least_one_tracer_has_hm(tools, tracer0, tracer1)[source]

Compute a power spectrum with the halo model.

Parameters:
Returns:

The power spectrum.

Return type:

pyccl.Pk2D

firecrown.models.two_point.at_least_one_tracer_has_pt(tools, tracer0, tracer1)[source]

Compute the power spectrum with the perturbation theory.

If one of the tracers does not have a perturbation theory (PT) tracer, a dummy matter PT tracer is created for it. This is useful for doing cross-correlations between a PT tracer and a non-PT tracer.

Parameters:
Returns:

The power spectrum.

Return type:

pyccl.Pk2D

class firecrown.models.two_point.TwoPointTheory(*, sacc_data_type, sources, ell_or_theta_min=None, ell_or_theta_max=None, ell_for_xi=None, ell_or_theta=None, tracers=None)[source]

Bases: firecrown.updatable.Updatable

Inheritance diagram of firecrown.models.two_point.TwoPointTheory

Making predictions for TwoPoint statistics.

Parameters:
sacc_data_type
ccl_kind = 'cl'
sources
ell_for_xi_config: dict[str, int]
ell_or_theta_config: None | firecrown.generators.two_point.EllOrThetaConfig = None
ell_or_theta_min = None
ell_or_theta_max = None
window: None | numpy.typing.NDArray[numpy.float64] = None
sacc_tracers = None
ells: None | numpy.typing.NDArray[numpy.int64] = None
thetas: None | numpy.typing.NDArray[numpy.float64] = None
mean_ells: None | numpy.typing.NDArray[numpy.float64] = None
ells_for_xi: None | numpy.typing.NDArray[numpy.int64] = None
cells: dict[firecrown.metadata_types.TracerNames, numpy.typing.NDArray[numpy.float64]]
property source0: firecrown.likelihood.source.Source

Return the first source.

Return type:

firecrown.likelihood.source.Source

property source1: firecrown.likelihood.source.Source

Return the second source.

Return type:

firecrown.likelihood.source.Source

initialize_sources(sacc_data)[source]

Initialize this TwoPointTheory’s sources and tracer names.

Parameters:

sacc_data (sacc.Sacc) – The data in the from which we read the data.

Returns:

The tracer names.

Return type:

None

get_tracers_and_scales(tools)[source]

Get tracers and scales for both sources.

Parameters:

tools (firecrown.modeling_tools.ModelingTools) – The modeling tools to use.

Result:

The tracers and scales for both sources.

Return type:

tuple[Sequence[firecrown.likelihood.source.Tracer], float, Sequence[firecrown.likelihood.source.Tracer], float]