Skip to content

Commit

Permalink
🩹 Filter datasets in create_result_data.create_result_data to used ones
Browse files Browse the repository at this point in the history
This prevents overwriting existing data from a different dataset model.
  • Loading branch information
s-weigand committed Oct 16, 2022
1 parent 0c41626 commit 6ab5280
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion glotaran/optimization/optimization_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ def create_result_data(self) -> dict[str, xr.Dataset]:
dict[str, xr.Dataset]
The datasets with the results.
"""
result_datasets = {label: data.copy() for label, data in self._data.items()}
result_datasets = {
label: data.copy()
for label, data in self._data.items()
if label in self._dataset_group.dataset_models.keys()
}

global_matrices, matrices = self._matrix_provider.get_result()
clps, residuals = self._estimation_provider.get_result()
Expand Down

0 comments on commit 6ab5280

Please sign in to comment.