firecrown.models.two_point
TwoPoint theory support.
Classes
Making predictions for TwoPoint statistics. |
Functions
|
Determine the CCL kind for this SACC data type. |
|
Return the power spectrum named by pk_name. |
|
Compute a power spectrum with the halo model. |
|
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:
pk_name (str) – The name of the power spectrum to return.
tools (firecrown.modeling_tools.ModelingTools) – The modeling tools to use.
tracer0 (firecrown.likelihood.source.Tracer) – The first tracer to use.
tracer1 (firecrown.likelihood.source.Tracer) – The second tracer to use.
- 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:
tools (firecrown.modeling_tools.ModelingTools) – The modeling tools to use.
tracer0 (firecrown.likelihood.source.Tracer) – The first tracer to use.
tracer1 (firecrown.likelihood.source.Tracer) – The second tracer to use.
- 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:
tools (firecrown.modeling_tools.ModelingTools) – The modeling tools to use.
tracer0 (firecrown.likelihood.source.Tracer) – The first tracer to use.
tracer1 (firecrown.likelihood.source.Tracer) – The second tracer to use.
- Returns:
The power spectrum.
- Return type:
pyccl.Pk2D
- class firecrown.models.two_point.TwoPointTheory(*, sacc_data_type, sources, interp_ells_gen=LogLinearElls(), ell_or_theta=None, tracers=None, int_options=None)[source]
Bases:
firecrown.updatable.Updatable
Making predictions for TwoPoint statistics.
- Parameters:
sacc_data_type (str)
sources (tuple[firecrown.likelihood.source.Source, firecrown.likelihood.source.Source])
interp_ells_gen (firecrown.generators.two_point.LogLinearElls)
ell_or_theta (None | firecrown.generators.two_point.EllOrThetaConfig)
tracers (None | firecrown.metadata_types.TracerNames)
int_options (firecrown.utils.ClIntegrationOptions | None)
- sacc_data_type
- ccl_kind = 'cl'
- sources
- interp_ells_gen
- ell_or_theta_config: None | firecrown.generators.two_point.EllOrThetaConfig = 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
- cells: dict[firecrown.metadata_types.TracerNames, numpy.typing.NDArray[numpy.float64]]
- ells_for_xi: numpy.typing.NDArray[numpy.int64]
- int_options = None
- property source0: firecrown.likelihood.source.Source[source]
Return the first source.
- Return type:
- property source1: firecrown.likelihood.source.Source[source]
Return the second source.
- Return type:
- 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]