-
Notifications
You must be signed in to change notification settings - Fork 0
New horndeski #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
1cc5abc
7eddf13
cbec3bf
b90846a
21cf815
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,24 +17,21 @@ double C_shear_tomo(double l, int ni, int nj); //shear tomography power spectra | |
| double C_shear_tomo_nointerp(double l, int ni, int nj); | ||
| /**********************************************************/ | ||
|
|
||
| double MG_Sigma(double a) | ||
| { | ||
| // double aa=a*a; | ||
| // double omegam=cosmology.Omega_m/(aa*a); | ||
| double omegav=omv_vareos(a); | ||
| double hub=hoverh0(a); | ||
| hub = hub*hub; | ||
|
|
||
| return cosmology.MGSigma*omegav/hub/cosmology.Omega_v; | ||
| } | ||
|
|
||
| double dchi_da(double a){ | ||
| return 1./(a*a*hoverh0(a)); | ||
| } | ||
| double W_kappa(double a, double fK, double nz){ | ||
| double wkappa = 1.5*cosmology.Omega_m*fK/a*g_tomo(a,(int)nz); | ||
| double aa=a*a; | ||
| double omegam=cosmology.Omega_m/(aa*a); | ||
| double omegav=omv_vareos(a); | ||
| double hub = hoverh0(a); | ||
| hub = hub*hub; | ||
| if(cosmology.MGSigma != 0.){ | ||
|
||
| wkappa *= (1.+MG_Sigma(a)); | ||
| wkappa *= (1.+MG_sigma(a, omegav, hub)); | ||
| } | ||
| else if (cosmology.MGalpha_K != 0 || cosmology.MGalpha_B != 0 || cosmology.MGalpha_T != 0 || cosmology.MGalpha_M != 0){ | ||
| wkappa*= (1.+horndeski_sigma(a, omegav, hub, omegam)); | ||
| } | ||
| return wkappa; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,7 +99,10 @@ int func_for_growfac(double a,const double y[],double f[],void *params) | |
| hub = hub*hub; | ||
| f[0]=y[1]; | ||
| if(cosmology.MGmu != 0){ | ||
|
||
| one_plus_mg_mu += cosmology.MGmu*omegav/hub/cosmology.Omega_v; | ||
| one_plus_mg_mu += MG_mu(omegav, hub); | ||
| } | ||
| else if (cosmology.MGalpha_K != 0 || cosmology.MGalpha_B != 0 || cosmology.MGalpha_T != 0 || cosmology.MGalpha_M != 0){ | ||
| one_plus_mg_mu += horndeski_mu(a, omegav, hub, omegam); | ||
| } | ||
| f[1]=y[0]*3.*cosmology.Omega_m/(2.*hub*aa*aa*a)*one_plus_mg_mu-y[1]/a*(2.-(omegam+(3.*(cosmology.w0+cosmology.wa*(1.-a))+1)*omegav)/(2.*hub)); | ||
| return GSL_SUCCESS; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| double MG_mu(double omegav, double hub); | ||
| double MG_sigma(double a, double omegav, double hub); | ||
| double horndeski_mu(double a, double omegav, double hub, double omegam); | ||
| double horndeski_sigma(double a, double omegav, double hub, double omegam); | ||
| double horndeski_cs_sqrd(double a, double fz, double fzprime, double H, double Hprime, double omegam, double hub); | ||
| double horndeski_alpha(double a, double fz); | ||
| /**********************************************************/ | ||
|
|
||
| double MG_mu(double omegav, double hub){ | ||
| return cosmology.MGmu*omegav/hub/cosmology.Omega_v; | ||
| } | ||
|
|
||
| double MG_sigma(double a, double omegav, double hub){ | ||
| return cosmology.MGSigma*omegav/hub/cosmology.Omega_v; | ||
| } | ||
| double horndeski_mu(double a, double omegav, double hub, double omegam){ | ||
| //this is all in the quasistatic limit!! | ||
| //given by Eqn 43 in Tessa Baker notes | ||
| //!!!!currently assuming Mpl = Mstar!!!! | ||
| double fz = omegav/hub*1./cosmology.Omega_v; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a comment saying how this is defined, please? We might want to use a different definition at some point, so good to be clear what this is. |
||
| double wde = cosmology.w0 + cosmology.wa*(1. - a); | ||
| double H = (100. * cosmology.h0 / constants.lightspeed) * sqrt(hub); | ||
| double Hprime = -0.5*H*H*(omegam/hub+omegav/hub*(1.+3.*wde))-H*H; | ||
| double fzprime = -3.*wde * a*H * omegam/hub * fz; | ||
| double alpha = horndeski_alpha(a, fz); | ||
| double cs_sqrd = horndeski_cs_sqrd(a, fz, fzprime, H, Hprime,omegam, hub); | ||
| ///////////// | ||
| double alpha_K = cosmology.MGalpha_K*fz; | ||
| double alpha_B = cosmology.MGalpha_B*fz; | ||
| double alpha_T = cosmology.MGalpha_T*fz; | ||
| double alpha_M = cosmology.MGalpha_M*fz; | ||
| //////////// | ||
| double mu_term1 = alpha*cs_sqrd*(1+alpha_T)*(1+alpha_T); | ||
| double mu_term2 = (-alpha_B*(1+alpha_T)+ 2*(alpha_T - alpha_M))*(-alpha_B*(1+alpha_T)+ 2*(alpha_T - alpha_M)); | ||
| double mu = (mu_term1+mu_term2)/(alpha*cs_sqrd) - 1.; | ||
| return mu; | ||
| } | ||
|
|
||
| double horndeski_sigma(double a, double omegav, double hub, double omegam){ | ||
| //this is all in the quasistatic limit!! | ||
| //also assumes Mpl = Mstar!!!! | ||
| //alpha function redshift scaling | ||
| double fz = omegav/hub*1./cosmology.Omega_v; | ||
| double wde = cosmology.w0 + cosmology.wa*(1. - a); | ||
| double H = (100. * cosmology.h0 / constants.lightspeed) * sqrt(hub); | ||
| double Hprime = -0.5*H*H*(omegam/hub+omegav/hub*(1.+3.*wde))-H*H; | ||
| double fzprime = -3.*wde * a*H * omegam/hub * fz; | ||
| //define actual alpha functions: fz*alpha_X,0 | ||
| double alpha_K = cosmology.MGalpha_K*fz; | ||
| double alpha_B = cosmology.MGalpha_B*fz; | ||
| double alpha_T = cosmology.MGalpha_T*fz; | ||
| double alpha_M = cosmology.MGalpha_M*fz; | ||
| //helpful functions (see Tessa Baker's notes) | ||
| double alpha = horndeski_alpha(a, fz); | ||
| double cs_sqrd = horndeski_cs_sqrd(a, fz, fzprime, H, Hprime, omegam, hub); | ||
| //given by gamma Eqn. 44 in Tessa Baker notes | ||
| double num = alpha*cs_sqrd-alpha_B*(-alpha_B/(2.*(1.+alpha_T))+alpha_T-alpha_M); | ||
| double denom = alpha*cs_sqrd*(1.+alpha_T)+(-alpha_B*(1.+alpha_T)+2.*(alpha_T-alpha_M))*(-alpha_B*(1.+alpha_T)+2.*(alpha_T-alpha_M)); | ||
| double mu = horndeski_mu(a, omegav, hub, omegam); | ||
| return 0.5*(1+mu)*(num/denom+1.); | ||
| } | ||
| double horndeski_cs_sqrd(double a, double fz, double fzprime, double H, double Hprime, double omegam, double hub){ | ||
| double alpha_K = cosmology.MGalpha_K*fz; | ||
| double alpha_B = cosmology.MGalpha_B*fz; | ||
| double alpha_T = cosmology.MGalpha_T*fz; | ||
| double alpha_M = cosmology.MGalpha_M*fz; | ||
|
|
||
| double alpha = horndeski_alpha(a, fz); | ||
| double cs_term1 = (2.-alpha_B)*(Hprime - (alpha_M -alpha_T)*H*H-H*H*alpha_B/(2.*(1.+alpha_T))); | ||
|
||
| //!!!!!!!!Assuming Mpl = Mstar!!!!!!!!!!!!! | ||
| double cs_term2 = -H*cosmology.MGalpha_B*fzprime + 1.5*H*H*omegam/hub; | ||
| double cs_sqrd = -(cs_term1 + cs_term2)/(H*H*alpha); | ||
| return cs_sqrd; | ||
| } | ||
| double horndeski_alpha(double a, double fz){ | ||
|
||
| //Helpful function -- see Tessa Baker's notes | ||
| double alpha_K = cosmology.MGalpha_K*fz; | ||
| double alpha_B = cosmology.MGalpha_B*fz; | ||
| return alpha_K + 1.5*alpha_B*alpha_B; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably don't need to define this separately, as
aais only used once.