From c55782255310a9f716d00612f9ae2a44db3f2b5b Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 12 Oct 2016 12:04:08 +0800 Subject: configs/validate.py: Add checker for [galactic][freefree] configs --- fg21sim/configs/validate.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'fg21sim/configs') diff --git a/fg21sim/configs/validate.py b/fg21sim/configs/validate.py index 8962780..f12bac1 100644 --- a/fg21sim/configs/validate.py +++ b/fg21sim/configs/validate.py @@ -82,11 +82,29 @@ def check_galactic_synchrotron(configs): return results +def check_galactic_freefree(configs): + """Check the "[galactic][freefree]" section of the configurations.""" + results = {} + results.update( + _check_missing(configs, ["galactic/freefree/halphamap_unit", + "galactic/freefree/dustmap_unit"]) + ) + results.update( + _check_existence(configs, ["galactic/freefree/halphamap", + "galactic/freefree/dustmap"]) + ) + if configs.getn("galactic/freefree/save"): + results.update(_check_missing(configs, + "galactic/freefree/output_dir")) + return results + + # Available checkers to validate the configurations _CHECKERS = [ check_frequency, check_output, check_galactic_synchrotron, + check_galactic_freefree, ] -- cgit v1.2.2