Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaehne committed Jan 3, 2025
1 parent f432a70 commit 9683cf4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lumispy/tests/signals/test_luminescence_transient_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ def test_max_t(self):
s2 = self.s.max(axis="Time")
assert s2.axes_manager[-1].units == "nm"
assert type(s2) == LumiSpectrum

def test_spec2nav(self):
s2 = self.s.spec2nav()
assert s2.axes_manager[0].units == "nm"
assert s2.axes_manager[-1].units == "ps"
assert type(s2) == LumiTransient

def test time2nav(self):
s2 = self.s.time2nav()
assert s2.axes_manager[0].units == "ps"
assert s2.axes_manager[-1].units == "nm"
assert type(s2) == LumiSpectrum


class TestLumiTransientSpectrum2D:
Expand Down Expand Up @@ -120,3 +132,15 @@ def test_max_t(self):
s2 = self.s.max(axis="Time")
assert s2.axes_manager[-1].units == "nm"
assert type(s2) == LumiSpectrum

def test_spec2nav(self):
s2 = self.s.spec2nav()
assert s2.axes_manager[0].units == "nm"
assert s2.axes_manager[-1].units == "ps"
assert type(s2) == LumiTransient

def test time2nav(self):
s2 = self.s.time2nav()
assert s2.axes_manager[0].units == "ps"
assert s2.axes_manager[-1].units == "nm"
assert type(s2) == LumiSpectrum

0 comments on commit 9683cf4

Please sign in to comment.