A common interface for different laser types
Author SebastianM-C
1 Star
Updated Last
1 Year Ago
Started In
February 2020


build status codecov docs

This package aims to provide a common interface for different laser types. For the spatial profiles supported are Gauss and Laguerre-Gauss (with more to be added in the future).


To install this package use

]add LaserTypes


The setup_laser function can be used to initialize the parameters for the laser depending on the laser type and units. 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 and beam waist via λ and w₀. For example for a 800nm Gaussian laser pusle in SI units use:

using LaserTypes

s = setup_laser(GaussLaser, :SI, λ=8e-7)

This will create a structure containing all the parameters required to describe the laser. The E and B functions give the value of the electromagnetic fields at a space-time point specified by r,t. For example, to evaluate the electric field at the origin use

using StaticArrays

x₀ = SVector{3}(0,0,0)
t₀ = 0

E(x₀, t₀, s)

We can visualize the intensity of the created electric field with Makie.jl like this:

using Makie
using LinearAlgebra

f(x,y) = norm(E(Point3f0(x,y,0), 1, s))
sc = surface(-5e6:1e4:5e6, -5e6:1e4:5e6, f)
scale!(sc, 1, 1, 1/4)


The package can also work with Unitful.jl and UnitfulAtomic.jl units. For those you just need to initialize the laser using :SI_unitful or :atomic_unitful and use the corresponding units for the coordinates.

Used By Packages

No packages found.