Skip to content

Commit

Permalink
have model obs fill in filter
Browse files Browse the repository at this point in the history
  • Loading branch information
yoachim committed Jan 3, 2025
1 parent 268620a commit 1c03366
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions rubin_scheduler/scheduler/model_observatory/model_observatory.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ class ModelObservatory:
will allow altitudes anywhere between 20-86 degrees.
telescope : `str`
Telescope name for rotation computations. Default "rubin".
band2filter : `dict`
Dictionary for converting band names to filter names.
Default of none will use band names for filter names.
"""

def __init__(
Expand Down Expand Up @@ -168,6 +171,7 @@ def __init__(
sky_alt_limits=None,
sky_az_limits=None,
telescope="rubin",
band2filter=None,
):
self.nside = nside

Expand All @@ -179,6 +183,12 @@ def __init__(
mjd = mjd_start

self.bandlist = ["u", "g", "r", "i", "z", "y"]
if band2filter is None:
self.band2filter = {}
for bandname in self.bandlist:
self.band2filter[bandname] = bandname
else:
self.band2filter = band2filter

self.cloud_limit = cloud_limit
self.no_sky = no_sky
Expand Down Expand Up @@ -550,6 +560,8 @@ def observation_add_data(self, observation):
)
observation["moonPhase"] = sun_moon_info["moon_phase"]

observation["filter"] = self.band2filter[observation["band"][0]]

observation["ID"] = self.obs_id_counter
self.obs_id_counter += 1

Expand Down

0 comments on commit 1c03366

Please sign in to comment.