diff --git a/glotaran/builtin/megacomplexes/coherent_artifact/coherent_artifact_megacomplex.py b/glotaran/builtin/megacomplexes/coherent_artifact/coherent_artifact_megacomplex.py index 66d9555ad..2c81cf93e 100644 --- a/glotaran/builtin/megacomplexes/coherent_artifact/coherent_artifact_megacomplex.py +++ b/glotaran/builtin/megacomplexes/coherent_artifact/coherent_artifact_megacomplex.py @@ -73,11 +73,11 @@ def finalize_data( global_dimension = dataset_model.get_global_dimension() model_dimension = dataset_model.get_model_dimension() dataset.coords["coherent_artifact_order"] = np.arange(1, self.order + 1) - concentration_dimensions = (model_dimension, "coherent_artifact_order") + response_dimensions = (model_dimension, "coherent_artifact_order") if dataset_model.is_index_dependent() is True: - concentration_dimensions = (global_dimension, *concentration_dimensions) - dataset["coherent_artifact_concentration"] = ( - concentration_dimensions, + response_dimensions = (global_dimension, *response_dimensions) + dataset["coherent_artifact_response"] = ( + response_dimensions, dataset.matrix.sel(clp_label=self.compartments()).values, ) dataset["coherent_artifact_associated_spectra"] = ( diff --git a/glotaran/builtin/megacomplexes/coherent_artifact/test/test_coherent_artifact.py b/glotaran/builtin/megacomplexes/coherent_artifact/test/test_coherent_artifact.py index 433688f3c..6e0dcfb0d 100644 --- a/glotaran/builtin/megacomplexes/coherent_artifact/test/test_coherent_artifact.py +++ b/glotaran/builtin/megacomplexes/coherent_artifact/test/test_coherent_artifact.py @@ -127,11 +127,11 @@ def test_coherent_artifact(is_index_dependent: bool): assert data.data.shape == resultdata.fitted_data.shape assert np.allclose(data.data, resultdata.fitted_data) - assert "coherent_artifact_concentration" in resultdata + assert "coherent_artifact_response" in resultdata if is_index_dependent: - assert resultdata["coherent_artifact_concentration"].shape == (spectral.size, time.size, 3) + assert resultdata["coherent_artifact_response"].shape == (spectral.size, time.size, 3) else: - assert resultdata["coherent_artifact_concentration"].shape == (time.size, 3) + assert resultdata["coherent_artifact_response"].shape == (time.size, 3) assert "coherent_artifact_associated_spectra" in resultdata assert resultdata["coherent_artifact_associated_spectra"].shape == (3, 3)