Skip to content

Commit

Permalink
Return empty segment list if no segments
Browse files Browse the repository at this point in the history
  • Loading branch information
mcoughlin committed Apr 14, 2024
1 parent db39bf2 commit a9ad1cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gwemopt/segments.py
Expand Up @@ -194,6 +194,11 @@ def get_segments(params, config_struct):


def get_segments_tile(config_struct, observatory, radec, segmentlist, airmass):

# check for empty segmentlist and immediately return
if len(segmentlist) == 0:
return segments.segmentlistdict()

observer = ephem.Observer()
observer.lat = str(config_struct["latitude"])
observer.lon = str(config_struct["longitude"])
Expand Down

0 comments on commit a9ad1cd

Please sign in to comment.