From c3384d71042788f828bfcbf3bfb9267a376ae473 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Thu, 24 Jan 2019 16:01:36 +0100 Subject: [PATCH] Only query 'inmodel' in obsutils.get_onoff_obs() if no model is present in observations --- cscripts/obsutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cscripts/obsutils.py b/cscripts/obsutils.py index e9ffc76..fad1bce 100755 --- a/cscripts/obsutils.py +++ b/cscripts/obsutils.py @@ -771,7 +771,7 @@ def get_onoff_obs(cls, obs, nthreads=0): use_model_bkg = True # Set inmodel, srcname, inexclusion and use_model_bkg if they are available - if cls.has_par('inmodel'): + if cls.has_par('inmodel') and obs.models().size() == 0: if cls['inmodel'].is_valid(): inmodel = cls['inmodel'].value() if cls.has_par('srcname'): -- libgit2 0.21.4