From 5d803fc3ef4201e6a1bb8358523f2ff3e3376eaf Mon Sep 17 00:00:00 2001 From: Michael Coughlin Date: Thu, 2 May 2024 12:22:54 -0500 Subject: [PATCH] put loop inside try-except --- gwemopt/scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gwemopt/scheduler.py b/gwemopt/scheduler.py index 275c78b..a5dc684 100644 --- a/gwemopt/scheduler.py +++ b/gwemopt/scheduler.py @@ -447,10 +447,10 @@ def get_order( max_no_observ = min(tilematrix.shape) for jj in range(max_no_observ): - idx0, idx1 = optimal_points[jj] # idx0 indexes over the time windows, idx1 indexes over the probabilities # idx2 gets the exposure id of the tile, used to assign tileexptime and tilenexps try: + idx0, idx1 = optimal_points[jj] idx2 = exposureids[idx1] pamw = tilematrix[idx0][idx1] total_cost += pamw