aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-10-12 12:04:08 +0800
committerAaron LI <aaronly.me@outlook.com>2016-10-12 12:04:08 +0800
commitc55782255310a9f716d00612f9ae2a44db3f2b5b (patch)
tree48366613c0b15f7503f19a2dd66a715ffca4d096
parent1e463879965e2b39c16bbfb9a098fde26bd4284b (diff)
downloadfg21sim-c55782255310a9f716d00612f9ae2a44db3f2b5b.tar.bz2
configs/validate.py: Add checker for [galactic][freefree] configs
-rw-r--r--fg21sim/configs/validate.py18
1 files changed, 18 insertions, 0 deletions
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,
]