Skip to content

Commit

Permalink
fix for HMcode-2020 feedback at low k (cmbant#136)
Browse files Browse the repository at this point in the history
* fix for HMcode-2020 feedback at low j

* comment documenting the fix
  • Loading branch information
alexander-mead authored Jan 10, 2023
1 parent 6288643 commit a58c8b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ Advisor/
Inspector/
.ipynb_checkpoints
camb/HighLExtrapTemplate_lenspotentialCls.dat
.vscode/
7 changes: 4 additions & 3 deletions fortran/halofit.f90
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
!AL Jul 19: Speedups, use linear interpolation for pk; find index using fixed spacing; precompute growth(z)
!AL Sep 19: Propagate errors rather than stop, decrease jmax for integration time out (prevent very slow error)
!AM Sep 20: Added HMcode-2020 model
!AM Jan 23: Fixed HMcode-2020 feedback low-k predictions
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

module NonLinear
Expand Down Expand Up @@ -734,14 +735,14 @@ FUNCTION kstar(this,lut)
REAL(dl) :: kstar
TYPE(HM_tables), INTENT(IN) :: lut

IF(this%imead==0 .OR. this%imead==4 .OR. this%imead==5) THEN
IF(this%imead==0) THEN
!Set to zero for the standard Poisson one-halo term
kstar=0.
ELSE IF(this%imead==1 .or. this%imead==2) THEN
!One-halo cut-off wavenumber
!Mead et al. (2015; arXiv 1505.07833) value
kstar=0.584*(lut%sigv)**(-1.)
ELSE IF(this%imead==3) THEN
ELSE IF(this%imead==3 .OR. this%imead==4 .OR. this%imead==5) THEN
kstar=0.05618*lut%sig8z_cold**(-1.013)
END IF

Expand Down Expand Up @@ -1759,7 +1760,7 @@ FUNCTION p_1h(this,k,lut,cosm)
END IF
!Damping of the one-halo term at very large scales
p_1h=p_1h*(1.-fac)
ELSE IF(this%imead==3) THEN
ELSE IF(this%imead==3 .OR. this%imead==4 .OR. this%imead==5) THEN
ks=this%kstar(lut)
x=(k/ks)**4
p_1h=p_1h*x/(1.+x)
Expand Down

0 comments on commit a58c8b7

Please sign in to comment.