Skip to content

Commit

Permalink
Bug fix: call load_background_model season method when initializing M…
Browse files Browse the repository at this point in the history
…ockUnblindedInjector to avoid RuntimeError when simulate_background() is called
  • Loading branch information
sathanas31 committed Feb 7, 2025
1 parent 8442116 commit 25437c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flarestack/core/injector.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ class MockUnblindedInjector:
def __init__(self, season, sources=np.nan, **kwargs):
self.season = season
self._raw_data = season.get_exp_data()
season.load_background_model()

def create_dataset(self, scale, angular_error_modifier=None):
"""Returns a background scramble
Expand Down

0 comments on commit 25437c0

Please sign in to comment.