Commit 2dcbdb7ec8ed4749e9697df67ad847b4473f5eb2
Committed by
Jürgen Knödlseder
1 parent
5b8d2af9
Changed obsutils to check for the exclusion region map parameter and to pipe the…
… exclusion region map to csphagen if present and set. This affects on/off analysis only.
Showing
1 changed file
with
8 additions
and
0 deletions
cscripts/obsutils.py
| @@ -814,6 +814,14 @@ def get_onoff_obs(cls, obs, nthreads=0): | @@ -814,6 +814,14 @@ def get_onoff_obs(cls, obs, nthreads=0): | ||
| 814 | phagen['clobber'] = cls['clobber'].boolean() | 814 | phagen['clobber'] = cls['clobber'].boolean() |
| 815 | phagen['debug'] = cls['debug'].boolean() | 815 | phagen['debug'] = cls['debug'].boolean() |
| 816 | phagen['nthreads'] = nthreads | 816 | phagen['nthreads'] = nthreads |
| 817 | + | ||
| 818 | + # Pipe exclusion region map | ||
| 819 | + if hasattr(cls, 'exclregmap'): | ||
| 820 | + excl_reg_map = cls.exclregmap() | ||
| 821 | + if excl_reg_map is not None: | ||
| 822 | + phagen.exclregmap(excl_reg_map) | ||
| 823 | + | ||
| 824 | + # Run csphagen | ||
| 817 | phagen.run() | 825 | phagen.run() |
| 818 | 826 | ||
| 819 | # Clone resulting observation container | 827 | # Clone resulting observation container |