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:
objectEnd-to-end intermediate-parameter Fisher forecast for GCsp.
- Parameters:
options (
dict, optional) – CosmicJellyfish options.codeis forced to"jaxcosmo"and the default is{"code": "jaxcosmo", "nonlinear": True, "feedback": 0}.fiducialpars (
dict, optional) – Fiducial cosmological parameters passed toFisherMatrix.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}, plusw0andwaforcosmoModel="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.
- 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 whenderivativesis 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:
- static marginalize(fisher, indices)[source]#
Marginalise a Fisher matrix over
indicesvia the Schur complement.
- reduced_fisher(method='ad', fisher=None)[source]#
Intermediate Fisher matrix marginalised over
b sigma8and shot noise.
- final_fiducial_vector(final_names=None)[source]#
Fiducial values of the final parameters in CosmicJellyfish spelling.
- Return type:
- final_kept_jacobian(kept_names, final_names=None, method='ad', step=1e-05)[source]#
Jacobian
d(kept intermediate)/d(final).- Parameters:
kept_names (
sequenceofstr) – Intermediate parameters surviving the marginalisation, in output order.final_names (
sequenceofstr, optional) – Final parameters. Defaults tofinal_names.method (
{"ad", "fd"}, optional) – Use JAX autodiff or central finite differences.step (
float, optional) – Relative step for the finite-difference Jacobian.
- Return type:
- 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})\).
- 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:
- 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 holdsz,fiducialandsigmaarrays over the redshift bins. An unconstrained parameter (including one participating in an unconstrained linear combination) is reported with an infinite uncertainty.- Return type:
- 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:
- direct_fisher(method='ad', final_names=None, freepars=None)[source]#
Run the direct Fisher recipe and marginalise to the final parameters.
Prefer
10^9Asfor the amplitude coordinate to keep parameter scales comparable. PhysicalAsremains 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
Asfrom suppressing other parameters at the pseudoinverse cutoff. Prefer10^9Asin forecasts to avoid the large scale disparity in the first place.- Return type: