Skip to main content

unWISE x CMB lensing likelihood

This repository provides the public likelihood for the cross-correlation analysis using unWISE galaxies and CMB lensing reconstructions from ACT and Planck.

If you use this software and/or the associated data, please cite both of the following papers:

Furthermore, for the unWISE data cite:

For the ACT DR6 Lensing reconstructions and when using the lensing auto-spectrum in the joined 3x2pt analysis cite:

When using cross-correlations with the Planck PR4 lensing reconstruction and/or the Planck PR4 lensing auto-spectrum also cite:

Chains

Chains from Farren et al. 2023 and Farren et al. 2024 are available for download on NERSC here.

Installation

Option 1: Install from PyPI

You can install the likelihood directly with:

pip install unWISExLens-lklh

Option 2: Install from Github

If you wish to be able to make changes to the likelihood for development, first clone this repository. Then install with symbolic links:

pip install -e . --user

Note: Up to Cobaya version 3.5.1 a minor bug prevents the defaults from being initialised correctly. It has been fixed here, but you may have to update your sampler and/or install it from source.

Data

The bandpowers, covariances and auxiliary data for this likliehood is available for download here. Download the data archive and extract it inside the cloned directory such that unWISExLens_lklh/data/ contains three directories bandpowers, covariances, and aux_data. You can simply run the get_unWISExLens_data.sh script to achieve this automatically.

Use with Cobaya

This likelihood provides several versions of the cross-correlation and 3x2pt analysis using two redshift samples of unWISE data and CMB lensing reconstructions from ACT DR6 and Planck PR4. The analysis requires a dedicted theory module unWISExLens_lklh.unWISExLensTheory which has to be included in the theory block of the Cobaya .yaml-file. The likelihood itself comes in several versions enabling analyses using only the cross-correlations (XCorr) or the full 3x2pt dataset (ThreeXTwo). You can choose to use both ACT DR6 and Planck PR4 (XCorrACTPlanck or ThreeXTwoACTPlanck) or ACT and Planck alone (XCorr(ACT|Planck) or ThreeXTwo(ACT|Planck)). The XCorr likelihood includes the galaxy-CMB lensing cross-correlations ($C_\ell^{\kappa g}$) along with the galaxy auto-correlations ($C_\ell^{gg}$) of the two samples while the ThreeXTwo likelihood additionally includes the CMB lensing auto-correlation ($C_\ell^{\kappa \kappa}$).

To use for example the 3x2pt dataset from ACT and Planck include the following in your theory and likelihood blocks.

theory:
  camb: ...
  unWISExLens_lklh.unWISExLensTheory: null
likelihood:
  unWISExLens_lklh.ThreeXTwoACTPlanck: null

Note that by default the likelihood includes marginalisation over the primary CMB power spectrum (see Farren et al. 2023 and Qu et al. 2023 for details). To combine with primary CMB data set the want_lensing_lklh_correction attribute of the likelihood to True. Furthermore, this requires the LensingLklhCorrection module to be loaded as a theory class. This module provides the likelihood corrections discussed in Appendix A of Farren et al. 2024. Separating this module ensures that the corrections are only evaluated once for each set of cosmological parameters enabling one to take advantage of the parameter speed hierarchy to more efficiently marginalise over the galaxy nuisance parameters which can be evaluated faster than the cosmological parameters. The Cobaya .yaml-file should then contain the following

theory:
  camb: ...
  unWISExLens_lklh.unWISExLensTheory: null
  unWISExLens_lklh.LensingLklhCorrection: null
likelihood:
  primary_CMB_likelihoods: ...
  unWISExLens_lklh.ThreeXTwoACTPlanck:
    want_lensing_lklh_correction: True

Other important parameters

The theory code and likelihood have several options. Most of these should not be altered, but some may be of interest to perform alternative analyses.

Options for the likelihood include the following:

unWISExLens_lklh.(ThreeXTwo|XCorr)(ACTPlanck|ACT|Planck):
    samples: # which cross-correlations to use (Note that you will also have to adjust the galaxy nuisance parameters and priors which are automatically selected when using the predefined likelihoods)
        - Blue_ACT # names are in the form (Blue|Green)_(ACT|Planck)
        - ...

    lranges_(gg|kg|kk): # bandpower selection to use in analysis (We caution that the modelling has not been verfied outside the default range, so this should only be used to decrease the scale range, e.g. to restrict to (quasi-)linear scales)
        (Blue|Green)_(ACT|Planck): # for Clgg and Clkg
            - lmin
            - lmax
        (ACT|Planck): # for Clkk
            - lmin
            - lmax

    lensing_auto_spectrum_from_camb: (true|false) # whether to use CAMB to compute the lensing auto-power spectrum or compute it internally using the limber approximation (useful when reconstructing growth of perturbations, sigma8(z))

    #parameters for varying the LPT contributions to Clgg and Clkg (see Farren et al. 2023 for model details; should all be set to false if use_linear_theory = true in theory module or use_cleft = false)
    scale_cleft_b2: false
    shift_cleft_b2: true
    scale_cleft_bs: false
    shift_cleft_bs: true
    

The theory module provides the following options:

unWISExLens_lklh.unWISExLensTheory:
    use_linear_theory: (false|true) # use linear theory P(k) (will deactivate LPT corrections and HALOFIT)
    use_cleft: (true|false) # whether to use LPT terms
    use_free_cleft_model: (true|false) # use free parameters in LPT expansion rather than bias-coevolutoon relations (see options to likelihood above)
    use_fiducial_cleft: (true|false) # use LPT terms evaluated at fiducial cosmology (requires velocileptor package to deactivate)
    use_Az_parametrisation: (false|true) # use free scaling of the linear power spectrum in bins to reconstruct growth of structure in model agnostic way
    Az_parametrisation:
      type: bins
      bin_edges:
      - 1.09
      - 1.75
      - .inf
      params:
      - A0
      - A1
      - A2

Recommended theory accuracy

For CAMB calls, we recommend the following (or higher accuracy):

  • lmax: 4000
  • lens_margin:1250
  • lens_potential_accuracy: 4
  • AccuracyBoost:1
  • lSampleBoost:1
  • lAccuracyBoost:1
  • halofit_version:mead2016

Example .yaml-files and starting covmat

Along with the likelihood we provide an example .yaml-file to perform the likelihood analysis with Cobaya. After installation the command

cobaya-run example_LCDM_unWISExLens_3x2pt+CMB2pt.yaml

will perform a joined analysis of the unWISE 3x2pt data using both ACT and Planck lensing along with primary CMB observations from Planck. The file should be adapted for the desired analysis. We also provide a starting covariance matrix for this run (LCDM_unWISExLens_3x2pt+CMB2pt.covmat) which can be used as a starting pont for other analyses.

As a simple check on the installation the user may wish to run

cobaya-run test_unWISExLens_lklh.yaml

which will evaluate the likelihood at a single point. If all components are installed correctly the test should yield a total log-posterior of $-62.1652$.

Notes

At present the liklihood is compatible only with camb. Compatiblity with class and emulators replacing the boltzman solver are under development.

Metadata

Release files for unWISExLens-lklh 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unWISExLens-lklh 1.0.2
File Size Uploaded
unwisexlens_lklh-1.0.2.tar.gz 38.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unWISExLens-lklh 1.0.2
File Interpreter ABI Platform
unwisexlens_lklh-1.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 91.1 kB

Release files / unwisexlens_lklh-1.0.2.tar.gz

Download URL unwisexlens_lklh-1.0.2.tar.gz
Size 38.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5588b5267444090eff27ca0d0d632e7aacb795c82deded7cde0eea5421d5ca0d
BLAKE2b-256 checksum
How to use checksums
626c2fb7042cb8bd249634081cb4e7bc1ca2c27f50a1153e9690b24c44ed81b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 19, 2025.

Transparency log

Release files / unwisexlens_lklh-1.0.2-py2.py3-none-any.whl

Download URL unwisexlens_lklh-1.0.2-py2.py3-none-any.whl
Size 52.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6096545c4a786e52243a99024a7901659eef0161d65020ee425a21dfc093971a
BLAKE2b-256 checksum
How to use checksums
1d52093bbb0b4f0a44dbbfe407ce9ff74692b8f9217cd822c133e704236acc6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 19, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page