https://github.com/xgarrido/spt_likelihoods
Cobaya likelihoods for SPT experiment
https://github.com/xgarrido/spt_likelihoods
cobaya likelihood mcmc
Last synced: 12 months ago
JSON representation
Cobaya likelihoods for SPT experiment
- Host: GitHub
- URL: https://github.com/xgarrido/spt_likelihoods
- Owner: xgarrido
- Created: 2021-03-26T10:06:43.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-11T06:52:19.000Z (over 2 years ago)
- Last Synced: 2025-02-27T07:44:03.183Z (over 1 year ago)
- Topics: cobaya, likelihood, mcmc
- Language: Python
- Homepage:
- Size: 237 KB
- Stars: 6
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
===============
SPT Likelihoods
===============
External likelihoods for SPT experiment using `cobaya
`_. These are ``python`` implementation of original ``Fortran``
code for ``CosmoMC`` sampler.
.. image:: https://img.shields.io/github/actions/workflow/status/xgarrido/spt_likelihoods/testing.yml
:alt: GitHub Workflow Status
:target: https://github.com/xgarrido/spt_likelihoods/actions
The package includes the following likelihoods:
- ``sptpol_2017`` relates to SPTPol EETE likelihood used in `Henning et al. `_, 2017. The original ``Fortran`` code is available `here `_ or in `LAMBDA `_.
- ``spt3g_2020`` relates to SPT3G EETE likelihood used in `Dutcher et al. `_, 2021. The original ``Fortran`` code is available `here `_.
.. image:: https://user-images.githubusercontent.com/2495611/212894449-75255465-f4f6-42e5-a8b6-b4b03bb246d6.png
- ``spt_hiell_2020`` relates to SPT-SZ TT likelihood used in `Reichardt et al. `_, 2020. The original ``Fortran`` code is available in `LAMBDA `_.
.. image:: https://user-images.githubusercontent.com/2495611/212894382-d114c2ca-2659-47ee-ab56-ce66f8a81b1f.png
- ``spt3g_2022`` relates to SPT3G TT, TE and EE likelihood used in `Balkenhol et al. `_, 2022. The original ``Fortran`` code is available `here `_.
.. image:: https://user-images.githubusercontent.com/2495611/214127005-aa514efa-4b73-43f7-a5ad-8274ffe151d9.png
Installing the code
-------------------
You can install the following code by just typing
.. code:: shell
$ pip install git+https://github.com/xgarrido/spt_likelihoods.git
If you plan to develop/modify the code, the easiest way is to clone this repository to some location
.. code:: shell
$ git clone https://github.com/xgarrido/spt_likelihoods.git /where/to/clone
Then you can install the likelihoods and its dependencies *via*
.. code:: shell
$ pip install -e /where/to/clone
The ``-e`` option allow the developer to make changes within the ``spt`` directory without having
to reinstall at every changes. If you plan to just use the likelihood and do not develop it, you can
remove the ``-e`` option.
Installing SPT likelihood data
------------------------------
SPT data are stored in `LAMBDA `_. You can download them
by yourself but you can also use the ``cobaya-install`` binary and let it do the installation
job. For instance, if you do the next command
.. code:: shell
$ cobaya-install /where/to/clone/examples/spt3g_example.yaml -p /where/to/put/packages
data for SPT3G and code such as `CAMB `_ will be downloaded and
installed within the ``/where/to/put/packages`` directory. For more details, you can have a look to
``cobaya`` `documentation `_.
Running/testing the code
------------------------
You can test the ``SPT`` likelihoods by doing
.. code:: shell
$ test-spt
It will perform basic Χ² checks over the three different likelihoods.
You can also run MCMC chains with
.. code:: shell
$ cobaya-run /where/to/clone/examples/spt3g_example.yaml -p /where/to/put/packages