Overview#
cosmicjellyfish computes Fisher-matrix forecasts for upcoming surveys such as Euclid,
DESI, SKAO and CMB experiments. It evaluates observables (galaxy clustering, weak
lensing, CMB spectra, intensity mapping), differentiates them numerically with respect
to the parameters you choose, and returns a Fisher matrix you can marginalise, combine
and plot. Cosmology comes from CAMB, CLASS, the built-in symbolic backend or
precomputed tables.
This page explains the pieces of a forecast and shows how to plot one. To run the code first, start with A verified first forecast.
The four inputs#
Every forecast, including the one in A verified first forecast, is built from four inputs
that you pass to FisherMatrix:
Input |
What it is |
|---|---|
|
A dictionary of settings: backend ( |
|
Which observables to forecast, for example |
|
The cosmology where the forecast is evaluated. Parameters you leave out take their code defaults. |
|
The parameters to vary, each with its relative finite-difference step size. |
FisherMatrix(...).compute() runs the numerical derivatives and returns a
cosmicjellyfish.analysis.fisher_matrix object, which holds the matrix, the parameter
names and a record of the settings. See Supported observables and survey settings for the available observables and survey files.
Plot a result#
Pass the Fisher matrix from A verified first forecast (the fisher variable) to
fisher_plotting to draw a triangle plot of the free parameters:
import cosmicjellyfish.analysis.fisher_plotting as cfp
plot_options = {
"fishers_list": [fisher],
"fish_labels": ["Euclid photometric (WL + GCph)"],
"plot_pars": ["Omegam", "h"],
"axis_custom_factors": {"all": 7}, # axis range in sigma of the first Fisher matrix
"plot_method": "Gaussian",
"file_format": ".pdf",
"outpath": "./plots/", # created if it does not exist
"outroot": "first_forecast_plot",
"colors": ["#000000"],
}
plotter = cfp.fisher_plotting(**plot_options)
plotter.plot_fisher(filled=[False])
This writes plots/first_forecast_plot_contours.pdf. To compare several surveys or
settings, add more Fisher matrices to fishers_list and matching entries to
fish_labels and colors; the other options are in the
cosmicjellyfish.analysis.fisher_plotting API reference.
Where to go next#
Comprehensive guide: backends, observables, survey files, and working with the Fisher object (marginalise, combine, reshuffle).
Derivative methods: the finite-difference schemes and how to choose one.
Likelihood sampling with Nautilus: posterior sampling with Nautilus.