From 983de7a16ece7b2ec993d423cff8eb4a8db36080 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 26 Aug 2017 11:06:19 +0800 Subject: foregrounds.py: Remove foreground components combination * Remove output configs "combine", "combine_prefix", "output_dir" * Remove configuration checker "check_output" --- fg21sim/configs/00-general.conf.spec | 9 --------- fg21sim/configs/checkers.py | 15 +++------------ 2 files changed, 3 insertions(+), 21 deletions(-) (limited to 'fg21sim/configs') diff --git a/fg21sim/configs/00-general.conf.spec b/fg21sim/configs/00-general.conf.spec index 9d9847d..49525d6 100644 --- a/fg21sim/configs/00-general.conf.spec +++ b/fg21sim/configs/00-general.conf.spec @@ -103,15 +103,6 @@ checksum = boolean(default=False) # Whether overwrite existing files clobber = boolean(default=False) -# Whether combine all components and output -combine = boolean(default=True) -# Prefix for the combined files -combine_prefix = string(default="fg") -# Output directory to place the combined products -# NOTE: This config is mandatory and should be provided by the user -# if above "combine=True". -output_dir = string(default=None) - # Filename of the simulation products manifest (JSON format), which # records all output products together with their sizes and MD5 hashes. # Do not create such a manifest if this option is not specified. diff --git a/fg21sim/configs/checkers.py b/fg21sim/configs/checkers.py index ffb1e63..698311d 100644 --- a/fg21sim/configs/checkers.py +++ b/fg21sim/configs/checkers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Weitian LI +# Copyright (c) 2016-2017 Weitian LI # MIT license """ @@ -93,14 +93,6 @@ def check_frequency(configs): return results -def check_output(configs): - """Check the "[output]" section of the configurations.""" - results = {} - if configs.getn("output/combine"): - results.update(_check_missing(configs, "output/output_dir")) - return results - - def check_galactic_synchrotron(configs): """Check the "[galactic][synchrotron]" section of the configurations.""" comp = "galactic/synchrotron" @@ -187,7 +179,6 @@ _CHECKERS = [ check_foregrounds, check_sky, check_frequency, - check_output, check_galactic_synchrotron, check_galactic_freefree, check_galactic_snr, @@ -205,13 +196,13 @@ def check_configs(configs, raise_exception=True, checkers=_CHECKERS): Parameters ---------- - configs : `ConfigManager` instance + configs : `~ConfigManager` An ``ConfigManager`` instance contains both default and user configurations. raise_exception : bool, optional Whether raise a ``ConfigError`` exception if there is any invalid config options? - checkers : list of functions, optional + checkers : list[function], optional List of checker functions through which the configurations will be checked. -- cgit v1.2.2