diff options
author | Aaron LI <aly@aaronly.me> | 2017-07-22 10:14:07 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-07-22 10:14:07 +0800 |
commit | 4f31ff421a937b1ad5a188b39ceb8fb82c938ad0 (patch) | |
tree | b9a46bc4be7de565d4666bb59b4465c933ba56c6 /fg21sim/extragalactic | |
parent | 339ced0adb74da90a1ce6147314e1c3e58b0e0e7 (diff) | |
download | fg21sim-4f31ff421a937b1ad5a188b39ceb8fb82c938ad0.tar.bz2 |
clusters/main.py: Add property "halo_configs"
And update the config specification accordingly with some cleanups.
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim/extragalactic')
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index b6c1022..8e37db1 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -41,9 +41,21 @@ class GalaxyClusters: Currently, only the *giant radio halos* are considered, while other types of extended emissions are missing, e.g., mini-halos, elongated relics, roundish relics. + + Attributes + ---------- + configs : `~ConfigManager` + A `ConfigManager` instance containing default and user configurations. + For more details, see the example configuration specifications. + halo_configs : dict + A dictionary containing the configurations for halo simulation. + sky : `~SkyPatch` or `SkyHealpix` + The sky instance to deal with the simulation sky as well as the + output map. + XXX: current full-sky HEALPix map is NOT supported! """ # Component name - name = "galaxy clusters" + name = "galaxy clusters (halos)" def __init__(self, configs): self.configs = configs @@ -79,6 +91,24 @@ class GalaxyClusters: logger.info("Loaded and set up configurations") + @property + def halo_configs(self): + """ + Configurations for radio halo simulation as a dictionary. + """ + comp = "extragalactic/halos" + haloconf = { + "eta_turb": self.configs.getn(comp+"/eta_turb"), + "eta_e": self.configs.getn(comp+"/eta_e"), + "gamma_min": self.configs.getn(comp+"/gamma_min"), + "gamma_max": self.configs.getn(comp+"/gamma_max"), + "gamma_np": self.configs.getn(comp+"/gamma_num"), + "buffer_np": self.configs.getn(comp+"/buffer_np"), + "time_step": self.configs.getn(comp+"/time_step"), + "injection_index": self.configs.getn(comp+"/injection_index"), + } + return haloconf + def _load_catalog(self): """ Load the sampled (z, mass) catalogs from the Press-Schechter |