aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-07-31 23:47:52 +0800
committerAaron LI <aly@aaronly.me>2017-07-31 23:47:52 +0800
commitc75dfd265e82b62af330f29be492a35c831238cc (patch)
treed326ddb6844fcd4de7e571faab079f06497a62c0 /fg21sim/extragalactic/clusters
parent68dac5c2e1972c3868503b8ce6208b455240c61c (diff)
downloadfg21sim-c75dfd265e82b62af330f29be492a35c831238cc.tar.bz2
clusters: Fix several small issues on wrong variable names
Also update logging message for RadioHalo a bit. Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim/extragalactic/clusters')
-rw-r--r--fg21sim/extragalactic/clusters/formation.py7
-rw-r--r--fg21sim/extragalactic/clusters/halo.py4
-rw-r--r--fg21sim/extragalactic/clusters/main.py4
3 files changed, 8 insertions, 7 deletions
diff --git a/fg21sim/extragalactic/clusters/formation.py b/fg21sim/extragalactic/clusters/formation.py
index dc41e00..f92c868 100644
--- a/fg21sim/extragalactic/clusters/formation.py
+++ b/fg21sim/extragalactic/clusters/formation.py
@@ -186,8 +186,9 @@ class ClusterFormation:
References: Ref.[randall2002],Sec.(3.1)
"""
logger.debug("Simulating cluster formation: " +
- "M0={:.3g}[Msun] from z={:.3f} to z={zmax} ...".format(
- self.M0, self.z0, zmax=self.zmax))
+ "M0=%.3e[Msun] " % self.M0 +
+ "from z={:.3f} back to z={zmax} ...".format(
+ self.z0, zmax=self.zmax))
self.main_only = main_only
if main_only:
logger.debug("Only trace the formation of the *main* cluster ...")
@@ -195,7 +196,7 @@ class ClusterFormation:
else:
logger.debug("Trace formations of both main and sub cluster ...")
self.mtree = self._trace_formation(self.M0, _z=self.z0)
- logger.debug("Simulated cluster formation with merger tree")
+ logger.debug("Simulated cluster formation with merger tree.")
return self.mtree
@property
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index 333da4e..50c1242 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -170,7 +170,7 @@ class RadioHalo:
The angular radius of the radio halo.
Unit: [arcsec]
"""
- DA = COSMO.DA(self.z) * 1e3 # [Mpc] -> [kpc]
+ DA = COSMO.DA(self.z_obs) * 1e3 # [Mpc] -> [kpc]
theta = self.radius / DA # [rad]
return theta * AUC.rad2arcsec
@@ -316,7 +316,7 @@ class RadioHalo:
Unit: [Jy] = 1e-23 [erg/s/cm^2/Hz] = 1e-26 [W/m^2/Hz]
"""
power = self.calc_power(emissivity) # [W/Hz]
- DL = COSMO.DL(self.z) * AUC.Mpc2m # [m]
+ DL = COSMO.DL(self.z_obs) * AUC.Mpc2m # [m]
flux = 1e26 * power / (4*np.pi * DL*DL) # [Jy]
return flux
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index 4e3d906..10f169c 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -247,8 +247,8 @@ class GalaxyClusters:
emissivity = halo.calc_emissivity(frequencies=self.frequencies)
flux = halo.calc_flux(emissivity)
data = {
- "z0": halo.z,
- "M0": halo.mass, # [Msun]
+ "z0": halo.z_obs,
+ "M0": halo.M_obs, # [Msun]
"z_merger": halo.z_merger,
"M_main": halo.M_main, # [Msun]
"M_sub": halo.M_sub, # [Msun]