IntermediateSpectroObservable#

class cosmicjellyfish.LSSsurvey.gcsp_intermediate.IntermediateSpectroObservable(base, include_nonlinear=False)[source]#

Bases: object

Spectroscopic galaxy-clustering observable in intermediate parameters.

Parameters:
  • base (JaxSpectroObservable) – Validated differentiable observable. Its grids, theory object, fiducial background quantities, bias model and no-wiggle operator are reused.

  • include_nonlinear (bool, optional) – If true, add the de-wiggling and fingers-of-god velocity dispersions per bin as free log-parameters. The default is false, matching the fiducial-moment approximation of the validated observable.

Notes

The intermediate parameter vector is ordered as the four shape parameters (omegab, h, omegam, ns), with \(\omega_i = \Omega_i h^2\), followed by the redshift-bin blocks [lnDA_i, lnH_i, lnfs8_i, lnbs8_i, Ps_i] and, when enabled, [lnsigmav_i, lnsigmap_i]. Shot noise is always present as an intermediate parameter; its fiducial value is read from the base observable when available and is zero otherwise.

property parameter_names: tuple[str, ...]#

Names of the intermediate parameters, in vector order.

fiducial_params()[source]#

Fiducial intermediate parameters derived from the base cosmology.

Return type:

dict[str, float]

fiducial_vector()[source]#

Fiducial intermediate parameter vector.

Return type:

ndarray

to_vector(overrides=None)[source]#

Return the fiducial vector with a subset of parameters replaced.

Return type:

ndarray

lnp_vector(vector)[source]#

Log observed power spectrum for an intermediate parameter vector.

Return type:

ndarray

lnp(overrides=None)[source]#

Log observed power spectrum as the base observable’s per-bin dictionary.

Return type:

dict[str, ndarray]

jacobian_ad(names=None)[source]#

Derivatives of ln P from JAX reverse/forward autodiff.

Return type:

dict[str, ndarray]

jacobian_fd(names=None, step=5e-06, background_step=5e-06, analytic_shot_noise=True)[source]#

Paper-style finite-difference derivatives of ln P.

Three-point central differences are used for the shape parameters (with a relative step, \(\theta(1\pm\epsilon)\)) and for the log growth, log bias and log velocity-dispersion parameters (with an absolute step in the logarithm). The background parameters \(\ln D_A\) and \(\ln H\) use the paper’s five-point rule. The shot-noise derivative is analytic, \(\partial \ln P_{\rm obs}/\partial P_s = 1/P_{\rm obs}\).

The no-wiggle spectrum is interpolated linearly in \(k\), so the step is much smaller than the paper’s recommended range: a step of \(10^{-3}\) crosses interpolation nodes and biases the derivatives at the per-mille level. With the defaults used here the finite-difference and autodiff derivatives agree to about \(10^{-10}\) in relative terms on the validation grid.

Return type:

dict[str, ndarray]