Commit 80f60435 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Fixed issue in EELS tests.

parent 0e5472c8
Pipeline #118349 passed with stages
in 27 minutes and 6 seconds
......@@ -90,10 +90,6 @@ def test_method_gw(gw):
def test_method_eels(eels):
method = eels.results.method
assert method.method_name == "EELS"
assert method.experiment.eels.resolution.to(ureg.electron_volt).magnitude == pytest.approx(1)
assert method.experiment.eels.min_energy.to(ureg.electron_volt).magnitude == pytest.approx(100)
assert method.experiment.eels.max_energy.to(ureg.electron_volt).magnitude == pytest.approx(200)
assert method.experiment.eels.detector_type == "Quantum GIF"
@pytest.mark.parametrize('entry, method_identified', [
......
......@@ -29,8 +29,13 @@ from .conftest import (
def test_eels(eels):
spectra = eels.results.properties.spectroscopy.eels
assert spectra.n_values == spectra.count.shape[0] == spectra.energy.shape[0]
assert len(eels.results.properties.spectroscopy.eels) == 1
eels_data = eels.results.properties.spectroscopy.eels[0]
assert eels_data.resolution.to(ureg.electron_volt).magnitude == pytest.approx(1)
assert eels_data.min_energy.to(ureg.electron_volt).magnitude == pytest.approx(100)
assert eels_data.max_energy.to(ureg.electron_volt).magnitude == pytest.approx(200)
assert eels_data.detector_type == "Quantum GIF"
assert eels_data.spectrum.n_values == eels_data.spectrum.count.shape[0] == eels_data.spectrum.energy.shape[0]
def test_bulk_modulus(mechanical):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment