Discards empty OFF datasets in Analysis
@@ -353,7 +353,8 @@ class Analysis:
dataset = dataset_maker.run(obs, selection=selection)
dataset = reflected_bkg_maker.run(dataset, obs)
if dataset.counts_off is None:
- log.info(f"No OFF region found for observation {obs.obs_id}")
+ log.info(f"No OFF region found for observation {obs.obs_id}. Discarding.")
+ continue
dataset = safe_mask_maker.run(dataset, obs)
log.debug(dataset)
datasets.append(dataset)
