aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters/main.py
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-01-04 22:07:06 +0800
committerAaron LI <aly@aaronly.me>2018-01-04 22:07:06 +0800
commitc9d0254f243b67ef0c2a9ae5ed8d99ad11b3c69a (patch)
tree8ca8f9d786e7a9a5cd1cefa08473f695ef7dbb44 /fg21sim/extragalactic/clusters/main.py
parent7473c9374f31f4f8fc10d47c3ed7c85689b1be05 (diff)
downloadfg21sim-c9d0254f243b67ef0c2a9ae5ed8d99ad11b3c69a.tar.bz2
clusters/halo: Add preliminary RadioHaloAM based on RadioHalo
The RadioHaloAM class is intended to account for all merger events, and there are a lot of methods to be implemented.
Diffstat (limited to 'fg21sim/extragalactic/clusters/main.py')
-rw-r--r--fg21sim/extragalactic/clusters/main.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index 04ed52d..b2ed530 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -20,7 +20,7 @@ import numpy as np
from .psformalism import PSFormalism
from .formation import ClusterFormation
-from .halo import RadioHalo
+from .halo import RadioHaloAM
from .emission import HaloEmission
from ...share import CONFIGS, COSMO
from ...utils.io import dataframe_to_csv, pickle_dump, pickle_load
@@ -241,9 +241,9 @@ class GalaxyClusters:
"""
# Select out the clusters with recent mergers
idx_rmm = [idx for idx, cdict in enumerate(self.catalog)
- if cdict["rmm_z"] is not None]
+ if cdict["merger_num"] > 0]
num = len(idx_rmm)
- logger.info("Simulating halos for %d merging clusters ..." % num)
+ logger.info("Simulating halos for %d clusters with mergers ..." % num)
self.halos = []
for i, idx in enumerate(idx_rmm):
ii = i + 1
@@ -252,15 +252,15 @@ class GalaxyClusters:
cdict = self.catalog[idx]
z_obs = cdict["z"]
M_obs = cdict["mass"]
- z_merger = cdict["rmm_z"]
- M_main = cdict["rmm_mass1"]
- M_sub = cdict["rmm_mass2"]
- logger.info("[%d/%d] " % (ii, num) +
- "M1[%.2e] & M2[%.2e] @ z[%.3f] -> M[%.2e] @ z[%.3f]" %
- (M_main, M_sub, z_merger, M_obs, z_obs))
- halo = RadioHalo(M_obs=M_obs, z_obs=z_obs,
- M_main=M_main, M_sub=M_sub,
- z_merger=z_merger, configs=self.configs)
+ merger_num = cdict["merger_num"]
+ logger.info("[%d/%d] M[%.2e] @ z[%.3f] with %d mergers" %
+ (ii, num, M_obs, z_obs, merger_num))
+ halo = RadioHaloAM(M_obs=M_obs, z_obs=z_obs,
+ M_main=cdict["merger_mass1"],
+ M_sub=cdict["merger_mass2"],
+ z_merger=cdict["merger_z"],
+ merger_num=merger_num,
+ configs=self.configs)
n_e = halo.calc_electron_spectrum()
data = OrderedDict([
("z0", halo.z_obs),