diff options
author | Aaron LI <aly@aaronly.me> | 2018-01-22 20:21:13 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-01-22 20:21:13 +0800 |
commit | c46374d84f984e794b3f3cce02ce82d032959480 (patch) | |
tree | fa6ae90cb05a0d5a876e8de40c326a6d6c280376 /fg21sim/extragalactic/clusters | |
parent | c6db288d1cc8d7f07f6b2c090781c386c3ee5792 (diff) | |
download | fg21sim-c46374d84f984e794b3f3cce02ce82d032959480.tar.bz2 |
clusters: calculate/save cosmic (~cluster) age to catalog & halos data
Diffstat (limited to 'fg21sim/extragalactic/clusters')
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index 6a25506..a8d5d01 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -127,12 +127,14 @@ class GalaxyClusters: """ Do some basic processes to the catalog: + * Calculate the cosmic age at cluster's redshift * Generate random positions within the sky for each cluster; * Generate random elongated fraction; * Generate random rotation angle. Catalog Items ------------- + age : [Gyr] cosmic age at cluster's redshift, ~ cluster age lon : [deg] longitudes lat : [deg] latitudes felong : elongated fraction, defined as the ratio of @@ -160,17 +162,19 @@ class GalaxyClusters: for i, cdict in enumerate(self.catalog): cdict.update([ + ("age", COSMO.age(cdict["z"])), ("lon", lon[i]), ("lat", lat[i]), ("felong", felong[i]), ("rotation", rotation[i]), ]) self.comments += [ + "age - [Gyr] cosmic age at z; ~ cluster age", "lon, lat - [deg] longitudes and latitudes", "felong - elongated fraction (= b/a)", "rotation - [deg] ellipse rotation angle", ] - logger.info("Added catalog items: lon, lat, felong, rotation.") + logger.info("Added catalog items: age, lon, lat, felong, rotation.") def _simulate_mergers(self): """ @@ -269,6 +273,7 @@ class GalaxyClusters: data = OrderedDict([ ("z0", z_obs), ("M0", M_obs), # [Msun] + ("age0", halo.age_obs), # [Gyr] ("merger_num", merger_num), ("lon", cdict["lon"]), # [deg] longitude ("lat", cdict["lat"]), # [deg] longitude |