GCspIntermediateForecast#

class cosmicjellyfish.LSSsurvey.gcsp_intermediate.GCspIntermediateForecast(options=None, fiducialpars=None, freepars=None, surveyName='Euclid', cosmoModel='LCDM', specifications=None, include_nonlinear=False, fisher=None)[source]#

Bases: object

End-to-end intermediate-parameter Fisher forecast for GCsp.

Parameters:
  • options (dict, optional) – CosmicJellyfish options. code is forced to "jaxcosmo" and the default is {"code": "jaxcosmo", "nonlinear": True, "feedback": 0}.

  • fiducialpars (dict, optional) – Fiducial cosmological parameters passed to FisherMatrix.

  • freepars (dict, optional) – Free final parameters and relative steps. The default is {"10^9As": 0.01, "Omegam": 0.01, "Omegab": 0.01, "h": 0.01, "ns": 0.01}, plus w0 and wa for cosmoModel="w0waCDM".

  • surveyName (str, optional) – Survey specification name. The default is "Euclid".

  • cosmoModel (str, optional) – "LCDM" or "w0waCDM". The default is "LCDM".

  • specifications (dict, optional) – Survey specification overrides.

  • include_nonlinear (bool, optional) – Whether to keep the velocity dispersions as free intermediate parameters.

  • fisher (FisherMatrix, optional) – Pre-built Fisher matrix configuration. When omitted one is constructed from the arguments above.

base#

Validated observable used as the reference at the fiducial point.

Type:

JaxSpectroObservable

intermediate#

Observable expressed in intermediate parameters.

Type:

IntermediateSpectroObservable

fisher#

Configuration object providing grids, specifications and the fiducial cosmology.

Type:

FisherMatrix

pk_cov#

Spectroscopic covariance used for the effective volume.

Type:

SpectroCov

fisher_intermediate(method='ad', derivatives=None)[source]#

Assemble the Fisher matrix of the intermediate parameters.

Parameters:
  • method ({"ad", "fd"}, optional) – Derivative engine used when derivatives is not supplied.

  • derivatives (dict, optional) – Pre-computed derivatives keyed by intermediate parameter name.

Returns:

Fisher matrix in the order of IntermediateSpectroObservable.parameter_names.

Return type:

numpy.ndarray

nuisance_indices()[source]#

Indices of the intermediate parameters marginalised by default.

Return type:

list[int]

static marginalize(fisher, indices)[source]#

Marginalise a Fisher matrix over indices via the Schur complement.

Return type:

tuple[ndarray, list[int]]

reduced_fisher(method='ad', fisher=None)[source]#

Intermediate Fisher matrix marginalised over b sigma8 and shot noise.

Return type:

tuple[ndarray, tuple[str, ...]]

final_fiducial_vector(final_names=None)[source]#

Fiducial values of the final parameters in CosmicJellyfish spelling.

Return type:

ndarray

final_kept_jacobian(kept_names, final_names=None, method='ad', step=1e-05)[source]#

Jacobian d(kept intermediate)/d(final).

Parameters:
  • kept_names (sequence of str) – Intermediate parameters surviving the marginalisation, in output order.

  • final_names (sequence of str, optional) – Final parameters. Defaults to final_names.

  • method ({"ad", "fd"}, optional) – Use JAX autodiff or central finite differences.

  • step (float, optional) – Relative step for the finite-difference Jacobian.

Return type:

ndarray

project(reduced, kept_names, final_names=None, jacobian_method='ad')[source]#

Project an intermediate Fisher matrix with the Fisher-space chain rule.

The projection is delegated to cosmicjellyfish.analysis.fisher_operations.reparametrise(), which computes \(J^T F J\) with \(J = \partial(\text{intermediate})/\partial(\text{final})\).

Return type:

tuple[ndarray, ndarray, tuple[str, ...]]

projected_fisher_matrix(reduced, kept_names, jacobian, final_names)[source]#

Wrap the reduced Fisher matrix and project it with reparametrise.

Returns:

Fisher matrix of the final parameters, with names and fiducial values set.

Return type:

cosmicjellyfish.analysis.fisher_matrix.fisher_matrix

binned_constraints(reduced, kept_names)[source]#

Marginalised absolute errors on \(H(z_i)\), \(D_A(z_i)\) and \(f\sigma_8(z_i)\).

The reduced Fisher matrix constrains logarithms, so \(\sigma(X_i) = X_i\,\sigma(\ln X_i)\) at linear order.

Returns:

Keys "H" (km/s/Mpc), "DA" (Mpc) and "fs8"; each holds z, fiducial and sigma arrays over the redshift bins. An unconstrained parameter (including one participating in an unconstrained linear combination) is reported with an infinite uncertainty.

Return type:

dict

run(method='ad', final_names=None, jacobian_method='ad')[source]#

Run the full intermediate-parameter forecast.

Returns:

Contains the intermediate Fisher matrix, the reduced Fisher matrix and its parameter names, the final Fisher matrix, the Jacobian and the final names.

Return type:

dict

direct_fisher(method='ad', final_names=None, freepars=None)[source]#

Run the direct Fisher recipe and marginalise to the final parameters.

Prefer 10^9As for the amplitude coordinate to keep parameter scales comparable. Physical As remains supported through a change of units.

static covariance(fisher)[source]#

Pseudoinvert a Fisher matrix after normalising its parameter axes.

Diagonal scaling prevents a small-unit coordinate such as physical As from suppressing other parameters at the pseudoinverse cutoff. Prefer 10^9As in forecasts to avoid the large scale disparity in the first place.

Return type:

ndarray

compare(method='ad', final_names=None, jacobian_method='ad', direct_method='ad')[source]#

Compare the intermediate projection with the validated direct Fisher recipe.

Return type:

dict