From 24e57765fb6bfbc3b758328fbe18e9a53f0dcd42 Mon Sep 17 00:00:00 2001 From: Lenz Fiedler Date: Thu, 5 Dec 2024 14:22:42 +0100 Subject: [PATCH] Fixed LDOS alignment and added it to the test suite --- mala/datahandling/ldos_aligner.py | 1 - test/examples_test.py | 23 +++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/mala/datahandling/ldos_aligner.py b/mala/datahandling/ldos_aligner.py index acc71209..9394ded4 100644 --- a/mala/datahandling/ldos_aligner.py +++ b/mala/datahandling/ldos_aligner.py @@ -226,7 +226,6 @@ def align_ldos_to_ref( # shift the ldos optimal_shift = self.calc_optimal_ldos_shift( - e_grid, ldos_mean, ldos_mean_ref, left_index, diff --git a/test/examples_test.py b/test/examples_test.py index 8834ad8b..ff600699 100644 --- a/test/examples_test.py +++ b/test/examples_test.py @@ -95,14 +95,6 @@ def test_advanced_ex06(self, tmp_path): + "/../examples/advanced/ex06_distributed_hyperparameter_optimization.py" ) - @pytest.mark.order(after="test_basic_ex01") - def test_advanced_ex09(self, tmp_path): - os.chdir(tmp_path) - runpy.run_path( - self.dir_path - + "/../examples/advanced/ex10_convert_numpy_openpmd.py" - ) - @pytest.mark.skipif( importlib.util.find_spec("oapackage") is None, reason="No OAT found on this machine, skipping this " "test.", @@ -122,3 +114,18 @@ def test_advanced_ex08(self, tmp_path): self.dir_path + "/../examples/advanced/ex08_visualize_observables.py" ) + + @pytest.mark.order(after="test_basic_ex01") + def test_advanced_ex09(self, tmp_path): + os.chdir(tmp_path) + runpy.run_path( + self.dir_path + "/../examples/advanced/ex09_align_ldos.py" + ) + + @pytest.mark.order(after="test_basic_ex01") + def test_advanced_ex10(self, tmp_path): + os.chdir(tmp_path) + runpy.run_path( + self.dir_path + + "/../examples/advanced/ex10_convert_numpy_openpmd.py" + )