aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-10 10:44:53 +0800
committerAaron LI <aly@aaronly.me>2019-01-10 13:31:02 +0800
commitfd9f8125cf30eb52d0883d8fffa89d46a9acf62a (patch)
tree0b22cea9dba061e20a55c03b36e769a80a6be3e7
parent3407d2fc972b1398f2ed178e5ef67796fce44d47 (diff)
downloadfg21sim-fd9f8125cf30eb52d0883d8fffa89d46a9acf62a.tar.bz2
clusters/main: Update _simulate_halo1()
Directly merge in the cluster information into the halo information dictionary.
-rw-r--r--fg21sim/extragalactic/clusters/main.py38
1 files changed, 15 insertions, 23 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index e8ba1ab..67ce4c9 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -284,31 +284,23 @@ class GalaxyClusters:
z_merger=clinfo["merger_z"],
merger_num=merger_num,
configs=self.configs)
+ radius = halo.calc_radius() # [kpc]
+ theta = radius / (clinfo["DA"]*1e3) * AUC.rad2arcsec # [arcsec]
n_e = halo.calc_electron_spectrum()
- return OrderedDict([
- ("z0", z_obs),
- ("M0", M_obs), # [Msun]
- ("age0", halo.age_obs), # [Gyr]
- ("merger_num", merger_num),
- ("lon", clinfo["lon"]), # [deg] longitude
- ("lat", clinfo["lat"]), # [deg] longitude
- ("felong", clinfo["felong"]), # fraction of elongation
- ("rotation", clinfo["rotation"]), # [deg] rotation angle
- ("Rvir0", halo.radius_virial_obs), # [kpc]
- ("kT0", halo.kT_obs), # [keV]
- ("B0", halo.B_obs), # [uG] magnetic field @ z_obs
- ("Rhalo", halo.radius), # [kpc]
- ("Rhalo_angular", halo.angular_radius), # [arcsec]
- ("volume", halo.volume), # [kpc^3]
- ("Ke", halo.injection_rate), # [cm^-3 Gyr^-1]
- ("time_turbulence", halo.time_turbulence_avg), # [Gyr]
- ("Mach_turb", halo.mach_turbulence_avg), # Mach number
- ("tau_acc", halo.tau_acceleration_avg), # [Gyr]
- ("tfrac_acc", halo.time_acceleration_fraction),
- ("gamma", halo.gamma), # Lorentz factors
- ("n_e", n_e), # [cm^-3]
- ])
+ haloinfo = OrderedDict(
+ **clinfo,
+ Rhalo=radius, # [kpc]
+ Rhalo_angular=theta, # [arcsec]
+ n_e=n_e, # [cm^-3]
+ gamma=halo.gamma, # Lorentz factors
+ Ke=halo.injection_rate, # [cm^-3 Gyr^-1]
+ time_turb=halo.time_turbulence_avg, # [Gyr]
+ Mach_turb=halo.mach_turbulence_avg, # Mach number
+ tau_acc=halo.tau_acceleration_avg, # [Gyr]
+ tfrac_acc=halo.time_acceleration_fraction,
+ )
+ return haloinfo
def _simulate_halos(self):
"""