Skip to content
Snippets Groups Projects
Commit 8730aaff authored by David Rafferty's avatar David Rafferty
Browse files

Fix incorrect filtering with mask images when sources lie outside the mask

parent 97cda032
Branches
Tags
No related merge requests found
...@@ -482,11 +482,11 @@ def getMaskValues(mask, RARad, DecRad): ...@@ -482,11 +482,11 @@ def getMaskValues(mask, RARad, DecRad):
(a, b, _, _) = maskdata.toworld([0, 0, 0, 0]) (a, b, _, _) = maskdata.toworld([0, 0, 0, 0])
(_, _, pixY, pixX) = maskdata.topixel([a, b, decRad, raRad]) (_, _, pixY, pixX) = maskdata.topixel([a, b, decRad, raRad])
try: try:
if maskval[int(pixY), int(pixX)]: if maskval[int(pixY), int(pixX)] and pixX >= 0 and pixY >=0:
vals.append(True) vals.append(True)
else: else:
vals.append(False) vals.append(False)
except: except IndexError:
vals.append(False) vals.append(False)
return np.array(vals) return np.array(vals)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment