Skip to content

Commit

Permalink
Fix masking for MC mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
andreicuceu committed Feb 8, 2024
1 parent d885e67 commit 2d059df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vega/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ def create_global_monte_carlo(self, fiducial_model, scale=None, forecast=False):
for name, data in self._data.items():
mask = data.dist_model_coordinates.get_mask_to_other(data.data_coordinates)
if data.data_mask.size == fiducial_model[name].size:
masked_fiducial.append(fiducial_model[name][data.data_mask])
elif mask.size == fiducial_model[name].size:
masked_fiducial.append(fiducial_model[name])
elif mask.size == fiducial_model[name].size:
masked_fiducial.append(fiducial_model[name][mask])
else:
raise ValueError('Input fiducial has unknown size. '
'It must match the data or the model.')
Expand Down

0 comments on commit 2d059df

Please sign in to comment.