def integrand_no_phi(t_inner, t_outer):
            amp = electric_field.amplitude**2
            envelopes = electric_field.get_electric_field_envelope(
                t_outer) * electric_field.get_electric_field_envelope(t_inner)
            kernel = ide.gaussian_kernel_LEN(t_outer - t_inner,
                                             tau_alpha=tau_alpha)
            cosines = np.cos(electric_field.omega_carrier *
                             (t_outer - t_inner))

            return amp * envelopes * kernel * cosines
def double_kick_v3(beta, delta_t, omega_alpha, tau_alpha):
    """previous a is 1"""
    kernel = ide.gaussian_kernel_LEN(delta_t, tau_alpha=tau_alpha)

    first = (1 + beta)**4
    second = (beta**2) * (np.abs(kernel)**2)
    third = (2 * beta * ((1 + beta)**2) *
             np.real(kernel * np.exp(1j * omega_alpha * delta_t)))

    return first + second - third
def double_kick(beta, delta_t, omega_alpha, tau_alpha):
    """previous a is 1 + beta"""
    kernel = ide.gaussian_kernel_LEN(delta_t, tau_alpha=tau_alpha)

    pre = (1 + beta)**2
    kernel_squared = (beta * np.abs(kernel))**2
    interference = (-2 * beta * (1 + beta) *
                    np.real(kernel * np.exp(1j * omega_alpha * delta_t)))

    return pre * (pre + kernel_squared + interference)
        return sim


if __name__ == "__main__":
    with logman as logger:
        td = np.linspace(0, 1000 * asec, 1000)

        test_mass = 1 * electron_mass_reduced
        test_charge = 1 * electron_charge
        test_width = 1 * bohr_radius

        hyd_kern_prefactor = 128 * (bohr_radius**7) / (3 * (pi**2))
        gau_kern_prefactor = np.sqrt(pi) * (test_width**2)

        kernel_gaussian = gau_kern_prefactor * ide.gaussian_kernel_LEN(
            td, tau_alpha=ide.gaussian_tau_alpha_LEN(test_width, test_mass))
        kernel_hydrogen = ide.hydrogen_kernel_LEN(
            td, kernel_prefactor=ide.hydrogen_kernel_prefactor_LEN())

        si.vis.xy_plot(
            "kernel_comparison",
            td,
            np.abs(kernel_gaussian),
            np.real(kernel_gaussian),
            np.imag(kernel_gaussian),
            np.abs(kernel_hydrogen),
            np.real(kernel_hydrogen),
            np.imag(kernel_hydrogen),
            line_labels=[
                r"Abs Gaussian",
                r"Re Gaussian",
Beispiel #5
0
import ide as ide

FILE_NAME = os.path.splitext(os.path.basename(__file__))[0]
OUT_DIR = os.path.join(os.getcwd(), "out", FILE_NAME)

PLOT_KWARGS = dict(target_dir=OUT_DIR, img_format="png", fig_dpi_scale=5)

if __name__ == "__main__":
    with si.utils.LogManager(
        "simulacra", "ionization", stdout_logs=True, stdout_level=logging.DEBUG
    ) as logger:
        tau_alpha = 4 * electron_mass * (bohr_radius ** 2) / hbar
        print(f"tau alpha: {tau_alpha / asec:3f}")

        time_diffs = np.linspace(0, 10 * tau_alpha, 1000)
        kernel = ide.gaussian_kernel_LEN(time_diffs, tau_alpha=tau_alpha)

        comp_cosh = 1 / np.cosh(time_diffs / tau_alpha)

        si.vis.xy_plot(
            "kernel_vs_time_diff",
            time_diffs,
            np.abs(kernel),
            np.real(kernel),
            np.imag(kernel),
            comp_cosh,
            line_labels=[
                r"$ \left|K\right| $",
                r"$ \mathrm{Re} \, K $",
                r"$ \mathrm{Im} \, K $",
                "$ 1 / \cosh(t-t') $",
Beispiel #6
0
if __name__ == "__main__":
    with logman as logger:
        p = ion.potentials.SincPulse(pulse_width=200 * asec, phase=pi / 2)
        times = np.linspace(-100 * asec, 100 * asec, 1000)
        si.vis.xy_plot(
            "test",
            times,
            p.get_electric_field_amplitude(times),
            x_unit="asec",
            **PLOT_KWARGS,
        )

        tau_alpha = ide.gaussian_tau_alpha_LEN(test_width=1 * bohr_radius,
                                               test_mass=electron_mass)
        dt = np.linspace(0, 3 * tau_alpha, 1000)
        k = ide.gaussian_kernel_LEN(time_difference=dt, tau_alpha=tau_alpha)

        si.vis.xy_plot(
            "kernel",
            dt,
            np.abs(k),
            np.real(k),
            np.imag(k),
            x_unit="asec",
            **PLOT_KWARGS,
        )
        imag_min_t = dt[np.argmin(np.imag(k))]
        print(tau_alpha / asec)
        print(imag_min_t / asec)
        print(imag_min_t / tau_alpha)