From 6acf0287bb49b93fa903b198fc051459b2908fe0 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Sat, 16 Feb 2019 22:59:49 +0100 Subject: [PATCH] Make sure that csphagen appends non-background models to output --- cscripts/csphagen.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cscripts/csphagen.py b/cscripts/csphagen.py index bb80cfe..8de3b51 100755 --- a/cscripts/csphagen.py +++ b/cscripts/csphagen.py @@ -452,7 +452,8 @@ class csphagen(ctools.csobservation): # Initialise model usage use_model = False - # If model is a background model then append "OnOff" + # If model is a background model then check if it will be + # used if 'GCTA' in model.classname(): # Skip model if background model should not be used @@ -488,9 +489,13 @@ class csphagen(ctools.csobservation): use_model = True model.ids('') - # Set instrument name + # Append "OnOff" to instrument name model.instruments(model.instruments()+'OnOff') + # ... otherwise, if model is not a background model then use it + else: + use_model = True + # If model is relevant then append it now to the model # container if use_model: -- libgit2 0.21.4