# Baryonic Acoustic Oscillations & Redshift Distortions¶

- Synopsis
BAO, f_sigma8 and other measurements at single redshifts, with correlations

- Author
Antony Lewis, Pablo Lemos (adapted to Cobaya by Jesus Torrado, with little modification)

This code provides a template for BAO, \(f\sigma_8\), \(H\) and other redshift dependent functions.

The datasets implemented at this moment are:

`bao.sixdf_2011_bao`

`bao.sdss_dr7_mgs`

`bao.sdss_dr12_consensus_bao`

`bao.sdss_dr12_consensus_full_shape`

`bao.sdss_dr12_consensus_final`

(combined data of the previous two)`bao.sdss_dr16_baoplus_lrg`

(combining data from BOSS DR12 and eBOSS DR16)`bao.sdss_dr16_baoplus_lyauto`

`bao.sdss_dr16_baoplus_lyxqso`

`bao.sdss_dr16_baoplus_qso`

`bao.sdss_dr12_lrg_bao_dmdh`

`bao.sdss_dr16_lrg_bao_dmdh`

Note

If you use the likelihood `sixdf_2011_bao`

, please cite:

F. Beutler et al,
The 6dF Galaxy Survey: baryon acoustic oscillations and the local Hubble constant
(arXiv:1106.3366)

If you use the likelihood `sdss_dr7_mgs`

, please cite:

A.J. Ross et al,
The clustering of the SDSS DR7 main Galaxy sample - I.
A 4 per cent distance measure at z = 0.15
(arXiv:1409.3242)

If you use any of the likelihoods `sdss_dr12_*`

, please cite:

S. Alam et al,
The clustering of galaxies in the completed SDSS-III Baryon Oscillation Spectroscopic
Survey: cosmological analysis of the DR12 galaxy sample
(arXiv:1607.03155)

If you use any of the likelihoods `sdss_dr16_*`

, please cite:

S. Alam et al,
The Completed SDSS-IV extended Baryon Oscillation Spectroscopic Survey: Cosmological
Implications from two Decades of Spectroscopic Surveys at the Apache Point observatory
(arXiv:2007.08991)

## Usage¶

To use any of these likelihoods, simply mention them in the likelihoods block, or add them using the input generator.

These likelihoods have no nuisance parameters or particular settings that you may want to change (except for the installation path; see below).

Note that although called “bao”, many of these data combinations also include redshift distortion data (RSD), encapsulated via a single “f sigma8” parameter (which is not accurate for some non-LCDM models).

## Defining your own BAO likelihood¶

You can use the likelihood `bao.generic`

as a template for any BAO data.

To do that, create a file containing the data points, e.g. `myBAO.dat`

, as

```
[z] [value at z] [quantity]
...
```

where you can use as many different quantities and redshifts as you like.

The available quantities are

`DV_over_rs`

: Spherically-averaged distance, over sound horizon radius`rs_over_DV`

: Idem, inverse`DM_over_rs`

: Comoving angular diameter distance, over sound horizon radius`DA_over_rs`

: Physical angular diameter distance, over sound horizon radius`Hz_rs`

: Hubble parameter, times sound horizon radius`f_sigma8`

: Differential matter linear growth rate, times amplitude of present-day fuctuations`F_AP`

: Anisotropy (Alcock-Paczynski) parameter

In addition create a file, e.g. `myBAO.cov`

, containing the covariance matrix for those
data, with the same row order as the data file.

Now, add to your likelihood block:

```
measurements_file: /full/path/to/myBAO.dat
cov_file: /full/path/to/myBAO.cov # either this one,
invcov_file: /full/path/to/myBAO_inv.cov # or this one!
# Fiducial sound horizon with which data have been stored
rs_fid: # in Mpc
# [Optional] Speed in evaluations/second
# (will be measured automatically if not specified)
speed: 2500
```

You can rename your BAO likelihood and use multiple ones with different data (see Custom names and multiple instances of the same internal class).

## Installation¶

This likelihood can be installed automatically as explained in Installing cosmological codes and data. If are following the instructions there (you should!), you don’t need to read the rest of this section.

### Manual installation of the BAO likelihood data¶

Assuming you are installing all your
likelihoods under `/path/to/likelihoods`

, simply do

```
$ cd /path/to/likelihoods
$ git clone https://github.com/CobayaSampler/bao_data.git
```

After this, mention the path to this likelihood when you include it in an input file, e.g.

```
likelihood:
bao.sdss_dr12_consensus_[bao|full_shape|final|...]:
path: /path/to/likelihoods/bao_data
```