Commit c3384d71042788f828bfcbf3bfb9267a376ae473
1 parent
3e233a4c
Only query 'inmodel' in obsutils.get_onoff_obs() if no model is present in observations
Showing
1 changed file
with
1 additions
and
1 deletions
cscripts/obsutils.py
| ... | ... | @@ -771,7 +771,7 @@ def get_onoff_obs(cls, obs, nthreads=0): |
| 771 | 771 | use_model_bkg = True |
| 772 | 772 | |
| 773 | 773 | # Set inmodel, srcname, inexclusion and use_model_bkg if they are available |
| 774 | - if cls.has_par('inmodel'): | |
| 774 | + if cls.has_par('inmodel') and obs.models().size() == 0: | |
| 775 | 775 | if cls['inmodel'].is_valid(): |
| 776 | 776 | inmodel = cls['inmodel'].value() |
| 777 | 777 | if cls.has_par('srcname'): | ... | ... |