Skip to content

Commit

Permalink
when requesting time during the day, set available block size time to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ehneilsen committed Jan 18, 2024
1 parent 0e1e46c commit 12e6c37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rubin_scheduler/scheduler/surveys/surveys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 311 in rubin_scheduler/scheduler/surveys/surveys.py

View check run for this annotation

Codecov / codecov/patch

rubin_scheduler/scheduler/surveys/surveys.py#L311

Added line #L311 was not covered by tests
available_time *= 24.0 * 60.0 # to minutes
n_blocks = available_time / self.ideal_pair_time
if n_blocks < n_ideal_blocks:
Expand Down

0 comments on commit 12e6c37

Please sign in to comment.