# Modeling baryonic effects

The **PCA formalism** is an efficient baryonic physics mitigation technique. It utilizes suites of hydrodynamical simulations to build a set of principal components (PCs) to describe the modification of observables by baryonic physics. The PCA formalism has the following nice features:

- Flexible parametrization to capture a range of possible redshift and scale dependences of baryonic effects on the matter distribution, which is still highly uncertain from the constraints of hydrodynamical simulations.
- Not opening up too much degrees of freedom such that the cosmological information gained from small-scale modes being completely depleted due to model uncertainties.

## How does PCA work ?

Below are the procedures of applying the PCA technique to model baryonic effects on cosmic shear observables.

`Step 1`

**Build difference matrix** **Δ**

We collect several hydrodynamical simulations to generate baryon-contaminated model vectors **B _{sim}** in the same format as the cosmic shear observables. Then build a difference matrix with each of the column quantifying the baryonic feature in terms of the difference between the baryon-contamiated and the pure DMO model vectors,

**B**-

_{sim x}**M**.

`Step 2`

**Derive the noise-weighted difference matrix** **Δ _{ch}**

We weight the difference matrix **Δ** by the noise factor **L ^{-1}**. The

**L**matrix can be view as the squire root of the covariance matrix

**C**=

**L L**.

^{t}`Step 3`

**Perform PCA on** **Δ _{ch}**

We idenfy the PC basis set of **Δ _{ch}** through the singular value decomposition (SVD) analysis. The first

*N*PC modes can be used to efficiently span the baryonic fluctuations in each column of

**Δ**, i.e. the

_{ch}**B**-

_{sim x,ch}**M**vector.

_{ch}`Step 4`

**Generating baryonic models via combination of PC modes**

We can construct models with baryonic features via
.

The cosmological dependence comes in through the DMO theoritical models **M**(**p _{co}**), and the impact of baryons is characterized through the amplitudes of PC modes Q

_{i}. We have validated the flexibility of this parametrization in an LSST-like survey under several baryonic scenarios.

## Performances of PCA

We demonstrate in the above figure the effectiveness of applying the PCA technique to mitigate baryonic effects if our Universe were like the Illustris simulation. The biases in cosmological parameters reduced after marginalizing over few PC modes.