aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-06 20:56:03 +0800
committerAaron LI <aly@aaronly.me>2017-08-06 20:56:03 +0800
commit3d2ec2c2d008c239e8aeaaa77f76d15cac6bb7de (patch)
treeeb2dd20d8177c50b82f18b742eb099dcc4fe0d28
parent57cfa9643c9f4c1b2b8e72d7ade68da23d9693bb (diff)
downloadfg21sim-3d2ec2c2d008c239e8aeaaa77f76d15cac6bb7de.tar.bz2
clusters/main.py: Calculate and cache more halo data
Signed-off-by: Aaron LI <aly@aaronly.me>
-rw-r--r--fg21sim/extragalactic/clusters/main.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index 10222a7..c4c8517 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -254,7 +254,10 @@ class GalaxyClusters:
z_merger=row.rmm_z, configs=self.configs)
n_e = halo.calc_electron_spectrum()
emissivity = halo.calc_emissivity(frequencies=self.frequencies)
+ power = halo.calc_power(emissivity)
flux = halo.calc_flux(emissivity)
+ Tb_mean = halo.calc_brightness_mean(emissivity, self.frequencies,
+ pixelsize=self.sky.pixelsize)
data = {
"z0": halo.z_obs,
"M0": halo.M_obs, # [Msun]
@@ -265,11 +268,14 @@ class GalaxyClusters:
"gamma": halo.gamma, # Lorentz factors
"radius": halo.radius, # [kpc]
"angular_radius": halo.angular_radius, # [arcsec]
+ "volume": halo.volume, # [cm^3]
"B": halo.magnetic_field, # [uG]
"n_e": n_e, # [cm^-3]
"frequencies": self.frequencies, # [MHz]
"emissivity": emissivity, # [erg/s/cm^3/Hz]
+ "power": power, # [W/Hz]
"flux": flux, # [Jy]
+ "Tb_mean": Tb_mean, # [K]
}
self.halos.append(data)
logger.info("Simulated radio halos for merging cluster.")
@@ -278,7 +284,7 @@ class GalaxyClusters:
# Ignore the ``gamma`` and ``n_e`` items
keys = ["z0", "M0", "z_merger", "M_main", "M_sub",
"time_crossing", "radius", "angular_radius",
- "B", "frequencies", "emissivity", "flux"]
+ "B", "frequencies", "emissivity", "flux", "Tb_mean"]
self.halos_df = dictlist_to_dataframe(self.halos, keys=keys)
logger.info("Done halos data conversion.")
@@ -301,10 +307,9 @@ class GalaxyClusters:
logger.info("{name}: preprocessing ...".format(name=self.name))
self._simulate_catalog()
self._process_catalog()
- # self._simulate_mergers()
-
+ self._simulate_mergers()
+ self._simulate_halos()
# TODO ???
-
self._preprocessed = True
def postprocess(self):