diff --git a/src/scgenerator/examples/dudley2006.py b/src/scgenerator/examples/dudley2006.py index 8d91ab3..27bbe4c 100644 --- a/src/scgenerator/examples/dudley2006.py +++ b/src/scgenerator/examples/dudley2006.py @@ -1,8 +1,6 @@ import click -import colorcet as cc import matplotlib.pyplot as plt import numpy as np -from plotapp import PlotApp import scgenerator as sc @@ -45,32 +43,11 @@ def compute_manual(save: bool): beta_op = sc.operators.constant_polynomial_dispersion(params.beta2_coefficients, w_c) linear = sc.operators.envelope_linear_operator( beta_op, - # sc.operators.constant_quantity(0), sc.operators.constant_quantity(0), ) - # with PlotApp() as app: - # o = np.argsort(p.l) - # sax = app["spectrum"] - # sax.set_line_data("beta2", p.l[o], beta_op(0)[o].imag) - # return - - # spm = sc.operators.envelope_spm(0) - # plt.plot(p.l, sc.abs2(p.spec_0)) - # plt.plot(p.l, sc.abs2(np.fft.fft(spm(np.fft.ifft(p.spec_0), 0))), ls=":") - # plt.xlim(100e-9, 1500e-9) - # plt.show() - # return - - # nonlinear = sc.operators.envelope_nonlinear_operator( - # gamma_op=sc.operators.constant_quantity(params.gamma), - # ss_op=sc.operators.constant_quantity(w_c / w0), - # spm_op=sc.operators.envelope_spm(0), - # raman_op=sc.operators.no_op_time(params.t_num), - # ) - hr_w = params.compute("hr_w") - def nonlinear(spec, z): + def nonlinear(spec, _): field = np.fft.ifft(spec) field2 = sc.abs2(field) fr = 0.18 @@ -86,7 +63,7 @@ def compute_manual(save: bool): w_power_fact = np.array( [sc.math.power_fact(w_c[above0], k) for k in range(2, len(p.beta2_coefficients) + 2)] ) - for i, wn in reversed(list(enumerate(w_power_fact))): + for i, _ in reversed(list(enumerate(w_power_fact))): print(i, p.beta2_coefficients[i]) linear_arr[above0] += p.beta2_coefficients[i] * sc.math.power_fact(w_c[above0], i + 2) linear_arr *= -1j