change: grid and units improvements
This commit is contained in:
@@ -20,3 +20,10 @@ def test_wl_dispersion():
|
||||
wl = sc.units.m.inv(w + sc.units.nm(1546))
|
||||
wl_disp, ind_disp = sc.fiber.lambda_for_envelope_dispersion(wl, (950e-9, 4000e-9))
|
||||
assert all(np.diff(wl_disp) > 0)
|
||||
|
||||
|
||||
def test_iwspace():
|
||||
t = sc.tspace(dt=15.6, t_num=512)
|
||||
assert sc.math.iwspace(sc.wspace(t)) == pytest.approx(t)
|
||||
assert sc.math.iwspace(sc.wspace(t) + 4564568456.4) != pytest.approx(t)
|
||||
assert sc.math.iwspace(sc.wspace(t) + 4564568456.4) == pytest.approx(t, rel=1e-3)
|
||||
|
||||
Reference in New Issue
Block a user