Skip to content

Commit

Permalink
WARNINGS --> ERRORS and improved error message
Browse files Browse the repository at this point in the history
  • Loading branch information
pannarale committed Jan 29, 2025
1 parent 956c833 commit 8eac954
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/pygrb/pycbc_make_offline_grb_workflow
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ single_ifo = wflow.cp.has_option("workflow", "allow-single-ifo-search")
if len(sciSegs.keys()) == 0:
plot_met = make_grb_segments_plot(wflow, segmentlistdict(), triggertime,
triggername, seg_dir)
logging.warning("No science segments available.")
logging.error("No science segments available.")
sys.exit()
elif len(sciSegs.keys()) < 2 and not single_ifo:
plot_met = make_grb_segments_plot(wflow, segmentlistdict(sciSegs),
Expand All @@ -121,7 +121,7 @@ elif len(sciSegs.keys()) < 2 and not single_ifo:
msg += "If you wish to enable single IFO running add the option "
msg += "'allow-single-ifo-search' to the [workflow] section of your "
msg += "configuration file."
logging.warning(msg)
logging.error(msg)
sys.exit()
else:
onSrc, offSrc, bufferSeg = _workflow.generate_triggered_segment(wflow,
Expand Down Expand Up @@ -254,8 +254,9 @@ for ifo in ifos:
avail_segs.coalesce()
vetoed_segs = offSrc[ifo] - avail_segs
if onSrc[ifo].intersects(vetoed_segs):
logging.warning("The onsource %s overlaps with vetoed time in %s.",
onSrc[ifo], ifo)
intersection = onSrc[ifo] & vetoed_segs
logging.error("The onsource %s contains the time %s that is vetoed" +
" in %s.", onSrc[ifo][0][:], intersection[0][:], ifo)
sys.exit()

# Generate sky grid if needed
Expand Down

0 comments on commit 8eac954

Please sign in to comment.