From e8e7198c67b4c0e62cd419b1ebb8b300a853057d Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 19 Oct 2017 10:04:41 +0800 Subject: clusters: "catalog_outfile" is required --- fg21sim/configs/checkers.py | 2 ++ fg21sim/extragalactic/clusters/main.py | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fg21sim/configs/checkers.py b/fg21sim/configs/checkers.py index 76c99d3..cbffcc8 100644 --- a/fg21sim/configs/checkers.py +++ b/fg21sim/configs/checkers.py @@ -163,6 +163,8 @@ def check_extragalactic_clusters(configs): # catalog required when enabled to use it if configs.get(comp+"/use_output_catalog"): results.update(_check_existence(configs, comp+"/catalog_outfile")) + else: + results.update(_check_missing(configs, comp+"/catalog_outfile")) results.update(_check_missing(configs, comp+"/output_dir")) return results diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index 6b7cefa..037b983 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -432,9 +432,7 @@ class GalaxyClusters: logger.info("{name}: postprocessing ...".format(name=self.name)) # Save the final resulting clusters catalog logger.info("Save the resulting catalog ...") - if self.catalog_outfile is None: - logger.warning("Catalog output file not set; skip saving!") - elif self.use_output_catalog: + if self.use_output_catalog: logger.info("No need to save the cluster catalog.") else: dataframe_to_csv(self.catalog, outfile=self.catalog_outfile, -- cgit v1.2.2