Skip to content

Commit

Permalink
add extra info to note from triple detailer
Browse files Browse the repository at this point in the history
  • Loading branch information
yoachim committed May 16, 2023
1 parent e995f5b commit 32d1651
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rubin_sim/scheduler/detailers/detailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,11 @@ def __call__(self, observation_list, conditions):


class TwilightTripleDetailer(BaseDetailer):
def __init__(self, slew_estimate=5.0, n_repeat=3):
def __init__(self, slew_estimate=5.0, n_repeat=3, update_note=True):
super(TwilightTripleDetailer, self).__init__()
self.slew_estimate = slew_estimate
self.n_repeat = n_repeat
self.update_note = update_note

def __call__(self, observation_list, conditions):
obs_array = np.concatenate(observation_list)
Expand Down Expand Up @@ -345,6 +346,9 @@ def __call__(self, observation_list, conditions):
# Repeat the observations n times
out_obs = []
for i in range(self.n_repeat):
out_obs.extend(copy.deepcopy(observation_list))

sub_list = copy.deepcopy(observation_list)
if self.update_note:
for obs in sub_list:
obs["note"][0] += ", %i" % i
out_obs.extend(sub_list)
return out_obs

0 comments on commit 32d1651

Please sign in to comment.