The change in the CMB intensity due to Compton scattering of CMB photons off of thermal electrons in galaxy clusters, otherwise known as the Sunyaev-Zeldovich (S-Z) effect, can to a reasonable approximation be represented by a projection of the pressure field of a cluster. However, the full S-Z signal is a combination of thermal and kinetic contributions, and for large frequencies and high temperatures relativistic effects are important. For computing the full S-Z signal incorporating all of these effects, there is a library: SZpack (Chluba et al 2012).
ytSZ
makes it possible to make projections of the full S-Z signal given the
properties of the thermal gas in the simulation using SZpack. SZpack has
several different options for computing the S-Z signal, from full
integrations to very good approximations. Since a full or even a
partial integration of the signal for each cell in the projection
would be prohibitively expensive, we use the method outlined in
Chluba et al 2013 to
expand the total S-Z signal in terms of moments of the projected optical
depth , projected electron temperature
, and velocities and
(their equation 18):
ytSZ
makes projections of the various moments needed for the
calculation, and then the resulting projected fields are used to
compute the S-Z signal. In our implementation, the expansion is carried out
to first-order terms in and zeroth-order terms in
by default, but terms at higher-order can
be optionally included.
First, install SZpack by downloading version 1.1.1
here.
SZpack depends on GSL, which should
be installed such that the gsl-config
executable is in your path.
Then, ytsz
can be installed using pip
, but pip
needs to know where to
find the SZpack library. This can be done if you have compiled SZpack in
$HOME/SZpack.v1.1.1
, or if you set the environment variable SZPACK
to the
location of the SZpack.v1.1.1
directory before executing pip
. Then,
# Optionally set location of the SZpack installation
export SZPACK=$HOME/mylibs/SZpack.v1.1.1
python -m pip install ytsz
Or you can clone the source and install from there:
# This case assumes that SZpack is installed in $HOME/SZpack.v1.1.1
git clone https://github.com/jzuhone/ytsz
cd ytsz
python -m pip install .