From 0fe535c2ccbe408c37a6c54629c507c2788485b9 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 4 Oct 2017 20:57:56 +0800 Subject: clusters: Use "hmf" to calculate halo mass functions/distributions * New dependency "hmf" (halo mass functions) module * Calculate halo mass distributions/functions (dndlnm) with respect to masses and redshifts, instead of use the previous data file ("ps_data") * New section "[extragalactic][psformalism]" in configurations * New functions to write and read the dndlnm data TODO: * update the method to sample (mass, redshift) for clusters from the dndlnm data --- fg21sim/configs/checkers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'fg21sim/configs/checkers.py') diff --git a/fg21sim/configs/checkers.py b/fg21sim/configs/checkers.py index 5316eac..76c99d3 100644 --- a/fg21sim/configs/checkers.py +++ b/fg21sim/configs/checkers.py @@ -150,13 +150,16 @@ def check_galactic_snr(configs): def check_extragalactic_clusters(configs): """ Check the "[extragalactic][clusters]" section of the configurations. + The related sections ("[extragalactic][psformalism]", + "[extragalactic][halos]") are also checked. """ comp = "extragalactic/clusters" comp_enabled = configs.foregrounds[0] results = {} if comp in comp_enabled: - # Only validate the configs if this component is enabled - results.update(_check_existence(configs, comp+"/ps_data")) + # output dndlnm data file required + key = "extragalactic/psformalism/dndlnm_outfile" + results.update(_check_missing(configs, key)) # catalog required when enabled to use it if configs.get(comp+"/use_output_catalog"): results.update(_check_existence(configs, comp+"/catalog_outfile")) -- cgit v1.2.2