multi-pbar threading
This commit is contained in:
@@ -31,6 +31,22 @@ def propagate_all(n):
|
||||
return spec, props
|
||||
|
||||
|
||||
def quick_test():
|
||||
t = sc.tspace(dt=1e-15, t_num=2048)
|
||||
spec_0 = np.fft.fft(10e3 * np.exp(-((t / 70e-15) ** 2)))
|
||||
spec = sc.Spectrum(
|
||||
[np.exp(2j * np.pi * np.random.rand()) + spec_0 for _ in range(20)],
|
||||
sc.wspace(t) + sc.units.nm_rads(800),
|
||||
t,
|
||||
)
|
||||
_, (top, bot) = plt.subplots(2, 1, constrained_layout=True, height_ratios=[1, 5], sharex=True)
|
||||
bot.plot(spec.wl_disp * 1e9, spec[0].wl_int)
|
||||
top.plot(spec.wl_disp * 1e9, spec.coherence())
|
||||
top.set_xlim(750, 850)
|
||||
bot.set_yscale("log")
|
||||
plt.show()
|
||||
|
||||
|
||||
def main():
|
||||
n = 1
|
||||
spec, props = propagate_all(n)
|
||||
@@ -52,4 +68,5 @@ def main():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
quick_test()
|
||||
# main()
|
||||
|
||||
Reference in New Issue
Block a user