Skip to content

Commit 4e70868

Browse files
author
llinke1
committed
Added 1-halo term suppression in baryon feedback calculation
1 parent 6d72909 commit 4e70868

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

hmcode/hmcode.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,10 @@ def power(k:np.array, zs:np.array, CAMB_results:camb.CAMBdata, T_AGN=None,
154154
eta = 0.1281*sigma8**-0.3644 # Halo bloating parameter; equation (19)
155155
B = 5.196 # Minimum halo concentration; equation (20)
156156
alpha = 1.875*(1.603)**neff # Transition smoothing; equation (23)
157-
else: # Use vanilla-ish halo model if no HMcode tweaks used
157+
else: # Use vanilla-ish halo model if no HMcode tweaks used (still uses 1-halo term suppression)
158158
B, eta = 4., 0.
159+
ks = 0.05618*sigma8**-1.013 # One-halo damping wavenumber; equation (17)
160+
159161

160162
if T_AGN and not tweaks:
161163
B = feedback_params['B0']*np.power(10, z*feedback_params['Bz'])
@@ -205,8 +207,10 @@ def power(k:np.array, zs:np.array, CAMB_results:camb.CAMBdata, T_AGN=None,
205207
Pk_2h = Pk_dwl*(1.-f*(k/kd)**nd/(1.+(k/kd)**nd)) # Two-halo term; equation (16)
206208
Pk_1h = (k/ks)**4/(1.+(k/ks)**4)*_Pk_1h['m-m'] # One-halo term; equation (17)
207209
Pk_hm = (Pk_2h**alpha+Pk_1h**alpha)**(1./alpha) # Total prediction via smoothed sum; equation (23)
208-
else:
209-
Pk_hm = Pk_lin+_Pk_1h['m-m']
210+
else: # Still uses 1halo term dampening even if tweaks=False
211+
Pk_1h = (k/ks)**4/(1.+(k/ks)**4)*_Pk_1h['m-m'] # One-halo term; equation (17)
212+
Pk_hm = Pk_lin+Pk_1h
213+
210214
Pk_HMcode[iz, :] = Pk_hm
211215

212216
if T_AGN and tweaks:

0 commit comments

Comments
 (0)