Commit 7e364e4f authored by Brandon Piotrzkowski's avatar Brandon Piotrzkowski
Browse files

Require sky maps to be non-negative in overlap integral

parent 96c96571
Pipeline #398815 passed with stages
in 3 minutes and 43 seconds
......@@ -259,6 +259,10 @@ def skymap_overlap_integral(se_skymap, exttrig_skymap=[],
se_order = 'nested' if se_nested or any(se_skymap_uniq) else 'ring'
ext_order = 'nested' if ext_nested or any(ext_skymap_uniq) else 'ring'
# Enforce the sky maps to be non-negative
se_skymap = np.abs(se_skymap)
exttrig_skymap = np.abs(exttrig_skymap)
if not any(exttrig_skymap) and not (ra and dec):
# Raise error if external info not given
raise AssertionError('Provide external sky map or ra/dec')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment