Skip to content

Commit 14a88c3

Browse files
defined missing rmax in make_sz_cluster.py
1 parent 74ab61e commit 14a88c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

deepszsim/make_sz_cluster.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,13 @@ def Pe_to_y(profile, radii_mpc, M200_SM, redshift_z, load_vars_dict, alpha = 1.0
269269
pressure_integ = np.empty_like(radii_mpc)
270270
P200_kevcm3 = P200_Battaglia2012(M200_SM, redshift_z, load_vars_dict, R200_Mpc = R200_Mpc).value
271271

272+
rmax = radii_mpc.max()
273+
272274
for i, radius in enumerate(radii_mpc):
273275
# Multiply profile by P200 specifically for Battaglia 2012 profile,
274276
# since it returns Pth/P200 instead of Pth
275277
rv = radius
276-
if (rmax == R200_Mpc) and (rv >= R200_Mpc):
278+
if (rv >= R200_Mpc):
277279
pressure_integ[i] = 0
278280
else:
279281
l_mpc = np.linspace(0, np.sqrt(rmax**2. - rv**2.) + 1., 1000) # Get line of sight axis

0 commit comments

Comments
 (0)