Laser initialization

Each supported laser has its own (Julia) type which contains all the parameters required to decribe the electromagnetic field configuration. The simplest way to initialize a laser is via the setup_laser function.

LaserTypes.setup_laserMethod
setup_laser(laser, units; τ=nothing, kwargs...)

Initialize the specified laser using the default parameteres in the specified units. Supported units are

  • :SI: Values are in SI, the numeric types are regular numbers (Float64)
  • :SI_unitful: Values are in SI, but using Unitful.jl
  • :atomic: Values are in atomic units, the numeric types are regular numbers (Float64)
  • :atomic_unitful: Values are in atomic units, but using UnitfulAtomic.jl

The keyword arguments can be used to give specific values to the parameters instead of using the defaults. You can specify parameteres such as the wavelength λ (default 0.8u"μm"), beam waist w₀ (default 58.0u"μm") and the normalized vector potential a₀ (default 1).

You can also use equivalent descriptions, such as passing the angular frequency ω or the wave number k instead of λ and the Rayleigh range z_R instead of z₀. The duration of the pulse (assuming Gaussian temporal profile) can be given via τ (default 18.0u"fs").

You can also specify dimensionless parameteres such the initial phase (ϕ₀) and the polarization (ξx and ξy). The laser amplitude can be also specified through E₀.

By default the laser propagates along the Oz direction and osillates along the Ox direction. If you want to change that, you can use the propagation_dir and orientation arguments. See Laser Geometry for more details. See also the docomuntation for each laser type for more details on the additional supported arguments.

source

For example, you can create a Gaussian laser with $a_0 = 2$, $λ = 800 \text{nm}$ and waist size $w_0 = 50 \text{μm}$ and a duration $τ = 18 \text{fs}$ in the following ways

using LaserTypes
using Unitful

λ = 800u"nm"
w0 = 50u"μm"
τ = 18.0u"fs"

laser = setup_laser(GaussLaser, :SI_unitful; λ, w₀=w0, a₀=2.0, τ)
GaussLaser with SI_unitful units
a₀ = 2.0
ω  = 2.35456e15 s^-1
ϕ₀ = 0.0
w₀ = 1//20000 m
with linear polarization
and temporal Gaussian profile
centered in z₀ = 0 nm and t₀ = 0.0 fs
with duration of pulse (FWHM) τ = 18.0 fs

or

import PhysicalConstants.CODATA2018: c_0

ω = 2π * c_0 / λ

laser = setup_laser(GaussLaser, :SI_unitful; ω, w₀=w0, a₀=2.0, τ)
GaussLaser with SI_unitful units
a₀ = 2.0
ω  = 2.35456e15 s^-1
ϕ₀ = 0.0
w₀ = 5.0e-5 m
with linear polarization
and temporal Gaussian profile
centered in z₀ = 0.0 nm and t₀ = 0.0 fs
with duration of pulse (FWHM) τ = 18.0 fs

or

k = 2π / λ

laser = setup_laser(GaussLaser, :SI_unitful; k, w₀=w0, a₀=2.0, profile = GaussProfile, τ)
GaussLaser with SI_unitful units
a₀ = 2.0
ω  = 2.35456e15 s^-1
ϕ₀ = 0.0
w₀ = 5.0e-5 m
with linear polarization
and temporal Gaussian profile
centered in z₀ = 0.0 nm and t₀ = 0.0 fs
with duration of pulse (FWHM) τ = 18.0 fs

or

z_R = w0^2 * k / 2

laser = setup_laser(GaussLaser, :SI_unitful; k, z_R, a₀=2.0, profile = GaussProfile(;τ, z₀=0u"nm"))
GaussLaser with SI_unitful units
a₀ = 2.0
ω  = 2.35456e15 s^-1
ϕ₀ = 0.0
w₀ = 5.0e-5 m
with linear polarization
and temporal Gaussian profile
centered in z₀ = 0 nm and t₀ = 0.0 fs
with duration of pulse (FWHM) τ = 18.0 fs