diff options
author | Aaron LI <aly@aaronly.me> | 2019-01-10 00:21:58 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-01-10 00:21:58 +0800 |
commit | 44685ab35cab0d3c9c7aef27bc6be252c7b276e1 (patch) | |
tree | c3f0c9ea73aaa4628d4954526a9b81c63b517057 /fg21sim | |
parent | b11592e71aa948170c5ac0be2ff70fbc3b2aeaf8 (diff) | |
download | fg21sim-44685ab35cab0d3c9c7aef27bc6be252c7b276e1.tar.bz2 |
clusters/main: Calculate DA and theta in _calc_cluster_info()
Calculate angular diameter distance and angular radius in
_calc_cluster_info().
Diffstat (limited to 'fg21sim')
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index bd68f0d..c615ae2 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -31,6 +31,7 @@ from ...share import CONFIGS, COSMO from ...utils.io import dataframe_to_csv, pickle_dump, pickle_load from ...utils.ds import dictlist_to_dataframe from ...utils.convert import JyPerPix_to_K +from ...utils.units import UnitConversions as AUC logger = logging.getLogger(__name__) @@ -179,17 +180,23 @@ class GalaxyClusters: logger.info("Calculating basic information for each cluster ...") for cdict in enumerate(self.catalog): z, mass = cdict["z"], cdict["mass"] - Rvir = helper.radius_virial(mass, z) - kT = helper.kT_cluster(mass, z, configs=self.configs) - B = helper.magnetic_field(mass, z, configs=self.configs) + Rvir = helper.radius_virial(mass, z) # [kpc] + DA = COSMO.DA(z) # [Mpc] + theta = Rvir / (DA*1e3) * AUC.rad2arcsec # [arcsec] + kT = helper.kT_cluster(mass, z, configs=self.configs) # [keV] + B = helper.magnetic_field(mass, z, configs=self.configs) # [uG] cdict.update([ - ("Rvir", Rvir), - ("kT", kT), - ("B", B), + ("DA", DA), # [Mpc] + ("Rvir", Rvir), # [kpc] + ("theta", theta), # [arcsec] + ("kT", kT), # [keV] + ("B", B), # [uG] ]) self.comments += [ + "DA - [Mpc] angular diameter distance", "Rvir - [kpc] virial radius", + "theta - [arcsec] angular virial radius", "kT - [keV] ICM mean temperature", "B - [uG] magnetic field", ] |