Skip to main content

package for computing power spectra and bispectra

Project description

CosmoWAP

Cosmology with Wide-separation, relAtivistic and Primordial non-Gaussian contibutions.

CosmoWAP is an effort to provide a (hopefully) self consistent framwork to compute contribtuions to the fourier power spectrum and bispectrum from wide-separation and relatvisitic effects as well as contribution from Primordial non-Gaussianity (PNG). These expression can be very cumbersome and it can be tricky to check for consistency in the community and so hopefully this code should be useful in that regard.

CosmoWAP is a Python package to analyse the power spectra and bispectra but the analytical expressions themselves are computed analytically in Mathematica using routines which are publicly avalable at MathWAP and then exported as .py files. therefore the main functionality of CosmoWAP is to take these expressions and implement them for a given cosmology (from CLASS) and survey parameters.

Installation

Features

CosmoWAP computes redshift spadce expressions for the 3D Fourier power spectrum (and it's multipoles with multi-tracer capabilites) as well as the bispectrum (with Sccoccimarro spherical harmonic multipoles), it also can be used for:

  • Wide separation (WS) effects (i.e. wide angle and radial redshift contributions) up to second order in the WS expansion
  • Relativistic (GR) effects (inlding projection and dynamical effects - see ... for currently implemented kernels) up to $\left(\frac{\mathcal{H}}{k}\right)^2$
  • Primordial non-Gaussian (PNG) contribution for local, equilateral and orthogonal types (in progress)

additional features

  • Gaussian covariances along with routines for Fisher and SNR analyses (in progress)
  • Inclusion of Finger-of-God damping

Documentation

see documentation .... (Add)

Usage

Based on work in arXiv:2407.00168

Also for PNG stuff please refer too: arXiv:24xx.xxxx

Updating documentiation - old stuff below...

Overview

  • \mathematica_routines\The_bispectrum.nb outputs expressions for each different in the bispectrum for different multipoles

  • These are then stored in \bkterms as .py files

  • \Library\WS_cosmo: takes in a cosmology from class and survey specifications and returns required parameters to use files in \bkterms - see example.py for usage

quickstart

Download the repository...

To get started see example.ipynb or example_pk.ipynb for a quick guide on using the computed expressions...

CLASS, matplotlib, scipy and numpy are the only dependencies

python functions

Outputs are converted to python format and stored in \bk_terms

Notebooks

For an example notebook for using these expressions see:

  • example.ipynb

  • bk_SNR.ipynb includes code to compute and plot the SNR and fisher stuff for multipoles

  • bk_plots.ipynb contains a bunch of functions that maybe be useful but is not clean

In these notebooks everything is designed to use \Library\WS_cosmo.py where cosmology and survey biases are defined and from that object all bispectrum terms can be computed.

Multi-tracer Power spectrum multipoles

This includes relatvistic and wide separation effects up to second order. The format should be similar as to that of the bispectrum.

  • The_powerspectrum.nb, Pk_funcsandrules.nb, Pk_expansions.nb: mathematica routines for power spectrum computation.

  • Library/WS_cosmo.py: Again is the backend to get input parameters for a given survey and cosmology for the saved python functions.

  • See example_pk.ipynb for example usage.

Errors

Some syntax has been updated so there will inevitably be several errors lying around - particular in the bigger notebooks - please let me know!

Usage

Feel free to edit or just take any part that may be useful but please refer to: arXiv:2407.00168

Contact

Stuff will be added as time goes by - I plan on adding PNG stuff with scale dependent biases for different shapes of PNG (therefore including HOD for bias modelling)

Feel free to drop me a line if you have any feedback! If youre having any problems or have any ideas to make it better- Feel free to get in contact :) - c.l.j.addis@qmul.ac.uk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cosmowap-0.0.2.tar.gz (4.8 MB view details)

Uploaded Source

Built Distribution

cosmowap-0.0.2-py3-none-any.whl (5.0 MB view details)

Uploaded Python 3

File details

Details for the file cosmowap-0.0.2.tar.gz.

File metadata

  • Download URL: cosmowap-0.0.2.tar.gz
  • Upload date:
  • Size: 4.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.8

File hashes

Hashes for cosmowap-0.0.2.tar.gz
Algorithm Hash digest
SHA256 20a10c5f6b69719d5fd2637c954ba1f0f8c69168c8387a524b90f1dc06a92b41
MD5 39483e14b93225c39f22e2df337bee09
BLAKE2b-256 7e8e746f2e4cf8bb4d47404fe448329662a0c47185295966d56f4fc24d286db6

See more details on using hashes here.

File details

Details for the file cosmowap-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: cosmowap-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.8

File hashes

Hashes for cosmowap-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6bfeb7c6acab19ee23922a6ed6866c22f2b46ec148813721f769dbcb764b473e
MD5 096460a33d0deff2167c728559e459a6
BLAKE2b-256 2a5881cc87a052629790dd72253ebd2cf318d5b513bc2c72ddd2bebf0972e463

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page