From 3cd0b04107a6b42040f9431b0a2f6728273b57a9 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Fri, 11 Aug 2017 23:18:24 +0800 Subject: clusters/halo: "volume" use unit "kpc^3" instead of "cm^3" Signed-off-by: Aaron LI --- fg21sim/extragalactic/clusters/halo.py | 9 ++++++--- fg21sim/extragalactic/clusters/main.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'fg21sim') diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index b4c6388..d11004f 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -158,6 +158,7 @@ class RadioHalo: The time duration of the sub-cluster crossing the main cluster, which is also used to approximate the merging time, during which the turbulence acceleration is regarded as effective. + Unit: [Gyr] """ return helper.time_crossing(self.M_main, self.M_sub, @@ -168,6 +169,7 @@ class RadioHalo: """ The halo radius derived from the virial radius by a scaling relation. + Unit: [kpc] """ mass = self.M_main + self.M_sub # [Msun] @@ -178,6 +180,7 @@ class RadioHalo: def angular_radius(self): """ The angular radius of the radio halo. + Unit: [arcsec] """ DA = COSMO.DA(self.z_obs) * 1e3 # [Mpc] -> [kpc] @@ -188,10 +191,10 @@ class RadioHalo: def volume(self): """ The halo volume, calculated from the above radius. - Unit: [cm^3] + + Unit: [kpc^3] """ - r_cm = self.radius * AUC.kpc2cm - return (4*np.pi/3) * r_cm**3 + return (4*np.pi/3) * self.radius**3 @property def magnetic_field(self): diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index c4c8517..3db9fa1 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -268,7 +268,7 @@ class GalaxyClusters: "gamma": halo.gamma, # Lorentz factors "radius": halo.radius, # [kpc] "angular_radius": halo.angular_radius, # [arcsec] - "volume": halo.volume, # [cm^3] + "volume": halo.volume, # [kpc^3] "B": halo.magnetic_field, # [uG] "n_e": n_e, # [cm^-3] "frequencies": self.frequencies, # [MHz] -- cgit v1.2.2