Skip to content

Commit

Permalink
Add missing weighted rmse attribute to dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnel committed Sep 14, 2024
1 parent fc5ad20 commit 4783998
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyglotaran_extras/compat/convert_result_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ def convert_dataset(dataset: xr.Dataset, cleanup: bool = False) -> xr.Dataset:
_adjust_activation_to_irf(converted_ds, cleanup=cleanup)
_adjust_estimations_to_spectra(converted_ds, cleanup=cleanup)

if (
"weighted_root_mean_square_error" not in converted_ds.attrs
and "root_mean_square_error" in converted_ds.attrs
):
converted_ds.attrs["weighted_root_mean_square_error"] = converted_ds.attrs[
"root_mean_square_error"
]

# variable_mapping = {"species_associated_estimation": "species_associated_spectra"} # noqa: ERA001, E501
# converted_ds = converted_ds.rename_vars({**variable_mapping}) # noqa: ERA001

Expand Down

0 comments on commit 4783998

Please sign in to comment.