Skip to content

Commit

Permalink
swap in almanac for model observatory in example sched
Browse files Browse the repository at this point in the history
  • Loading branch information
yoachim committed Sep 28, 2023
1 parent 4adb605 commit 490475f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions rubin_sim/scheduler/example/example_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
)
from rubin_sim.scheduler.utils import ConstantFootprint, EuclidOverlapFootprint, make_rolling_footprints
from rubin_sim.utils import _hpid2_ra_dec
from rubin_sim.site_models import Almanac


iers.conf.auto_download = False

Expand Down Expand Up @@ -1341,13 +1343,14 @@ def example_scheduler(

repeat_night_weight = None

observatory = ModelObservatory(nside=nside, mjd_start=mjd_start)
conditions = observatory.return_conditions()
almanac = Almanac(mjd_start=mjd_start)
sun_moon_info = almanac.get_sun_moon_positions(mjd_start)
sun_ra_start = sun_moon_info["sun_RA"].copy()

footprints = make_rolling_footprints(
fp_hp=footprints_hp,
mjd_start=conditions.mjd_start,
sun_ra_start=conditions.sun_ra_start,
mjd_start=mjd_start,
sun_ra_start=sun_ra_start,
nslice=nslice,
scale=rolling_scale,
nside=nside,
Expand Down Expand Up @@ -1400,7 +1403,7 @@ def example_scheduler(
nside,
nexp=nexp,
footprints=footprints,
mjd_start=conditions.mjd_start,
mjd_start=mjd_start,
)
twi_blobs = generate_twi_blobs(
nside,
Expand Down

0 comments on commit 490475f

Please sign in to comment.