diff options
Diffstat (limited to 'fg21sim')
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 38 | ||||
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 32 | ||||
-rw-r--r-- | fg21sim/extragalactic/clusters/psformalism.py | 26 |
3 files changed, 49 insertions, 47 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 2078ad1..547b89a 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -147,28 +147,28 @@ class RadioHalo1M: self._set_solver() def _set_configs(self, configs): - comp = self.compID + sec = self.compID self.configs = configs - self.f_acc = configs.getn(comp+"/f_acc") - self.f_radius = configs.getn(comp+"/f_radius") - self.eta_turb = configs.getn(comp+"/eta_turb") - self.eta_e = configs.getn(comp+"/eta_e") - self.x_cr = configs.getn(comp+"/x_cr") - self.mass_index = configs.getn(comp+"/mass_index") - self.gamma_min = configs.getn(comp+"/gamma_min") - self.gamma_max = configs.getn(comp+"/gamma_max") - self.gamma_np = configs.getn(comp+"/gamma_np") - self.buffer_np = configs.getn(comp+"/buffer_np") + self.f_acc = configs.getn(sec+"/f_acc") + self.f_radius = configs.getn(sec+"/f_radius") + self.eta_turb = configs.getn(sec+"/eta_turb") + self.eta_e = configs.getn(sec+"/eta_e") + self.x_cr = configs.getn(sec+"/x_cr") + self.mass_index = configs.getn(sec+"/mass_index") + self.gamma_min = configs.getn(sec+"/gamma_min") + self.gamma_max = configs.getn(sec+"/gamma_max") + self.gamma_np = configs.getn(sec+"/gamma_np") + self.buffer_np = configs.getn(sec+"/buffer_np") if self.buffer_np == 0: self.buffer_np = None - self.time_step = configs.getn(comp+"/time_step") - self.time_init = configs.getn(comp+"/time_init") - self.injection_index = configs.getn(comp+"/injection_index") - self.f_rc = configs.getn(comp+"/f_rc") - self.beta = configs.getn(comp+"/beta") - self.bolo_freq_min = configs.getn(comp+"/bolo_freq_min") - self.bolo_freq_max = configs.getn(comp+"/bolo_freq_max") - self.bolo_freq_num = configs.getn(comp+"/bolo_freq_num") + self.time_step = configs.getn(sec+"/time_step") + self.time_init = configs.getn(sec+"/time_init") + self.injection_index = configs.getn(sec+"/injection_index") + self.f_rc = configs.getn(sec+"/f_rc") + self.beta = configs.getn(sec+"/beta") + self.bolo_freq_min = configs.getn(sec+"/bolo_freq_min") + self.bolo_freq_max = configs.getn(sec+"/bolo_freq_max") + self.bolo_freq_num = configs.getn(sec+"/bolo_freq_num") def _set_solver(self): self.fpsolver = FokkerPlanckSolver( diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index d1cb11d..11aeaf6 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -67,30 +67,31 @@ class GalaxyClusters: """ Load the configs and set the corresponding class attributes. """ - comp = self.compID + sec = self.compID self.configs = configs - self.catalog_outfile = configs.get_path(comp+"/catalog_outfile") - self.dump_catalog_data = configs.getn(comp+"/dump_catalog_data") + self.catalog_outfile = configs.get_path(sec+"/catalog_outfile") + self.dump_catalog_data = configs.getn(sec+"/dump_catalog_data") self.use_dump_catalog_data = configs.getn( - comp+"/use_dump_catalog_data") + sec+"/use_dump_catalog_data") self.halos_catalog_outfile = configs.get_path( - comp+"/halos_catalog_outfile") - self.dump_halos_data = configs.getn(comp+"/dump_halos_data") + sec+"/halos_catalog_outfile") + self.dump_halos_data = configs.getn(sec+"/dump_halos_data") self.use_dump_halos_data = configs.getn( - comp+"/use_dump_halos_data") - self.felong_min = configs.getn(comp+"/felong_min") - self.halo_dropout = configs.getn(comp+"/halo_dropout") - self.prefix = configs.getn(comp+"/prefix") - self.output_dir = configs.get_path(comp+"/output_dir") - self.merger_mass_min = configs.getn(comp+"/merger_mass_min") - self.time_traceback = configs.getn(comp+"/time_traceback") - self.kT_out = configs.getn(comp+"/kT_out") + sec+"/use_dump_halos_data") + self.felong_min = configs.getn(sec+"/felong_min") + self.halo_dropout = configs.getn(sec+"/halo_dropout") + self.prefix = configs.getn(sec+"/prefix") + self.output_dir = configs.get_path(sec+"/output_dir") + self.merger_mass_min = configs.getn(sec+"/merger_mass_min") + self.time_traceback = configs.getn(sec+"/time_traceback") + self.kT_out = configs.getn(sec+"/kT_out") self.frequencies = configs.frequencies self.filename_pattern = configs.getn("output/filename_pattern") self.clobber = configs.getn("output/clobber") - self.eta_b = configs.getn("extragalactic/halos/x_cr") + sec = "extragalactic/halos" + self.eta_b = configs.getn(sec+"/x_cr") if self.use_dump_halos_data and (not self.use_dump_catalog_data): self.use_dump_catalog_data = True @@ -107,6 +108,7 @@ class GalaxyClusters: Catalog Items ------------- z : redshifts + mass_dm : [Msun] dark matter halo mass mass : [Msun] cluster total mass Attributes diff --git a/fg21sim/extragalactic/clusters/psformalism.py b/fg21sim/extragalactic/clusters/psformalism.py index 328ba08..bf8612f 100644 --- a/fg21sim/extragalactic/clusters/psformalism.py +++ b/fg21sim/extragalactic/clusters/psformalism.py @@ -41,20 +41,20 @@ class PSFormalism: """ Load the required configurations and set them. """ - comp = "extragalactic/psformalism" - self.model = self.configs.getn(comp+"/model") - self.M_min = self.configs.getn(comp+"/M_min") - self.M_max = self.configs.getn(comp+"/M_max") - self.M_step = self.configs.getn(comp+"/M_step") - self.z_min = self.configs.getn(comp+"/z_min") - self.z_max = self.configs.getn(comp+"/z_max") - self.z_step = self.configs.getn(comp+"/z_step") - self.dndlnm_outfile = self.configs.get_path(comp+"/dndlnm_outfile") - - comp = "extragalactic/clusters" + sec = "extragalactic/psformalism" + self.model = self.configs.getn(sec+"/model") + self.M_min = self.configs.getn(sec+"/M_min") + self.M_max = self.configs.getn(sec+"/M_max") + self.M_step = self.configs.getn(sec+"/M_step") + self.z_min = self.configs.getn(sec+"/z_min") + self.z_max = self.configs.getn(sec+"/z_max") + self.z_step = self.configs.getn(sec+"/z_step") + self.dndlnm_outfile = self.configs.get_path(sec+"/dndlnm_outfile") + + sec = "extragalactic/clusters" fdm = 1 - COSMO.baryon_fraction - self.Mmin = self.configs.getn(comp+"/mass_min") * fdm # [Msun] - self.boost = self.configs.getn(comp+"/boost") + self.Mmin = self.configs.getn(sec+"/mass_min") * fdm # [Msun] + self.boost = self.configs.getn(sec+"/boost") self.clobber = self.configs.getn("output/clobber") |