From a8a02a96a78a85ffacf52aa43c158ecc24391af3 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 21 Oct 2017 22:10:31 +0800 Subject: clusters/halos: Add more cluster and halo properties * Rvir0, Rvir_main, Rvir_sub * kT_main, kT_sub (replace kT_merger) * radius -> Rhalo, angular_radius -> Rhalo_angular, B -> B0 --- fg21sim/extragalactic/clusters/halo.py | 37 +++++++++++++++++++++++++++------- fg21sim/extragalactic/clusters/main.py | 14 ++++++++----- 2 files changed, 39 insertions(+), 12 deletions(-) (limited to 'fg21sim/extragalactic') diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index e6fe152..4bba5a9 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -184,6 +184,27 @@ class RadioHalo: return helper.time_crossing(self.M_main, self.M_sub, z=self.z_merger) + @property + def radius_virial_obs(self): + """ + The virial radius of the "current" cluster (``M_obs``) at + ``z_obs``. + + Unit: [kpc] + """ + return helper.radius_virial(mass=self.M_obs, z=self.z_obs) + + @property + def radius_virial_main(self): + """ + The virial radius of the main cluster at ``z_merger``. + """ + return helper.radius_virial(mass=self.M_main, z=self.z_merger) + + @property + def radius_virial_sub(self): + return helper.radius_virial(mass=self.M_sub, z=self.z_merger) + @property def radius(self): """ @@ -232,21 +253,23 @@ class RadioHalo: return helper.magnetic_field(mass=self.M_obs, z=self.z_obs) @property - def kT_merger(self): + def kT_main(self): """ - The cluster ICM mean temperature at ``z_merger`` when the merger - begins. + The mean temperature of the main cluster ICM at ``z_merger`` + when the merger begins. Unit: [keV] """ - mass = self.M_main + self.M_sub - kT = helper.kT_cluster(mass, z=self.z_merger) - return kT + return helper.kT_cluster(mass=self.M_main, z=self.z_merger) + + @property + def kT_sub(self): + return helper.kT_cluster(mass=self.M_sub, z=self.z_merger) @property def kT_obs(self): """ - The cluster ICM mean temperature at ``z_obs``. + The "current" cluster ICM mean temperature at ``z_obs``. """ return helper.kT_cluster(self.M_obs, z=self.z_obs) # [keV] diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index 6f76619..506e77c 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -262,7 +262,9 @@ class GalaxyClusters: data = OrderedDict([ ("z0", halo.z_obs), ("M0", halo.M_obs), # [Msun] + ("Rvir0", halo.radius_virial_obs), # [kpc] ("kT0", halo.kT_obs), # [keV] + ("B0", halo.magnetic_field), # [uG] magnetic field at z_obs ("lon", row.lon), # [deg] longitude ("lat", row.lat), # [deg] longitude ("felong", row.felong), # Fraction of elongation @@ -270,13 +272,15 @@ class GalaxyClusters: ("M_main", halo.M_main), # [Msun] ("M_sub", halo.M_sub), # [Msun] ("z_merger", halo.z_merger), + ("kT_main", halo.kT_main), # [keV] main cluster kT at z_merger + ("kT_sub", halo.kT_sub), # [keV] sub-cluster kT at z_merger + ("Rvir_main", halo.radius_virial_main), # [kpc] at z_merger + ("Rvir_sub", halo.radius_virial_sub), # [kpc] at z_merger ("tback_merger", halo.tback_merger), # [Gyr] ("time_crossing", halo.time_crossing), # [Gyr] - ("radius", halo.radius), # [kpc] - ("angular_radius", halo.angular_radius), # [arcsec] + ("Rhalo", halo.radius), # [kpc] + ("Rhalo_angular", halo.angular_radius), # [arcsec] ("volume", halo.volume), # [kpc^3] - ("B", halo.magnetic_field), # [uG] - ("kT_merger", halo.kT_merger), # [keV] ICM kT at z_merger ("Ke", halo.injection_rate), # [cm^-3 Gyr^-1] ("chi", halo._chi_acceleration()), # [Gyr^-1] ("gamma", halo.gamma), # Lorentz factors @@ -335,7 +339,7 @@ class GalaxyClusters: i += 1 if i % 100 == 0: logger.info("[%d/%d] %.1f%% ..." % (i, num, 100*i/num)) - theta_e = hdict["angular_radius"] / self.sky.pixelsize + theta_e = hdict["Rhalo_angular"] / self.sky.pixelsize rprofile = helper.halo_rprofile(re=theta_e) template = helper.draw_halo(rprofile, felong=hdict["felong"], rotation=hdict["rotation"]) -- cgit v1.2.2