units refactor

This commit is contained in:
Benoît Sierro
2023-09-25 16:14:38 +02:00
parent 2f9b5005a5
commit 4b5563bf54
13 changed files with 100 additions and 77 deletions

View File

@@ -17,7 +17,7 @@ def test_scaling():
def test_wl_dispersion():
t = sc.tspace(t_num=1 << 15, dt=3.8e-15)
w = sc.wspace(t)
wl = sc.units.m.inv(w + sc.units.nm(1546))
wl = sc.units.nm_rads(w + sc.units.nm_rads(1546)) * 1e-9
wl_disp, ind_disp = sc.fiber.lambda_for_envelope_dispersion(wl, (950e-9, 4000e-9))
assert all(np.diff(wl_disp) > 0)