From 12e6c37a5a4667ccdd966f9d876fe05b78dc734a Mon Sep 17 00:00:00 2001 From: Eric Neilsen Date: Thu, 18 Jan 2024 09:03:38 -0800 Subject: [PATCH] when requesting time during the day, set available block size time to 0 --- rubin_scheduler/scheduler/surveys/surveys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rubin_scheduler/scheduler/surveys/surveys.py b/rubin_scheduler/scheduler/surveys/surveys.py index 1bc6324f..74f6f484 100644 --- a/rubin_scheduler/scheduler/surveys/surveys.py +++ b/rubin_scheduler/scheduler/surveys/surveys.py @@ -308,7 +308,7 @@ def _set_block_size(self, conditions): at2 = conditions.sun_n18_setting - conditions.mjd times = np.array([at1, at2]) times = times[np.where(times > 0)] - available_time = np.min(times) + available_time = np.min(times) if len(times) > 0 else 0.0 available_time *= 24.0 * 60.0 # to minutes n_blocks = available_time / self.ideal_pair_time if n_blocks < n_ideal_blocks: