Skip to content

Commit

Permalink
Prevent is_valid_sky from querying regions with a radius larger than …
Browse files Browse the repository at this point in the history
…3 degrees
  • Loading branch information
albireox committed Aug 15, 2024
1 parent 77396c1 commit 49a9907
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/target_selection/skies.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,12 @@ def is_valid_sky(
sep = coords_ap.separation(cen)
radius = sep.max().deg + 0.1 # Add a small buffer to account for edge effects.

if radius > 3:
raise ValueError(
"The radius of the region to query is too large. "
"Please provide coordinates that span a smaller region."
)

# Iterate over each catalogue and query sources in the region.
for cat_name, cat_params in c_params.items():
radius_select = ""
Expand Down

0 comments on commit 49a9907

Please sign in to comment.