Skip to content

Commit a093ee5

Browse files
author
David Turner
committed
Fixed a problem with the final check of 'on_detector_match' function, that would raise an error if r[tel] was None (which it can be in some circumstances.
1 parent 6c2ea77 commit a093ee5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

xga/sourcetools/match.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This code is a part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
2-
# Last modified by David J Turner (djturner@umbc.edu) 04/06/2026, 07:08. Copyright (c) The Contributors
2+
# Last modified by David J Turner (djturner@umbc.edu) 04/06/2026, 09:27. Copyright (c) The Contributors
33
from __future__ import annotations
44

55
import gc
@@ -773,7 +773,7 @@ def match_loop_callback(match_info):
773773
t='/'.join(telescope)))
774774
# If all the dataframes in the results list are length zero, then none of the coordinates has a
775775
# valid ObsID
776-
elif all([sum([len(r[tel]) for tel in r]) == 0 for r in results]):
776+
elif all([sum([len(r[tel]) for tel in r if r[tel]] is not None) == 0 for r in results]):
777777
raise NoMatchFoundError("No coordinate pairs fall on any {t} observations.".format(t='/'.join(telescope)))
778778

779779
return results

0 commit comments

Comments
 (0)