From a916862193bcaa5dde2775f65502e27041fbd992 Mon Sep 17 00:00:00 2001 From: Andreas Specovius Date: Tue, 16 Jun 2020 14:47:04 +0200 Subject: [PATCH] Replaced check for too small pointing-source offset by check for the on region containing the pointing (should be equal, but has greater flexibility for different (filled) region types) --- cscripts/csphagen.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cscripts/csphagen.py b/cscripts/csphagen.py index 5b1d7b8..282fd5a 100755 --- a/cscripts/csphagen.py +++ b/cscripts/csphagen.py @@ -385,10 +385,11 @@ class csphagen(ctools.csobservation): offset = pnt_dir.dist_deg(self._src_dir) # Skip observation if it is too close to source - if offset <= self._rad: - msg = ' Skip because observation is pointed at %.3f deg <= '\ - '"rad=%.3f" from source.' \ - % (offset, self._rad) + if self._src_reg.contains(pnt_dir): + msg = ' Skip because observation is pointed at %.3f deg from source'\ + % (offset) + if self._srcshape == 'CIRCLE': + msg += ' (circle rad=%.3f).' % (self._rad) self._log_string(gammalib.NORMAL, msg) # Skip observation if it is pointed too far from the source -- libgit2 0.21.4