JaxCosmoTheory#

class cosmicjellyfish.cosmology.jaxcosmo_theory.JaxCosmoTheory(backend_parameters=None, cosmo_model='LCDM')[source]#

Bases: object

jax_cosmo implementation of cosmicjellyfish.cosmology.jax_theory.JaxTheory.

This is the adapter that lets backend-agnostic JAX observables request theory tables without importing jax_cosmo themselves.

Parameters:
  • backend_parameters (mapping, optional) – Parsed default_boltzmann_yaml_files/jaxcosmo/default.yaml. The ACCURACY block configures the transfer function, the Halofit prescription and the distance ODE, and NUMERICS['x64'] enables double precision.

  • cosmo_model (str) – "LCDM" or "w0waCDM". LCDM fixes w0 = -1 and wa = 0.

resolve_cosmology(params)[source]#

Resolve CosmicJellyfish parameter names into canonical floats (massless neutrinos).

Return type:

dict[str, float]

tables(params, z, k_hmpc, nonlinear=True)[source]#

Evaluate the jax_cosmo theory on (z, k_hmpc), in CosmicJellyfish units.

Return type:

TheoryTables

power(params, z, k_hmpc, nonlinear=True)[source]#

Matter power at per-redshift wavenumbers, in Mpc^3.

Unlike tables(), this evaluates the transfer function and Halofit directly at the requested k values instead of interpolating a fixed wavenumber grid. That removes the slope kinks of the interpolation, which is what makes finite differences of the projected spectra converge slowly.

Return type:

ndarray