Skip to content

Commit

Permalink
upd tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
JaimeRZP committed Oct 13, 2023
1 parent cbe0f3e commit 07a5115
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions Tutorial/Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"id": "ff368c1c",
"metadata": {},
"source": [
"Computing the matter power spectrum is just as easy. However, the computation is subject to a series of options that the user can alter. By default $\\texttt{Cosmology}$ will use the E\\&H formula to find the primordial matter power spectrum and it will not apply non-linear corrections. These settings can be changed by specifying the keyword arguments $\\texttt{tk\\_mode}$ and $\\texttt{pk\\_mode}$ which control the used transfer function and whether non-linear corrections are applied to the power spectrum respectively. In terms transfer function $\\texttt{LimberJack}$ offers two possibilities $\\texttt{tk\\_mode}$ = $\\texttt{EisHu}$ (default) / $\\texttt{EmuPk}$ which correspond to using the Eisenstein and Hu formula, $\\texttt{EmuPk}$ or $\\texttt{Bolt.jl}$ to find the primordial matter power spectrum respectively. Similarly, $\\texttt{pk\\_mode}$ = $\\texttt{linear}$ / $\\texttt{Halofit}$ which determines whether or not non-linear corrections are applied using $\\texttt{Halofit}$. $\\texttt{LimberJack.jl}$ offers two distinct public functions to evaluate either the linear or non-linear matter power spectrum regardless of the choice in $\\texttt{pk\\_mode}$. However, if $\\texttt{pk\\_mode}$ = $\\texttt{linear}$ the two functions will return the linear matter power spectrum."
"Computing the matter power spectrum is just as easy. However, the computation is subject to a series of options that the user can alter. By default $\\texttt{Cosmology}$ will use the E\\&H formula to find the matter power spectrum and it will not apply non-linear corrections. These settings can be changed by specifying the keyword arguments $\\texttt{tk\\_mode}$ and $\\texttt{pk\\_mode}$ which control the used transfer function and whether non-linear corrections are applied to the power spectrum respectively. In terms transfer function $\\texttt{LimberJack}$ offers two possibilities $\\texttt{tk\\_mode}$ = $\\texttt{EisHu}$ (default) / $\\texttt{EmuPk}$ which correspond to using the Eisenstein and Hu formula or $\\texttt{:EmuPk}$. Similarly, $\\texttt{pk\\_mode}$ = $\\texttt{:linear}$ / $\\texttt{:Halofit}$ which determines whether or not non-linear corrections are applied using $\\texttt{Halofit}$. $\\texttt{LimberJack.jl}$ offers two distinct public functions to evaluate either the linear or non-linear matter power spectrum regardless of the choice in $\\texttt{pk\\_mode}$. However, if $\\texttt{pk\\_mode}$ = $\\texttt{:linear}$ the two functions will return the linear matter power spectrum."
]
},
{
Expand All @@ -69,32 +69,26 @@
"cosmo_lin_EisHu = Cosmology(Omega_m=0.25, Omega_b=0.03,\n",
" h=0.70, ns=1.0,\n",
" sigma_8=0.78,\n",
" tk\\_mode=\"EisHu\",\n",
" pk\\_mode=\"linear\") \n",
" tk\\_mode=:EisHu,\n",
" pk\\_mode=:linear) \n",
" \n",
"cosmo_nonlin_EisHu = Cosmology(Omega_m=0.25, Omega_b=0.03,\n",
" h=0.70, ns=1.0,\n",
" sigma_8=0.78,\n",
" tk\\_mode=\"EisHu\",\n",
" pk\\_mode=\"Halofit\") \n",
" tk\\_mode=:EisHu,\n",
" pk\\_mode=:Halofit) \n",
"\n",
"cosmo_nonlin_emupk = Cosmology(Omega_m=0.25, Omega_b=0.03,\n",
" h=0.70, ns=1.0,\n",
" sigma_8=0.78,\n",
" tk\\_mode=\"emupk\",\n",
" pk\\_mode=\"Halofit\")\n",
" tk\\_mode=:EmuPk,\n",
" pk\\_mode=:Halofit)\n",
"\n",
"cosmo_nonlin_bolt = Cosmology(Omega_m=0.25, Omega_b=0.03,\n",
" h=0.70, ns=1.0,\n",
" sigma_8=0.78,\n",
" tk\\_mode=\"Bolt\",\n",
" pk\\_mode=\"Halofit\") \n",
"zs = [0.1, 0.3, 0.5]\n",
"ks = [100, 300, 1000]\n",
"lin_eh_Pks = lin_Pk(cosmo_lin_EisHu, ks, zs) = nonlin_Pk(cosmo_lin_EisHu, ks, zs)\n",
"nonlin_eh_Pks = nonlin_Pk(cosmo_nonlin_EisHu, ks, zs)\n",
"nonlin_emupk_Pks = nonlin_Pk(cosmo_nonlin_emupk, ks, zs)\n",
"nonlin_bolt_Pks = nonlin_Pk(cosmo_nonlin_bolt, ks, zs)"
"nonlin_emupk_Pks = nonlin_Pk(cosmo_nonlin_emupk, ks, zs)"
]
},
{
Expand Down Expand Up @@ -190,10 +184,10 @@
"@model function model(data;\n",
" meta=meta, \n",
" files=files)\n",
" |$\\Omega_m$| ~ Uniform(0.2, 0.6)\n",
" |$\\Omega_b$| ~ Uniform(0.028, 0.065)\n",
" Ωm ~ Uniform(0.2, 0.6)\n",
" Ωb ~ Uniform(0.028, 0.065)\n",
" h ~ TruncatedNormal(0.72, 0.05, 0.64, 0.82)\n",
" |$\\sigma_8$| ~ Uniform(0.4, 1.2)\n",
" σ8 ~ Uniform(0.4, 1.2)\n",
" ns ~ Uniform(0.84, 1.1)\n",
"\n",
" DESgc__0_b ~ Uniform(0.8, 3.0)\n",
Expand Down Expand Up @@ -238,10 +232,9 @@
" \"A_IA\" => A_IA,\n",
" \"alpha_IA\" => alpha_IA,)\n",
"\n",
" cosmology = Cosmology(|$\\Omega_m$|=|$\\Omega_m$|, |$\\Omega_b$|=|$\\Omega_b$|,\n",
" h=h, ns=ns, |$\\sigma_8$|=|$\\sigma_8$|,\n",
" tk\\_mode=\"EisHu\",\n",
" pk\\_mode=\"Halofit\")\n",
" cosmology = Cosmology(Ωm= Ωm, Ωb=Ωb, h=h, ns=ns, σ8=σ8,\n",
" tk_mode=:EisHu,\n",
" pk_mode=:Halofit)\n",
"\n",
" theory = Theory(cosmology, meta, files; Nuisances=nuisances)\n",
" data ~ MvNormal(theory, cov)\n",
Expand Down

0 comments on commit 07a5115

Please sign in to comment.