Skip to content

Commit

Permalink
If start date is in the future, use it as default pre-night date
Browse files Browse the repository at this point in the history
  • Loading branch information
ehneilsen committed Sep 20, 2023
1 parent 2b6f924 commit 38640ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion schedview/app/prenight/prenight.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import rubin_sim.scheduler.example
from astropy.time import Time
from rubin_sim.scheduler.model_observatory import ModelObservatory
from rubin_sim.utils import survey_start_mjd

import schedview.collect.footprint
import schedview.collect.opsim
Expand All @@ -35,7 +36,7 @@
"US/Eastern",
]
DEFAULT_TIMEZONE = AVAILABLE_TIMEZONES[0]
DEFAULT_CURRENT_TIME = Time.now()
DEFAULT_CURRENT_TIME = Time(max(Time.now().mjd, survey_start_mjd()), format="mjd")
DEFAULT_OPSIM_FNAME = "opsim.db"
DEFAULT_SCHEDULER_FNAME = "scheduler.pickle.xz"
DEFAULT_REWARDS_FNAME = "rewards.h5"
Expand Down

0 comments on commit 38640ab

Please sign in to comment.