Simplified setup, not working yet

This commit is contained in:
Benoît Sierro
2023-05-02 12:32:24 +02:00
parent 35e6ad049c
commit 4d424e52dd
14 changed files with 440 additions and 780 deletions

View File

@@ -0,0 +1,27 @@
import matplotlib.pyplot as plt
import scgenerator as sc
import scgenerator.solver as sol
import scgenerator.math as math
def main():
params = sc.Parameters(**sc.open_single_config("Optica_PM2000D.toml"))
print(params.nonlinear_operator)
print(params.compute("dispersion_op"))
print(params.linear_operator)
print(params.spec_0)
print(params.compute("gamma_op"))
plt.plot(params.w, params.linear_operator(0).imag)
plt.show()
res = sol.integrate(
params.spec_0, params.length, params.linear_operator, params.nonlinear_operator
)
plt.plot(res.spectra[0].real)
plt.show()
if __name__ == "__main__":
main()