Skip to main content

CosmoBoost

author MIT license stable DOI

email

CosmoBoost is a python package for Lorentz boosting anisotropic temperature and polarization maps in healpix format. The calculations are done in spherical harmonic space based on the relativistic Doppler and aberration kernel formalism developed in Yasini & Pierpaoli (2017) and Dai & Chluba (2014), following up on the original idea by Challinor & van Leeuwen (2002).

Currently the supported radiation types are:

  • Cosmic Microwave Background (CMB)
  • Kinetic Sunyaev Zeldovich (kSZ)
  • Thermal Sunyaev Zeldovich (tSZ)

See the tutorial.ipynb notebook for an overview of the features through a set of examples.

Dependencies

  • python 3 stable
  • numpy stable
  • scipy stable
  • healpystable(needed for running the tutorial)

Installation

You can install CosmoBoost from pypi using

pip install cosmoboost

Alternatively, you can clone the repository by running

git clone https://github.com/syasini/CosmoBoost.git

then move to the CosmoBoost directory

cd CosmoBoost

and run

python setup.py install --user

or use pip

pip install [-e] .

the -e argument will install the package in editable mode which is suitable for developement. If you want to modify the code use this option.

Example Session

CosmoBoost has a simple and user friendly interface. Simply import the package using

import cosmoboost as cb

Then load the default boosting parameters dictionary (beta = 0.00123, d=1, s=0, lmax= 1000, etc.)

pars = cb.DEFAULT_PARS

Instantiate the kernel object

kernel = cb.Kernel(pars)

Now simply boost a set of alm's (recommended) using

alm_boosted = cb.boost_alm(alm_rest, kernel)

or boost the power spectrum Cl directly

Cl_boosted = cb.boost_Cl(Cl_rest, kernel)

See the tutorial for a comprehensive example.

Acknowledgement

If you find the contents of this repository useful for your research, please consider citing the following papers:

 @article{Yasini:2017jqg,
     author         = "Yasini, Siavash and Pierpaoli, Elena",
     title          = "{Generalized Doppler and aberration kernel for
                       frequency-dependent cosmological observables}",
     journal        = "Phys. Rev.",
     volume         = "D96",
     year           = "2017",
     number         = "10",
     pages          = "103502",
     doi            = "10.1103/PhysRevD.96.103502",
     eprint         = "1709.08298",
     archivePrefix  = "arXiv",
     primaryClass   = "astro-ph.CO",
     SLACcitation   = "%%CITATION = ARXIV:1709.08298;%%"
 }
@article{Dai:2014swa,
      author         = "Dai, Liang and Chluba, Jens",
      title          = "{New operator approach to the CMB aberration kernels in
                        harmonic space}",
      journal        = "Phys. Rev.",
      volume         = "D89",
      year           = "2014",
      number         = "12",
      pages          = "123504",
      doi            = "10.1103/PhysRevD.89.123504",
      eprint         = "1403.6117",
      archivePrefix  = "arXiv",
      primaryClass   = "astro-ph.CO",
      SLACcitation   = "%%CITATION = ARXIV:1403.6117;%%"
}

The bibtex entries are copied from inspirehep.net.

Metadata

Release files for cosmoboost 1.1.6

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

Source distribution (sdist)

Source distribution for cosmoboost 1.1.6
File Size Uploaded
cosmoboost-1.1.6.tar.gz 170.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cosmoboost 1.1.6
File Interpreter ABI Platform
cosmoboost-1.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 499.6 kB

Release files / cosmoboost-1.1.6.tar.gz

Download URL cosmoboost-1.1.6.tar.gz
Size 170.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9784cdda30b61dfc4ea9d2a84b266a39a4a675c92adf2d078f689c1be9ca1a29
BLAKE2b-256 checksum
How to use checksums
4353e591925c7b6a475df64fea864e2adda999f8bbb30406578f755e14e2d933
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.3

Release files / cosmoboost-1.1.6-py3-none-any.whl

Download URL cosmoboost-1.1.6-py3-none-any.whl
Size 328.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0532cb213647e1033d4bd98248c3e39400b648582e0773d5a0cb2f76994e65cb
BLAKE2b-256 checksum
How to use checksums
621a5957c56aeec1d1ca16d7d3112483de2414088c2b02ce820cc458d99606d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.1.6 This release

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

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