Guide to EFTCosmoMC_Oct14


There might exist some typos in this guide, please check it carefully with our original source codes. If you encounter any problems during your modifications, please contact us.



----------------------------------------------------------------------------------------------------------------------------
Add: EFT_params.ini(@ ./)
----------------------------------------------------------------------------------------------------------------------------
Modify: params_CMB.paramnames(@ ./)

Add: After fdm \epsilon_0 f_d #CosmoRec dark matter annihilation parameter, 0910.3663
EFTw0 w_0 # EFTCOSMOMC: EFTCAMB parameter (num 16)
EFTwa w_a # EFTCOSMOMC: EFTCAMB parameter (num 17)
EFTwn w_n # EFTCOSMOMC: EFTCAMB parameter (num 18)
EFTwat wa_t # EFTCOSMOMC: EFTCAMB parameter (num 19)
EFtw2 w_2 # EFTCOSMOMC: EFTCAMB parameter (num 20)
EFTw3 w_3 # EFTCOSMOMC: EFTCAMB parameter (num 21)
EFTOmega0 \Omega_0^{\rm EFT} # EFTCOSMOMC: EFTCAMB parameter (num 22)
EFTOmegaExp n^{\rm EFT} # EFTCOSMOMC: EFTCAMB parameter (num 23)
EFTAlpha10 \alpha_0^{(1) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 24)
EFTAlpha1Exp \alpha_{\rm exp}^{(1) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 25)
EFTAlpha20 \alpha_0^{(2) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 26)
EFTAlpha2Exp \alpha_{\rm exp}^{(2) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 27)
EFTAlpha30 \alpha_0^{(3) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 28)
EFTAlpha3Exp \alpha_{\rm exp}^{(3) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 29)
EFTAlpha40 \alpha_0^{(4) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 30)
EFTAlpha4Exp \alpha_{\rm exp}^{(4) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 31)
EFTAlpha50 \alpha_0^{(5) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 32)
EFTAlpha5Exp \alpha_{\rm exp}^{(5) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 33)
EFTAlpha60 \alpha_0^{(6) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 34)
EFTAlpha6Exp \alpha_{\rm exp}^{(6) {\rm EFT}} # EFTCOSMOMC: EFTCAMB parameter (num 35)
EFTLogB0 {\rm Log}_{10}(B_0) # EFTCOSMOMC: EFTCAMB parameter (num 36)

----------------------------------------------------------------------------------------------------------------------------
Add: params_CMB_EFT.ini(@ ./batch1)
----------------------------------------------------------------------------------------------------------------------------
Add: common_batch1_EFT.ini(@ ./batch1)
----------------------------------------------------------------------------------------------------------------------------
Modify: Makefile(@ ./source)

Replace:
RECOMBINATION=$(RECOMBINATION) EQUATIONS=equations_EFT NONLINEAR=halofit
# RECOMBINATION=$(RECOMBINATION) EQUATIONS=equations_ppf NONLINEAR=halofit_ppf !EFTcosmomc MOD: Original code
# EFTCOSMOMC MOD END.

----------------------------------------------------------------------------------------------------------------------------
Modify: settings.f90(@ ./source)

Replace:
! EFTCOSMOMC MOD START: increase the number of theory parameters
!integer, parameter :: max_theory_params = 30 !Original code
integer, parameter :: max_theory_params = 51
! EFTCOSMOMC MOD END.

----------------------------------------------------------------------------------------------------------------------------
Modify: params_CMB.f90(@ ./source)

Replace:
! EFTCOSMOMC MOD START:
! call SetTheoryParameterNumbers(15,6) !Original code
call SetTheoryParameterNumbers(36,6)
! EFTCOSMOMC MOD END.

Add: After call SetFast(Params,CMB)
! EFTCOSMOMC MOD START:
CMB%EFTw0 = Params(16)
CMB%EFTwa = Params(17)
CMB%EFTwn = Params(18)
CMB%EFTwat= Params(19)
CMB%EFtw2 = Params(20)
CMB%EFTw3 = Params(21)
CMB%EFTOmega0 = Params(22)
CMB%EFTOmegaExp = Params(23)
CMB%EFTAlpha10 = Params(24)
CMB%EFTAlpha1Exp = Params(25)
CMB%EFTAlpha20 = Params(26)
CMB%EFTAlpha2Exp = Params(27)
CMB%EFTAlpha30 = Params(28)
CMB%EFTAlpha3Exp = Params(29)
CMB%EFTAlpha40 = Params(30)
CMB%EFTAlpha4Exp = Params(31)
CMB%EFTAlpha50 = Params(32)
CMB%EFTAlpha5Exp = Params(33)
CMB%EFTAlpha60 = Params(34)
CMB%EFTAlpha6Exp = Params(35)
CMB%EFTB0 = 10**Params(36)
! EFTCOSMOMC MOD END.

----------------------------------------------------------------------------------------------------------------------------
Modify: cmbtypes.f90(@ ./source)

Add: After logical :: bbn_consistency = .true. !JH
! EFTCOSMOMC MOD START: store the values of the EFT model selection flags.
integer :: EFTflag
integer :: EFTwDE
integer :: PureEFTmodelOmega
integer :: PureEFTmodelAlpha1, PureEFTmodelAlpha2, PureEFTmodelAlpha3
integer :: PureEFTmodelAlpha4, PureEFTmodelAlpha5, PureEFTmodelAlpha6
integer :: DesignerEFTmodel
integer :: MatchingEFTmodel
! EFTCOSMOMC MOD END.

Add: After real(mcp) reserved(5)
! EFTCOSMOMC MOD START: add EFTCAMB parameters to CMBParams
real(mcp) :: EFTw0, EFTwa, EFTwn, EFTwat, EFtw2, EFTw3
real(mcp) :: EFTOmega0, EFTOmegaExp
real(mcp) :: EFTAlpha10, EFTAlpha1Exp, EFTAlpha20, EFTAlpha2Exp
real(mcp) :: EFTAlpha30, EFTAlpha3Exp, EFTAlpha40, EFTAlpha4Exp
real(mcp) :: EFTAlpha50, EFTAlpha5Exp, EFTAlpha60, EFTAlpha6Exp
real(mcp) :: EFTB0
! EFTCOSMOMC MOD END.

----------------------------------------------------------------------------------------------------------------------------
Modify: calclike.f90(@ ./source)

Add: After function GetLogLike(Params) !Get -Ln(Likelihood) for chains
! EFTCOSMOMC MOD START: use the EFT modules
use EFTinitialization, only: EFTCAMB_initialization
! EFTCOSMOMC MOD END.

Add: After Type(LikeCalculator) :: Calc
! EFTCOSMOMC MOD START: define
logical :: EFTsuccess
Type(CAMBParams) :: EFT_CP_Temp
! EFTCOSMOMC MOD END.

Add: After Calc%changeMask(1:num_params) = Params%Info%lastParamArray(1:num_params)/=Params%P(1:num_params)
! EFTCOSMOMC MOD START: run the stability check for the choosen parameter.
call CMBToCAMB(CMB,EFT_CP_Temp)
call CAMBParams_Set(EFT_CP_Temp)
! Call EFTCAMB initialization

!print*, CMB%H0, CMB%omb*(CMB%h)**2, CMB%omc*(CMB%h)**2, CMB%omv
if (feedback>2.and.EFTflag/=0) feedbacklevel = 3

if (EFTflag/=0) then
call EFTCAMB_initialization(EFTsuccess)
if (.not.EFTsuccess) then
GetLogLike = logZero
return
end if
end if
! EFTCOSMOMC MOD END.

----------------------------------------------------------------------------------------------------------------------------
Modify: driver.F90(@ ./source)

Add: After use DefineParameterization
!EFTCOSMOMC MOD START: use EFT modules
use EFTdef
!EFTCOSMOMC MOD END.

Add: After stop_on_error = Ini_Read_logical('stop_on_error',stop_on_error)
! EFTCOSMOMC MOD START: read here EFT model selection flags and store them inside cmbtypes
EFTflag = Ini_Read_Int('EFTflag',0)

EFTwDE = Ini_Read_Int('EFTwDE',0)

PureEFTmodelOmega = Ini_Read_Int('PureEFTmodelOmega',0)
PureEFTmodelAlpha1 = Ini_Read_Int('PureEFTmodelAlpha1',0)
PureEFTmodelAlpha2 = Ini_Read_Int('PureEFTmodelAlpha2',0)
PureEFTmodelAlpha3 = Ini_Read_Int('PureEFTmodelAlpha3',0)
PureEFTmodelAlpha4 = Ini_Read_Int('PureEFTmodelAlpha4',0)
PureEFTmodelAlpha5 = Ini_Read_Int('PureEFTmodelAlpha5',0)
PureEFTmodelAlpha6 = Ini_Read_Int('PureEFTmodelAlpha6',0)

DesignerEFTmodel = Ini_Read_Int('DesignerEFTmodel',0)
MatchingEFTmodel = Ini_Read_Int('MatchingEFTmodel',0)

EFTCAMBuseinCOSMOMC = 0
! EFTCOSMOMC MOD END.

----------------------------------------------------------------------------------------------------------------------------
Modify: CMB_Cls_simple.f90(@ ./source)

Replace:
! EFTCOSMOMC MOD START: remove ppf
AccuracyBoost, Cl_scalar, Cl_tensor, Cl_lensed, outNone, w_lam,&

!AccuracyBoost, Cl_scalar, Cl_tensor, Cl_lensed, outNone, w_lam, wa_ppf,& ! Original code.
! EFTCOSMOMC MOD END.

Comment off:
! EFTCOSMOMC MOD START: remove ppf
!wa_ppf = CMB%wa ! Original code
! EFTCOSMOMC MOD END:

Add: After P%Num_Nu_Massless = CMB%nnu
! EFTCOSMOMC MOD START: pass to camb the EFT parameters
! Background parameters:
P%EFTw0 = CMB%EFTw0
P%EFTwa = CMB%EFTwa
P%EFTwn = CMB%EFTwn
P%EFTwat= CMB%EFTwat
P%EFtw2 = CMB%EFtw2
P%EFTw3 = CMB%EFTw3
! Pure EFT:
P%EFTOmega0 = CMB%EFTOmega0
P%EFTOmegaExp = CMB%EFTOmegaExp
P%EFTAlpha10 = CMB%EFTAlpha10
P%EFTAlpha1Exp= CMB%EFTAlpha1Exp
P%EFTAlpha20 = CMB%EFTAlpha20
P%EFTAlpha2Exp= CMB%EFTAlpha2Exp
P%EFTAlpha30 = CMB%EFTAlpha30
P%EFTAlpha3Exp= CMB%EFTAlpha3Exp
P%EFTAlpha40 = CMB%EFTAlpha40
P%EFTAlpha4Exp= CMB%EFTAlpha4Exp
P%EFTAlpha50 = CMB%EFTAlpha50
P%EFTAlpha5Exp= CMB%EFTAlpha5Exp
P%EFTAlpha60 = CMB%EFTAlpha60
P%EFTAlpha6Exp= CMB%EFTAlpha6Exp
! Matching EFT:
P%EFTB0 = CMB%EFTB0
! EFTCOSMOMC MOD END.

Comment off:
! EFTCOSMOMC MOD START: remove ppf
!wa_ppf = 0._dl ! Original code
! EFTCOSMOMC MOD END.

Add: After P%Transfer%k_per_logint=0
! EFTCOSMOMC MOD START: pass model selection flag to the camb

P%EFTflag = Ini_Read_Int('EFTflag',0)

P%EFTwDE = Ini_Read_Int('EFTwDE',0)

P%PureEFTmodelOmega = Ini_Read_Int('PureEFTmodelOmega',0)
P%PureEFTmodelAlpha1 = Ini_Read_Int('PureEFTmodelAlpha1',0)
P%PureEFTmodelAlpha2 = Ini_Read_Int('PureEFTmodelAlpha2',0)
P%PureEFTmodelAlpha3 = Ini_Read_Int('PureEFTmodelAlpha3',0)
P%PureEFTmodelAlpha4 = Ini_Read_Int('PureEFTmodelAlpha4',0)
P%PureEFTmodelAlpha5 = Ini_Read_Int('PureEFTmodelAlpha5',0)
P%PureEFTmodelAlpha6 = Ini_Read_Int('PureEFTmodelAlpha6',0)

P%DesignerEFTmodel = Ini_Read_Int('DesignerEFTmodel',1)

P%MatchingEFTmodel = Ini_Read_Int('MatchingEFTmodel',1)

! EFTCOSMOMC MOD END.

Re-compile and Make it.
- previous page -