diff options
author | Aaron LI <aly@aaronly.me> | 2017-07-29 23:51:28 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-07-29 23:51:43 +0800 |
commit | 632c2857d1607150f482293df3391e874b53a823 (patch) | |
tree | 74e350202ff5d5b6dc5e4a14d76b946a29d0a145 /fg21sim | |
parent | e13031902dd5a891e5eb4fba199298a57d3b115b (diff) | |
download | fg21sim-632c2857d1607150f482293df3391e874b53a823.tar.bz2 |
clusters/halo.py: Add property "volume" (unit: [cm^3])
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim')
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 44d1e1a..d7b3ec4 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -163,6 +163,15 @@ class RadioHalo: return r_halo @property + def volume(self): + """ + The halo volume, calculated from the above radius. + Unit: [cm^3] + """ + r_cm = self.radius * AUC.kpc2cm + return (4*np.pi/3) * r_cm**3 + + @property def magnetic_field(self): """ The magnetic field strength at the simulated observation |