firecrown.modeling_tools.ModelingTools
- class firecrown.modeling_tools.ModelingTools(*, pt_calculator=None)[source]
Bases:
object
A class that bundles together a pyccl.Cosmology object and associated objects, such as perturbation theory or halo model calculator workspaces.
- Parameters
pt_calculator (
Optional
[PTCalculator
]) –
Public Methods:
__init__
(*[, pt_calculator])- param pt_calculator
add_pk
(name, powerspectrum)Add a pyccl.Pk2D to the table of power spectra.
get_pk
(name)Retrive a pyccl.Pk2D from the table of power spectra, or fall back to what the pyccl.Cosmology object can provide.
has_pk
(name)Check if a power spectrum with name `name' is available.
prepare
(ccl_cosmo)Prepare the Cosmology for use in likelihoods.
reset
()Resets all CCL objects in ModelingTools.
Return the CCL cosmology object.
Return the perturbation theory calculator object.
- add_pk(name, powerspectrum)[source]
Add a pyccl.Pk2D to the table of power spectra.
- Parameters
name (
str
) –powerspectrum (
Pk2D
) –
- get_pk(name)[source]
Retrive a pyccl.Pk2D from the table of power spectra, or fall back to what the pyccl.Cosmology object can provide.
- Parameters
name (
str
) –- Return type
Pk2D
- get_pt_calculator()[source]
Return the perturbation theory calculator object.
- Return type
PTCalculator
- has_pk(name)[source]
Check if a power spectrum with name `name’ is available.
- Parameters
name (
str
) –- Return type
bool
- prepare(ccl_cosmo)[source]
Prepare the Cosmology for use in likelihoods.
This method will prepare the ModelingTools for use in likelihoods. This includes building the perturbation theory and halo model calculators if they are needed.
- Parameters
ccl_cosmo (
Cosmology
) – the current CCL cosmology object- Return type
None