diff options
author | Aaron LI <aly@aaronly.me> | 2017-07-22 23:27:30 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-07-22 23:27:30 +0800 |
commit | fd5ae04bce31a4cb82dea8532028b6df92b3d476 (patch) | |
tree | 33e1856d1576f936aba6e416583e871b3539419a /fg21sim/extragalactic/clusters/main.py | |
parent | bc4b878cd35a8dc5b6e410151eeb7ac2a47bf164 (diff) | |
download | fg21sim-fd5ae04bce31a4cb82dea8532028b6df92b3d476.tar.bz2 |
clusters: Import global "configs" to simplify parameters
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim/extragalactic/clusters/main.py')
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index db82e78..7d8d494 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -24,6 +24,7 @@ import pandas as pd from .formation import ClusterFormation from .halo import RadioHalo +from ...configs import configs from ...sky import get_sky from ...utils import cosmo from ...utils.io import dataframe_to_csv @@ -57,7 +58,7 @@ class GalaxyClusters: # Component name name = "galaxy clusters (halos)" - def __init__(self, configs): + def __init__(self, configs=configs): self.configs = configs self.sky = get_sky(configs) self._set_configs() @@ -89,24 +90,6 @@ 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 @@ -258,7 +241,7 @@ class GalaxyClusters: logger.info("{name}: preprocessing ...".format(name=self.name)) self._load_catalog() self._process_catalog() - self._simulate_mergers() + # self._simulate_mergers() # TODO ??? |