Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dm-interactions
class_v2.7_nuDM
Commits
d8286d4e
Commit
d8286d4e
authored
Sep 10, 2018
by
lesgourg
Browse files
added 11 notebooks and equivalent scripts (cambridge version)
parent
1a71160d
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
notebooks/cl_ST.ipynb
0 → 100644
View file @
d8286d4e
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"# import necessary modules\n",
"# uncomment to get plots displayed in notebook\n",
"%matplotlib inline\n",
"import matplotlib\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from classy import Class\n",
"from scipy.optimize import fsolve\n",
"from scipy.interpolate import interp1d\n",
"import math"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"# esthetic definitions for the plots\n",
"font = {'size' : 16, 'family':'STIXGeneral'}\n",
"axislabelfontsize='large'\n",
"matplotlib.rc('font', **font)\n",
"matplotlib.mathtext.rcParams['legend.fontsize']='medium'\n",
"plt.rcParams[\"figure.figsize\"] = [8.0,6.0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"#############################################\n",
"#\n",
"# Cosmological parameters and other CLASS parameters\n",
"#\n",
"common_settings = {# wich output? ClTT, transfer functions delta_i and theta_i\n",
" 'output':'tCl,pCl,lCl',\n",
" # LambdaCDM parameters\n",
" 'h':0.67556,\n",
" 'omega_b':0.022032,\n",
" 'omega_cdm':0.12038,\n",
" 'A_s':2.215e-9,\n",
" 'tau_reio':0.0925,\n",
" # Take fixed value for primordial Helium (instead of automatic BBN adjustment)\n",
" 'YHe':0.246}\n",
" # other output and precision parameters\n",
" #'l_max_scalars':3000}\n",
"###############\n",
"# \n",
"# call CLASS \n",
"#\n",
"###############\n",
"#\n",
"# scalars only\n",
"#\n",
"M = Class()\n",
"M.set(common_settings)\n",
"M.set({'output':'tCl,pCl','modes':'s','lensing':'no','n_s':0.9619,'l_max_scalars':3000})\n",
"M.compute()\n",
"cls = M.raw_cl(3000)\n",
"M.struct_cleanup()\n",
"M.empty()\n",
"#\n",
"# tensors only\n",
"#\n",
"M = Class()\n",
"M.set(common_settings)\n",
"l_max_tensors = 600\n",
"M.set({'output':'tCl,pCl','modes':'t','lensing':'no','r':0.1,'n_t':0,'l_max_tensors':l_max_tensors})\n",
"# for l_max=600 we can keep default precision\n",
"# for l_max = 3000 we would need to import many high precision settings from the file cl_ref.pre\n",
"#M.set({'output':'tCl,pCl','modes':'t','lensing':'no','r':0.1,'n_t':0,'l_max_tensors':3000})\n",
"#M.set({\n",
"#'recfast_Nz0':100000,\n",
"#'tol_thermo_integration':1.e-5,\n",
"#'recfast_x_He0_trigger_delta':0.01,\n",
"#'recfast_x_H0_trigger_delta':0.01,\n",
"#'evolver':0,\n",
"#'k_min_tau0':0.002,\n",
"#'k_max_tau0_over_l_max':3.,\n",
"#'k_step_sub':0.015,\n",
"#'k_step_super':0.0001,\n",
"#'k_step_super_reduction':0.1,\n",
"#'start_small_k_at_tau_c_over_tau_h':0.0004,\n",
"#'start_large_k_at_tau_h_over_tau_k':0.05,\n",
"#'tight_coupling_trigger_tau_c_over_tau_h':0.005,\n",
"#'tight_coupling_trigger_tau_c_over_tau_k':0.008,\n",
"#'start_sources_at_tau_c_over_tau_h':0.006,\n",
"#'l_max_g':50,\n",
"#'l_max_pol_g':25,\n",
"#'l_max_ur':50,\n",
"#'tol_perturb_integration':1.e-6,\n",
"#'perturb_sampling_stepsize':0.01,\n",
"#'radiation_streaming_approximation':2,\n",
"#'radiation_streaming_trigger_tau_over_tau_k':240.,\n",
"#'radiation_streaming_trigger_tau_c_over_tau':100.,\n",
"#'ur_fluid_approximation':2,\n",
"#'ur_fluid_trigger_tau_over_tau_k':50.,\n",
"#'l_logstep':1.026,\n",
"#'l_linstep':25,\n",
"#'hyper_sampling_flat':12.,\n",
"#'hyper_nu_sampling_step':10.,\n",
"#'hyper_phi_min_abs':1.e-10,\n",
"#'hyper_x_tol':1.e-4,\n",
"#'hyper_flat_approximation_nu':1.e6,\n",
"#'q_linstep':0.20,\n",
"#'q_logstep_spline':20.,\n",
"#'q_logstep_trapzd':0.5,\n",
"#'q_numstep_transition':250,\n",
"#'transfer_neglect_delta_k_T_t2':100.,\n",
"#'transfer_neglect_delta_k_T_e':100.,\n",
"#'transfer_neglect_delta_k_T_b':100.,\n",
"#'neglect_CMB_sources_below_visibility':1.e-30,\n",
"#'transfer_neglect_late_source':3000.\n",
"#})\n",
"M.compute()\n",
"clt = M.raw_cl(l_max_tensors)\n",
"M.struct_cleanup()\n",
"M.empty()\n",
"#\n",
"# scalars + tensors (only in this case we can get the correct lensed ClBB)\n",
"#\n",
"M = Class()\n",
"M.set(common_settings)\n",
"M.set({'output':'tCl,pCl,lCl','modes':'s,t','lensing':'yes','r':0.1,'n_s':0.9619,'n_t':0,'l_max_scalars':3000,'l_max_tensors':l_max_tensors})\n",
"M.compute()\n",
"cl_tot = M.raw_cl(3000)\n",
"cl_lensed = M.lensed_cl(3000)\n",
"M.struct_cleanup()\n",
"M.empty()\n",
"#\n",
"#################\n",
"#\n",
"# start plotting\n",
"#\n",
"#################\n",
"#\n",
"plt.xlim([2,3000])\n",
"plt.ylim([1.e-8,10])\n",
"plt.xlabel(r\"$\\ell$\")\n",
"plt.ylabel(r\"$\\ell (\\ell+1) C_l^{XY} / 2 \\pi \\,\\,\\, [\\times 10^{10}]$\")\n",
"plt.title(r\"$r=0.1$\")\n",
"plt.grid()\n",
"#\n",
"ell = cl_tot['ell']\n",
"ellt = clt['ell']\n",
"factor = 1.e10*ell*(ell+1.)/2./math.pi\n",
"factort = 1.e10*ellt*(ellt+1.)/2./math.pi\n",
"#\n",
"plt.loglog(ell,factor*cls['tt'],'r-',label=r'$\\mathrm{TT(s)}$')\n",
"plt.loglog(ellt,factort*clt['tt'],'r:',label=r'$\\mathrm{TT(t)}$')\n",
"plt.loglog(ell,factor*cls['ee'],'b-',label=r'$\\mathrm{EE(s)}$')\n",
"plt.loglog(ellt,factort*clt['ee'],'b:',label=r'$\\mathrm{EE(t)}$')\n",
"plt.loglog(ellt,factort*clt['bb'],'g:',label=r'$\\mathrm{BB(t)}$')\n",
"plt.loglog(ell,factor*(cl_lensed['bb']-cl_tot['bb']),'g-',label=r'$\\mathrm{BB(lensing)}$')\n",
"plt.legend(loc='right',bbox_to_anchor=(1.4, 0.5))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"plt.savefig('cl_ST.pdf',bbox_inches='tight')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.13"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
%% Cell type:code id: tags:
```
python
# import necessary modules
# uncomment to get plots displayed in notebook
%
matplotlib
inline
import
matplotlib
import
matplotlib.pyplot
as
plt
import
numpy
as
np
from
classy
import
Class
from
scipy.optimize
import
fsolve
from
scipy.interpolate
import
interp1d
import
math
```
%% Cell type:code id: tags:
```
python
# esthetic definitions for the plots
font
=
{
'size'
:
16
,
'family'
:
'STIXGeneral'
}
axislabelfontsize
=
'large'
matplotlib
.
rc
(
'font'
,
**
font
)
matplotlib
.
mathtext
.
rcParams
[
'legend.fontsize'
]
=
'medium'
plt
.
rcParams
[
"figure.figsize"
]
=
[
8.0
,
6.0
]
```
%% Cell type:code id: tags:
```
python
#############################################
#
# Cosmological parameters and other CLASS parameters
#
common_settings
=
{
# wich output? ClTT, transfer functions delta_i and theta_i
'output'
:
'tCl,pCl,lCl'
,
# LambdaCDM parameters
'h'
:
0.67556
,
'omega_b'
:
0.022032
,
'omega_cdm'
:
0.12038
,
'A_s'
:
2.215e-9
,
'tau_reio'
:
0.0925
,
# Take fixed value for primordial Helium (instead of automatic BBN adjustment)
'YHe'
:
0.246
}
# other output and precision parameters
#'l_max_scalars':3000}
###############
#
# call CLASS
#
###############
#
# scalars only
#
M
=
Class
()
M
.
set
(
common_settings
)
M
.
set
({
'output'
:
'tCl,pCl'
,
'modes'
:
's'
,
'lensing'
:
'no'
,
'n_s'
:
0.9619
,
'l_max_scalars'
:
3000
})
M
.
compute
()
cls
=
M
.
raw_cl
(
3000
)
M
.
struct_cleanup
()
M
.
empty
()
#
# tensors only
#
M
=
Class
()
M
.
set
(
common_settings
)
l_max_tensors
=
600
M
.
set
({
'output'
:
'tCl,pCl'
,
'modes'
:
't'
,
'lensing'
:
'no'
,
'r'
:
0.1
,
'n_t'
:
0
,
'l_max_tensors'
:
l_max_tensors
})
# for l_max=600 we can keep default precision
# for l_max = 3000 we would need to import many high precision settings from the file cl_ref.pre
#M.set({'output':'tCl,pCl','modes':'t','lensing':'no','r':0.1,'n_t':0,'l_max_tensors':3000})
#M.set({
#'recfast_Nz0':100000,
#'tol_thermo_integration':1.e-5,
#'recfast_x_He0_trigger_delta':0.01,
#'recfast_x_H0_trigger_delta':0.01,
#'evolver':0,
#'k_min_tau0':0.002,
#'k_max_tau0_over_l_max':3.,
#'k_step_sub':0.015,
#'k_step_super':0.0001,
#'k_step_super_reduction':0.1,
#'start_small_k_at_tau_c_over_tau_h':0.0004,
#'start_large_k_at_tau_h_over_tau_k':0.05,
#'tight_coupling_trigger_tau_c_over_tau_h':0.005,
#'tight_coupling_trigger_tau_c_over_tau_k':0.008,
#'start_sources_at_tau_c_over_tau_h':0.006,
#'l_max_g':50,
#'l_max_pol_g':25,
#'l_max_ur':50,
#'tol_perturb_integration':1.e-6,
#'perturb_sampling_stepsize':0.01,
#'radiation_streaming_approximation':2,
#'radiation_streaming_trigger_tau_over_tau_k':240.,
#'radiation_streaming_trigger_tau_c_over_tau':100.,
#'ur_fluid_approximation':2,
#'ur_fluid_trigger_tau_over_tau_k':50.,
#'l_logstep':1.026,
#'l_linstep':25,
#'hyper_sampling_flat':12.,
#'hyper_nu_sampling_step':10.,
#'hyper_phi_min_abs':1.e-10,
#'hyper_x_tol':1.e-4,
#'hyper_flat_approximation_nu':1.e6,
#'q_linstep':0.20,
#'q_logstep_spline':20.,
#'q_logstep_trapzd':0.5,
#'q_numstep_transition':250,
#'transfer_neglect_delta_k_T_t2':100.,
#'transfer_neglect_delta_k_T_e':100.,
#'transfer_neglect_delta_k_T_b':100.,
#'neglect_CMB_sources_below_visibility':1.e-30,
#'transfer_neglect_late_source':3000.
#})
M
.
compute
()
clt
=
M
.
raw_cl
(
l_max_tensors
)
M
.
struct_cleanup
()
M
.
empty
()
#
# scalars + tensors (only in this case we can get the correct lensed ClBB)
#
M
=
Class
()
M
.
set
(
common_settings
)
M
.
set
({
'output'
:
'tCl,pCl,lCl'
,
'modes'
:
's,t'
,
'lensing'
:
'yes'
,
'r'
:
0.1
,
'n_s'
:
0.9619
,
'n_t'
:
0
,
'l_max_scalars'
:
3000
,
'l_max_tensors'
:
l_max_tensors
})
M
.
compute
()
cl_tot
=
M
.
raw_cl
(
3000
)
cl_lensed
=
M
.
lensed_cl
(
3000
)
M
.
struct_cleanup
()
M
.
empty
()
#
#################
#
# start plotting
#
#################
#
plt
.
xlim
([
2
,
3000
])
plt
.
ylim
([
1.e-8
,
10
])
plt
.
xlabel
(
r
"$\ell$"
)
plt
.
ylabel
(
r
"$\ell (\ell+1) C_l^{XY} / 2 \pi \,\,\, [\times 10^{10}]$"
)
plt
.
title
(
r
"$r=0.1$"
)
plt
.
grid
()
#
ell
=
cl_tot
[
'ell'
]
ellt
=
clt
[
'ell'
]
factor
=
1.e10
*
ell
*
(
ell
+
1.
)
/
2.
/
math
.
pi
factort
=
1.e10
*
ellt
*
(
ellt
+
1.
)
/
2.
/
math
.
pi
#
plt
.
loglog
(
ell
,
factor
*
cls
[
'tt'
],
'r-'
,
label
=
r
'$\mathrm{TT(s)}$'
)
plt
.
loglog
(
ellt
,
factort
*
clt
[
'tt'
],
'r:'
,
label
=
r
'$\mathrm{TT(t)}$'
)
plt
.
loglog
(
ell
,
factor
*
cls
[
'ee'
],
'b-'
,
label
=
r
'$\mathrm{EE(s)}$'
)
plt
.
loglog
(
ellt
,
factort
*
clt
[
'ee'
],
'b:'
,
label
=
r
'$\mathrm{EE(t)}$'
)
plt
.
loglog
(
ellt
,
factort
*
clt
[
'bb'
],
'g:'
,
label
=
r
'$\mathrm{BB(t)}$'
)
plt
.
loglog
(
ell
,
factor
*
(
cl_lensed
[
'bb'
]
-
cl_tot
[
'bb'
]),
'g-'
,
label
=
r
'$\mathrm{BB(lensing)}$'
)
plt
.
legend
(
loc
=
'right'
,
bbox_to_anchor
=
(
1.4
,
0.5
))
```
%% Cell type:code id: tags:
```
python
plt
.
savefig
(
'cl_ST.pdf'
,
bbox_inches
=
'tight'
)
```
notebooks/cltt_terms.ipynb
0 → 100644
View file @
d8286d4e
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"# import necessary modules\n",
"# uncomment to get plots displayed in notebook\n",
"%matplotlib inline\n",
"import matplotlib\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from classy import Class\n",
"from scipy.optimize import fsolve\n",
"from scipy.interpolate import interp1d\n",
"import math"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"# esthetic definitions for the plots\n",
"font = {'size' : 16, 'family':'STIXGeneral'}\n",
"axislabelfontsize='large'\n",
"matplotlib.rc('font', **font)\n",
"matplotlib.mathtext.rcParams['legend.fontsize']='medium'\n",
"plt.rcParams[\"figure.figsize\"] = [8.0,6.0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"#############################################\n",
"#\n",
"# Cosmological parameters and other CLASS parameters\n",
"#\n",
"common_settings = {# wich output? ClTT, transfer functions delta_i and theta_i\n",
" 'output':'tCl,pCl,lCl',\n",
" 'lensing':'yes',\n",
" # LambdaCDM parameters\n",
" 'h':0.67556,\n",
" 'omega_b':0.022032,\n",
" 'omega_cdm':0.12038,\n",
" 'A_s':2.215e-9,\n",
" 'n_s':0.9619,\n",
" 'tau_reio':0.0925,\n",
" # Take fixed value for primordial Helium (instead of automatic BBN adjustment)\n",
" 'YHe':0.246,\n",
" # other output and precision parameters\n",
" 'l_max_scalars':5000}\n",
"###############\n",
"# \n",
"# call CLASS \n",
"#\n",
"M = Class()\n",
"M.set(common_settings)\n",
"M.compute()\n",
"cl_tot = M.raw_cl(3000)\n",
"cl_lensed = M.lensed_cl(3000)\n",
"M.struct_cleanup() # clean output\n",
"M.empty() # clean input\n",
"#\n",
"M.set(common_settings) # new input\n",
"M.set({'temperature contributions':'tsw'}) \n",
"M.compute()\n",
"cl_tsw = M.raw_cl(3000) \n",
"M.struct_cleanup()\n",
"M.empty()\n",
"#\n",
"M.set(common_settings)\n",
"M.set({'temperature contributions':'eisw'})\n",
"M.compute()\n",
"cl_eisw = M.raw_cl(3000) \n",
"M.struct_cleanup()\n",
"M.empty()\n",
"#\n",
"M.set(common_settings)\n",
"M.set({'temperature contributions':'lisw'})\n",
"M.compute()\n",
"cl_lisw = M.raw_cl(3000) \n",
"M.struct_cleanup()\n",
"M.empty()\n",
"#\n",
"M.set(common_settings)\n",
"M.set({'temperature contributions':'dop'})\n",
"M.compute()\n",
"cl_dop = M.raw_cl(3000) \n",
"#\n",
"#################\n",
"#\n",
"# start plotting\n",
"#\n",
"#################\n",
"#\n",
"plt.xlim([2,3000])\n",
"plt.xlabel(r\"$\\ell$\")\n",
"plt.ylabel(r\"$\\ell (\\ell+1) C_l^{TT} / 2 \\pi \\,\\,\\, [\\times 10^{10}]$\")\n",
"plt.grid()\n",
"#\n",
"ell = cl_tot['ell']\n",
"factor = 1.e10*ell*(ell+1.)/2./math.pi\n",
"plt.semilogx(ell,factor*cl_tsw['tt'],'c-',label=r'$\\mathrm{T+SW}$')\n",
"plt.semilogx(ell,factor*cl_eisw['tt'],'r-',label=r'$\\mathrm{early-ISW}$')\n",
"plt.semilogx(ell,factor*cl_lisw['tt'],'y-',label=r'$\\mathrm{late-ISW}$')\n",
"plt.semilogx(ell,factor*cl_dop['tt'],'g-',label=r'$\\mathrm{Doppler}$')\n",
"plt.semilogx(ell,factor*cl_tot['tt'],'r-',label=r'$\\mathrm{total}$')\n",
"plt.semilogx(ell,factor*cl_lensed['tt'],'k-',label=r'$\\mathrm{lensed}$')\n",
"#\n",
"plt.legend(loc='right',bbox_to_anchor=(1.4, 0.5))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"plt.savefig('cltt_terms.pdf',bbox_inches='tight')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.13"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
%% Cell type:code id: tags:
```
python
# import necessary modules
# uncomment to get plots displayed in notebook
%
matplotlib
inline
import
matplotlib
import
matplotlib.pyplot
as
plt
import
numpy
as
np
from
classy
import
Class
from
scipy.optimize
import
fsolve
from
scipy.interpolate
import
interp1d
import
math
```
%% Cell type:code id: tags:
```
python
# esthetic definitions for the plots
font
=
{
'size'
:
16
,
'family'
:
'STIXGeneral'
}
axislabelfontsize
=
'large'
matplotlib
.
rc
(
'font'
,
**
font
)
matplotlib
.
mathtext
.
rcParams
[
'legend.fontsize'
]
=
'medium'
plt
.
rcParams
[
"figure.figsize"
]
=
[
8.0
,
6.0
]
```
%% Cell type:code id: tags:
```
python
#############################################
#
# Cosmological parameters and other CLASS parameters
#
common_settings
=
{
# wich output? ClTT, transfer functions delta_i and theta_i
'output'
:
'tCl,pCl,lCl'
,
'lensing'
:
'yes'
,
# LambdaCDM parameters
'h'
:
0.67556
,
'omega_b'
:
0.022032
,
'omega_cdm'
:
0.12038
,
'A_s'
:
2.215e-9
,
'n_s'
:
0.9619
,
'tau_reio'
:
0.0925
,
# Take fixed value for primordial Helium (instead of automatic BBN adjustment)
'YHe'
:
0.246
,
# other output and precision parameters
'l_max_scalars'
:
5000
}
###############
#
# call CLASS
#
M
=
Class
()
M
.
set
(
common_settings
)
M
.
compute
()
cl_tot
=
M
.
raw_cl
(
3000
)
cl_lensed
=
M
.
lensed_cl
(
3000
)
M
.
struct_cleanup
()
# clean output
M
.
empty
()
# clean input
#
M
.
set
(
common_settings
)
# new input
M
.
set
({
'temperature contributions'
:
'tsw'
})
M
.
compute
()
cl_tsw
=
M
.
raw_cl
(
3000
)
M
.
struct_cleanup
()
M
.
empty
()
#
M
.
set
(
common_settings
)
M
.
set
({
'temperature contributions'
:
'eisw'
})
M
.
compute
()
cl_eisw
=
M
.
raw_cl
(
3000
)
M
.
struct_cleanup
()
M
.
empty
()
#
M
.
set
(
common_settings
)
M
.
set
({
'temperature contributions'
:
'lisw'
})
M
.
compute
()
cl_lisw
=
M
.
raw_cl
(
3000
)
M
.
struct_cleanup
()
M
.
empty
()
#
M
.
set
(
common_settings
)
M
.
set
({
'temperature contributions'
:
'dop'
})
M
.
compute
()
cl_dop
=
M
.
raw_cl
(
3000
)
#
#################
#
# start plotting
#
#################
#
plt
.
xlim
([
2
,
3000
])
plt
.
xlabel
(
r
"$\ell$"
)
plt
.
ylabel
(
r
"$\ell (\ell+1) C_l^{TT} / 2 \pi \,\,\, [\times 10^{10}]$"
)
plt
.
grid
()
#
ell
=
cl_tot
[
'ell'
]
factor
=
1.e10
*
ell
*
(
ell
+
1.
)
/
2.
/
math
.
pi
plt
.
semilogx
(
ell
,
factor
*
cl_tsw
[
'tt'
],
'c-'
,
label
=
r
'$\mathrm{T+SW}$'
)
plt
.
semilogx
(
ell
,
factor
*
cl_eisw
[
'tt'
],
'r-'
,
label
=
r
'$\mathrm{early-ISW}$'
)
plt
.
semilogx
(
ell
,
factor
*
cl_lisw
[
'tt'
],
'y-'
,
label
=
r
'$\mathrm{late-ISW}$'
)
plt
.
semilogx
(
ell
,
factor
*
cl_dop
[
'tt'
],
'g-'
,
label
=
r
'$\mathrm{Doppler}$'
)
plt
.
semilogx
(
ell
,
factor
*
cl_tot
[
'tt'
],
'r-'
,
label
=
r
'$\mathrm{total}$'
)
plt
.
semilogx
(
ell
,
factor
*
cl_lensed
[
'tt'
],
'k-'
,
label
=
r
'$\mathrm{lensed}$'
)
#
plt
.
legend
(
loc
=
'right'
,
bbox_to_anchor
=
(
1.4
,
0.5
))
```