Skip to main content

a python package for boosting the cosmos!

Project description

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.

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

cosmoboost-1.1.6.tar.gz (170.9 kB view hashes)

Uploaded Source

Built Distribution

cosmoboost-1.1.6-py3-none-any.whl (328.7 kB view hashes)

Uploaded Python 3

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