-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Not sure whether we want to add that but right the background time profile is fixed when the self.ent model is built.
This can be done by a function like
self.background_time_profile = background_time_profile
self._grl = grl
self._grl_rates = self._grl['self.ents'] / self._grl['livetime']
self.signal_time_profile = inject_signal_time_profile
start, stop = self.background_time_profile.range
return_stop_contained = True
background_run_mask = self._contained_run_mask(
start,
stop,
return_stop_contained=return_stop_contained,
)
background_grl = self._grl[background_run_mask]
self._n_background = background_grl['self.ents'].sum()
self._n_background /= background_grl['livetime'].sum()
self._n_background *= self._contained_livetime(
start,
stop,
background_grl,
)