Standard Library Overview

The CosmoSIS standard library is a collection of modules designed for Cosmological parameter estimation. You can couple together pieces of it to build analysis piplines.

Background

These modules calculate quantities related to the average background expansion of the Universe.

Name

Purpose

astropy_background

Calculate background cosmology using astropy

distances

Output cosmological distance measures for dynamical dark energy

growth_factor

returns linear growth factor and growth rate for flat cosmology with either const w or variable DE eos w(a) = w + (1-a)*wa

log_w_model

Implement Tripathi, Sangwan, Jassal (2017) w(z) model

rescale_distances_rdh

Rescale computed distances to be consistent with a given value of R_d * h

Baryons

These modules modify matter power spectra to account for the effects of baryonic physics.

Name

Purpose

amod

Modify the non-linear matter power spectrum using the A_mod phenomenological parameterization

baryonic

Apply baryonic effects to nonlinear pk based on hydrodynamic simulation measurements

owls

Apply baryonic feedback effects to matter power spectrum using OWLS simulations

Boltzmann

Boltzmann codes evolve cosmic perturbations from the early Universe through recombination and to late times, and power spectra of matter, the CMB, and other quantities.

Name

Purpose

camb

Boltzmann and background integrator for BG, CMB, and matter power

class

Boltzmann and background integrator for BG, CMB, matter power, and more

isitgr-camb

Modified version of CAMB to implement phenomenological modified gravity models

mgcamb

Modified Gravity Boltzmann and background integrator for BG, CMB, and matter power

Emulators

These modules emulate aspects of cosmic structure based on fits to simulations.

Name

Purpose

CosmicEmu

Emulate N-body simulations to compute nonlinear matter power

EuclidEmulator2

Emulate the boost factors that convert the linear to non-linear power spectrum, including baryon corrections

FrankenEmu

Emulate N-body simulations to compute nonlinear matter power

bacco_emulator

Emulate the non-linear, baryonified, matter power spectrum

Structure

These modules compute aspects of cosmic structure, for example by integrating over cosmic structure, or calculating halo model quantities.

Name

Purpose

CRL_Eisenstein_Hu

Komatsu’s CRL code to compute the power spectrum using EH fitting formula.

Extreme_Value_Statistics

PDF of the maximum cluster mass given cosmological parameters

NLfactor

Compute nonlinear weyl potential (and other) spectrum by multiplying the linear spectrum with matter_power_nl/matter_power_lin

Press_Schechter_MF

Code to compute the PressSchechter mass function given Pk from CAMB, based on Komatsu’s CRL

Sheth-Tormen MF

Code to compute the Sheth-Tormen mass function given Pk from CAMB, based on Komatsu’s CRL

Tinker_MF

Code to compute the Tinker et al. mass function given Pk from CAMB, based on Komatsu’s CRL

constant_bias

Apply a galaxy bias constant with k and z.

extract_growth

returns growth factor and growth rate by examining small-scale P(k)

extrapolate

Simple log-linear extrapolation of P(k) to high k

sigma_cpp

Compute anisotropy dispersion sigma(R,z) in cpp

sigma_r

Compute anisotropy dispersion sigma(R,z)

Two-point Mathemetics

These modules perform mathematical claculations associated with two-point statistics, mostly on a sphere.

Name

Purpose

cl_to_corr

Compute correlation functions xi+, xi-, w, and gamma_t from C_ell

cl_to_xi_fullsky

Transform angular power spectra C_ell to real-space correlation functions

cl_to_xi_nicaea

Compute WL correlation functions xi+, xi- from C_ell

cl_to_xi_wigner_d

Compute correlation functions from power spectra

cosebis

Calculate COSEBIs from C_ell power spectra

hmcode_eta

Compute eta parameter for HMCode based on concentration amplitude A

project_2d

Project 3D power spectra to 2D tomographic bins using the Limber approximation

wl_spectra

Compute various weak lensing C_ell from P(k,z) with the Limber integral

wl_spectra_ppf

Compute weak lensing C_ell from P(k,z) and MG D(k,z) with the Limber integral

Two-point Systematics

These modules compute and apply quantities associated with systematics errors on two-point (and potentially other) quantities.

Name

Purpose

add_gammat_point_mass

Add point mass contributions to galaxy-galaxy lensing (gamma_t) signal

add_intrinsic

Sum together intrinsic aligments with shear signal

add_magnification

Add magnification terms to C_ell

additive_systematic

Model additive systematic errors for HSC cosmic shear analysis

apply_astrophysical_biases

Apply various astrophysical biases to the matter power spectrum P(k,z)

binwise_bias

Apply galaxy bias on a per-bin basis to galaxy power spectra

clerkin

Compute galaxy bias as function of k, z for 3-parameter Clerkin et al 2014 model

constant_bias

Apply a galaxy bias constant with k and z.

ia_z_powerlaw

Add redshift dependence to IA model

kappa_beam

Apply smoothing function to cross-correlations with CMB kappa in harmonic space.

kappa_ell_cut

Apply minimum and maximum ell to cross-power spectra with CMB kappa.

linear_alignments

Compute the terms P_II and P_GI which go into intrinsic aligment calculations

no_bias

Generate galaxy power P(k) as though galaxies were unbiased DM tracers

shear_bias

Modify a set of calculated shear C_ell with a multiplicative bias

tatt

Compute intrinsic alignment power spectra using Tidal Alignment + Tidal Torquing model

Sample Properties

These modules compute properties, mostly number density, of galaxy samples.

Name

Purpose

Joachimi_Bridle_alpha

Calculate the gradient of the galaxy luminosity function at the limiting magnitude of the survey.

gaussian_window

Compute Gaussian n(z) window functions for weak lensing bins

load_nz

Load a number density n(z) for weak lensing from a file

load_nz_fits

Load a number density n(z) from a FITS file

load_nz_sacc

Load number density n(z) from a SACC file for weak lensing

nz_multirank

Load, rank, and sample a set of density n(z) realisations from a FITS file

photoz_bias

Modify a set of loaded n(z) distributions with a multiplicative or additive bias

photoz_distortion

Apply photometric redshift systematic biases to n(z) distributions

smail

Compute window functions for photometric n(z)

CMB Likelihoods

These modules provide likelihoods that compare theory predictions to CMB data

Name

Purpose

BICEP2

Compute the likelihood of the supplied CMB power spectra

act-dr6-lens

CMB Lensing from ACT DR6 data.

act_dr6

Full Multi-Frequency primary CMB from ACT DR6 data including systematics and foregrounds.

act_dr6_lite

Foreground-marginalised primary CMB (CMB-only) from ACT DR6 data.

candl

Interface with candl.

hillipop

Likelihood of the Planck high-ell data from the NPIPE re-analysis, using the Hillipop likelihood code.

lollipop

Likelihood of the Planck low-ell data polarizaton data from the PR4 analysis, using the Lollipop likelihood code.

planck2018

Likelihood function of CMB from Planck 2015 data

planck_npipe

Planck NPIPE CMB lensing likelihood

planck_py

Lightweight python-based Planck likelihood code

planck_sz

Prior on sigma_8 * Omega_M ** 0.3 from Planck SZ cluster counts

wmap

Likelihood function of CMB from WMAP

wmap_shift

Massively simplified WMAP9 likelihood reduced to just shift parameter

BAO Likelihoods

These modules provide likelihoods that compare theory predictions to BAO data

Name

Purpose

6dFGS

Compute the likelihood of supplied D_v or fsigma8(z=0.067)

BOSS

Compute the likelihood of supplied fsigma8(z=0.57), H(z=0.57), D_a(z=0.57), omegamh2, bsigma8(z=0.57)

WiggleZBao

Compute the likelihood of the supplied expansion history against WiggleZ BAO data

boss_dr12

Compute the likelihood of the supplied expansion and growth history against BOSS DR12 data

boss_dr12_lrg_reanalyze

Compute the likelihood of the supplied expansion and growth history against BOSS DR12 data as reanalyzed by eBOSS DR16

des-y3-bao

Compute the likelihood of DES Y3 BAO data

des-y6-bao

Compute the likelihood of DES Y6 BAO data

des-y6-bao-5bins

Compute the likelihood of DES Y6 BAO data using individual redshift bins

desi_dr1

DESI BAO likelihood from DR1 data

desi_dr1_arxiv

DESI BAO likelihood from DR1 data

desi_dr2

DESI BAO likelihood from DR2 data

eboss_dr14_lya

Compute the likelihood of eBOSS DR14 D_m and D_h from Lyman alpha

eboss_dr16_elg

Compute the likelihood of eBOSS DR16 from ELG

eboss_dr16_lrg

Compute the likelihood of eBOSS DR16 from LRG

eboss_dr16_lya

Compute the likelihood of eBOSS DR16 from Lyman alpha

eboss_dr16_qso

Compute the likelihood of eBOSS DR16 from QSO

lrg

Compute the likelihood of eBOSS DR14 D_v from LRG

mgs

Compute the likelihood of MGS BAO and FS as distributed by eBOSS DR16

mgs_bao

Compute the likelihood against SDSS MGS data

qso

Compute the likelihood of eBOSS DR14 D_v from QSO

Supernova Likelihoods

These modules provide likelihoods that compare theory predictions to supernova data

Name

Purpose

des-y5-sn

Compute the likelihood of DES Y5 Supernova data

jla

Supernova likelihood for SDSS-II/SNLS3

pantheon

Likelihood of the Pantheon supernova analysis

pantheon_plus

Likelihood of the Pantheon+ supernova analysis optionally combined with the SH0ES H0 measurement

salt2

SALT2 supernova distance modulus likelihood

Cepheid Likelihoods

These modules provide likelihoods that compare theory predictions to Cepheid data

Name

Purpose

Riess11

Likelihood of hubble parameter H0 from Riess et al supernova sample

Riess16

Likelihood of hubble parameter H0 from Riess et al 2.4% supernova sample

Riess21

Likelihood of hubble parameter H0 from Riess et al supernova sample

Lensing and Clustering Likelihoods

These modules provide likelihoods that compare theory predictions to weak lensing and clustering data

Name

Purpose

2pt

Generic 2-point measurement Gaussian likelihood

hsc_cosmic_shear

Likelihoods of the HSC Year 3 cosmic shear data

sacc_like

Generic 2-point measurement Gaussian likelihood using sacc format

simple_like

Generate a simple 2pt likelihood given data, theory and covariance with no cuts

Strong Lensing Likelihoods

These modules provide likelihoods that compare theory predictions to strong lensing data

Name

Purpose

balmes

Balmes & Corasaniti 2012 H0 Measurement likelihood

h0licow

H0licow 2019 strong lensing likelihood

strong_lens_time_delays

Time delay likelihood for strong lensing systems from COSMOGRAIL 2017

tdcosmo

Likelihood of the TDCOSMO analyses

Other Likelihoods

These module provide likelihoods that compare theory predictions to other data

Name

Purpose

BBN

Simple prior on Omega_b h^2 from light element abundances

Cluster_mass

Likelihood of z=1.59 Cluster mass from Santos et al. 2011

JulloLikelihood

Likelihood of Jullo et al (2012) measurements of a galaxy bias sample

fgas

Likelihood of galaxy cluster gas-mass fractions

Misc & Utilities

These modules supply special utilities or calculation tools

Name

Purpose

BBN-Consistency

Compute consistent Helium fraction from baryon density given BBN

consistency

Deduce missing cosmological parameters and check consistency

copy

Copy a section to a new section

correlated_priors

Include correlations between nusiance parameters

delete

Enters python debugger.

fast_pt

Compute various 1-loop perturbation theory quantities

random_fail

Randomly fail pipeline runs for testing purposes

rename

Rename a section to a new name

sigma8_rescale

Rescale structure measures to use a specified sigma_8

stop

Enters python debugger.

w0wa_sum_prior

Skip parameter sample without failing if w0+wa>0.

Others

Modules that may be obsolete or only useful for a very specific project

Name

Purpose

add_colours

Combine red and blue galaxy intrinsic alignment signals based on color fractions

choose_ia

Select intrinsic alignment parameters from suffixed versions

cosmopower

Interface to cosmopower emulators for fast cosmological calculations, a drop-in replacement for camb.

delta_window

Compute Delta n(z) window functions for weak lensing bins

des-y6-bao-dr1tilesnoDESI

Compute the likelihood of DES Y6 BAO data removing the DESI-DR1 area. This likelihood is meant to be combined with DESI DR1 or DR2 BAO, but not with future DESI releases.

fiducial_cl

Replace CMB power spectra with fiducial values from data files

flexible_grid

Flexible intrinsic alignment implementation using grid-based bias model

generate_observable_cls

Generate observable C_ell from theoretical power spectra including systematic effects

mass_dependent_ia_model

adds mass dependence to IA, with a linear equation

project_1d

Predict 1pt observable functions to the final n(z) convolved form