tests restructured
This commit is contained in:
parent
8d7d9dab01
commit
8c6daa404e
0
tests/optical_component/__init__.py
Normal file
0
tests/optical_component/__init__.py
Normal file
@ -20,7 +20,7 @@ class TestAHotOpticalComponent(TestCase):
|
||||
wl = np.arange(201, 205, 1) << u.nm
|
||||
|
||||
def setUp(self):
|
||||
self.target = FileTarget("data/target/target_demo_1.csv")
|
||||
self.target = FileTarget("../data/target/target_demo_1.csv")
|
||||
self.comp = HotOpticalComponent(self.target, SpectralQty(self.wl, [0.5] * 4), temp=300 * u.K)
|
||||
|
||||
def test___init__(self):
|
@ -6,7 +6,7 @@ import astropy.units as u
|
||||
|
||||
class TestAtmosphere(TestCase):
|
||||
def setUp(self):
|
||||
self.target = FileTarget("data/target/target_demo_1.csv")
|
||||
self.target = FileTarget("../data/target/target_demo_1.csv")
|
||||
self.atmosphere = Atmosphere(self.target, "data/atmosphere/atmosphere_transmittance_1.csv",
|
||||
"data/atmosphere/atmosphere_emission_1.csv")
|
||||
|
@ -10,7 +10,7 @@ class TestBeamSplitter(TestCase):
|
||||
wl = np.arange(201, 205, 1) << u.nm
|
||||
|
||||
def setUp(self):
|
||||
self.target = FileTarget("data/target/target_demo_1.csv")
|
||||
self.target = FileTarget("../data/target/target_demo_1.csv")
|
||||
self.splitter = BeamSplitter(self.target, "data/beamsplitter/beamsplitter_transmittance.csv", 0.5,
|
||||
temp=300 * u.K)
|
||||
|
@ -13,7 +13,7 @@ class TestFilter(TestCase):
|
||||
0.0, 0.0] << u.W / (u.m ** 2 * u.nm)))
|
||||
|
||||
def test_fromFile(self):
|
||||
target = FileTarget("data/target/target_demo_1.csv")
|
||||
target = FileTarget("../data/target/target_demo_1.csv")
|
||||
filt = Filter.fromFile(target, "data/filter/filter_transmittance.csv")
|
||||
self.assertEqual(filt.calcSignal(), SpectralQty(np.arange(200, 210, 1) << u.nm,
|
||||
[1.10e-15, 1.20e-15, 1.30e-15, 1.40e-15, 1.35e-15, 1.44e-15,
|
@ -10,7 +10,7 @@ class TestLens(TestCase):
|
||||
wl = np.arange(201, 205, 1) << u.nm
|
||||
|
||||
def setUp(self):
|
||||
self.target = FileTarget("data/target/target_demo_1.csv")
|
||||
self.target = FileTarget("../data/target/target_demo_1.csv")
|
||||
self.lens = Lens(self.target, "data/lens/lens_transmittance.csv", 0.5, temp=300 * u.K)
|
||||
|
||||
def test___init__(self):
|
@ -10,7 +10,7 @@ class TestMirror(TestCase):
|
||||
wl = np.arange(201, 205, 1) << u.nm
|
||||
|
||||
def setUp(self):
|
||||
self.target = FileTarget("data/target/target_demo_1.csv")
|
||||
self.target = FileTarget("../data/target/target_demo_1.csv")
|
||||
self.mirror = Mirror(self.target, "data/mirror/mirror_reflectance.csv", 0.5, temp=300 * u.K)
|
||||
|
||||
def test___init__(self):
|
@ -6,7 +6,7 @@ import astropy.units as u
|
||||
|
||||
class TestStrayLight(TestCase):
|
||||
def setUp(self):
|
||||
self.target = FileTarget("data/target/target_demo_1.csv")
|
||||
self.target = FileTarget("../data/target/target_demo_1.csv")
|
||||
self.zodiac = StrayLight(self.target, "data/straylight/zodiacal_emission_1.csv")
|
||||
|
||||
def test_calcSignal(self):
|
0
tests/target/__init__.py
Normal file
0
tests/target/__init__.py
Normal file
@ -7,7 +7,7 @@ import numpy as np
|
||||
|
||||
class TestFileTarget(TestCase):
|
||||
def setUp(self):
|
||||
self.target = FileTarget("data/target/target_demo_1.csv")
|
||||
self.target = FileTarget("../data/target/target_demo_1.csv")
|
||||
|
||||
def test_signal(self):
|
||||
signal = SpectralQty(np.arange(200, 210, 1) << u.nm,
|
Loading…
x
Reference in New Issue
Block a user