From 31f05663791f78adf6737c53e342faf2e68b8942 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 28 Feb 2019 19:48:31 +0800 Subject: foreground: Do not add to products if empty --- fg21sim/foregrounds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fg21sim/foregrounds.py b/fg21sim/foregrounds.py index 45faa52..4451725 100644 --- a/fg21sim/foregrounds.py +++ b/fg21sim/foregrounds.py @@ -104,7 +104,7 @@ class Foregrounds: comp_obj = comp_cls(self.configs) comp_obj.preprocess() skyfiles = comp_obj.simulate() - if self.products: + if self.products and skyfiles: self.products.add_component(compID, skyfiles) comp_obj.postprocess() -- cgit v1.2.2