Fields.jl

Luna.Fields.CWFieldType
CWField(Pavg, Aωfunc)

Represents a continuous-wave field with spectral phase/amplitude defined by Aωfunc.

Fields

  • Pavg::Float64: the average power
  • Aωfunc: a callable f(ω) to get the amplitude/phase of the field in the frequency domain
source
Luna.Fields.DataFieldMethod
DataField(ω, Iω, ϕω; energy, ϕ=Float64[], λ0=NaN)

Represents a field with spectral power density and spectral phase ϕω, sampled on radial frequency axis ω.

source
Luna.Fields.DataFieldMethod
DataField(ω, Eω; energy, ϕ=Float64[], λ0=NaN)

Create a DataField from the complex frequency-domain field sampled on radial frequency grid ω.

source
Luna.Fields.DataFieldMethod
DataField(fpath; energy, ϕ=Float64[], λ0=NaN)

Create a DataField by loading ω, , and ϕω from the file at fpath. The file must contain 3 columns:

  • frequency in Hz
  • spectral power density (arbitrary units)
  • unwrapped spectral phase
source
Luna.Fields.DataFieldMethod
(d::DataField)(grid, FT)

Interpolate the DataField onto the provided grid (note the argument FT is unused).

source
Luna.Fields.PropagatedFieldType
PropagatedField(propagator!, field)

A wrapper around a previously defined TimeField which applies the mutating propagation function propagator!(Eω, grid) to the field .

source
Luna.Fields.PulseFieldType
PulseField(λ0, energy, ϕ, τ0, Itshape)

Represents a temporal pulse with shape defined by Itshape.

Fields

  • λ0::Float64: the central field wavelength
  • energy::Float64: the pulse energy
  • power::Float64: the pulse peak power (after applying any spectral phases)
  • ϕ::Vector{Float64}: spectral phases (CEP, group delay, GDD, TOD, ...)
  • Itshape: a callable f(t) to get the shape of the intensity/power in the time domain
source
Luna.Fields.PulseFieldMethod
(p::PulseField)(Eω, grid, energy_t, FT)

Add the field to for the provided grid, energy_t function and Fourier transform FT

source
Luna.Fields.ShotNoiseType
(s::ShotNoise)(Eω, grid)

Get shotnoise for the provided grid. The optional parameter FT is unused and is present for interface compatibility with TimeField.

source
Luna.Fields.ShotNoiseType
ShotNoise(rng=GLOBAL_RNG)

Creates one photon per mode quantum noise (shot noise) to add to an input field. If no random number generator rng is provided, it defaults to GLOBAL_RNG

source
Luna.Fields.SpatioTemporalFieldType
SpatioTemporalField(λ0, energy, ϕ, τ0, Ishape)

Represents a spatiotemporal pulse with shape defined by Ishape.

Fields

  • λ0::Float64: the central field wavelength
  • energy::Float64: the pulse energy
  • ϕ::Float64: the CEO phase
  • τ0::Float64: the temproal shift from grid time 0
  • Ishape: a callable f(t, xs) to get the shape of the intensity/power in the time-space domain
source
Luna.Fields.CWSechMethod
CWSech(;λ0, Pavg, Δλ)

Construct a CW field with Sech^2 spectral power density and random phase, with spectral full-width half-maximim of Δλ and other parameters as defined for CWField.

source
Luna.Fields.GaussFieldMethod
GaussField(;λ0, τfwhm, energy, ϕ, m=1)

Construct a (super)Gaussian shaped pulse with intensity/power FWHM τfwhm, either energy or peak power specified, superGaussian parameter m=1 and other parameters as defined for PulseField.

source
Luna.Fields.GaussGaussFieldMethod
GaussGaussField(;λ0, τfwhm, energy, w0, ϕ=0.0, τ0=0.0, m=1)

Construct a (super)Gaussian shaped pulse with intensity/power FWHM τfwhm, superGaussian parameter m=1 and Gaussian shaped spatial profile with waist w0, propagation distance from the waist of propz, and other parameters as defined for TimeField.

source
Luna.Fields.SechFieldMethod
SechField(;λ0, energy, τw=nothing, τfwhm=nothing, ϕ=0.0, τ0=0.0)

Construct a Sech^2(t/τw) shaped pulse, specifying either the natural width τw, or the intensity/power FWHM τfwhm, and either energy or peak power specified. Other parameters are as defined for PulseField.

source
Luna.Fields.coupled_fieldMethod
coupled_field(i, mode, E, fieldfunc; energy, kwargs...)

Create an element of an input field tuple (for use in Luna.setup) based on coupling field E into a mode. The index i species the mode index. The temporal fields are initialised using fieldfunc (e.g. one of GaussField, SechField etc.) with the same keyword arguments.

source
Luna.Fields.gauss_beamMethod
gauss_beam(k, ω0; z=0.0, pol=:y)

Gaussian beam field distribution with waist radius ω0 and wavenumber k, at position z from focus. pol describes the polarisation direction, one of :x or :y.

source
Luna.Fields.gauss_beam_initMethod
gauss_beam_init(modes, k, ω0, fieldfunc; energy, kwargs...)

Create an input field tuple (for use in Luna.setup) based on coupling a focused Gaussian beam with focused spot size ω0 and wavenumber k into modes. The temporal fields are initialised using fieldfunc (e.g. one of GaussField, SechField etc.) with the same keyword arguments.

```jldoctest julia> a = 125e-6; julia> energy = 1e-3; julia> λ0 = 800e-9; julia> modes = (Capillary.MarcatiliMode(a, :He, 1.0, m=1), Capillary.MarcatiliMode(a, :He, 1.0, m=2)); julia> fields = Fields.gaussbeaminit(modes, 2pi/λ0, a0.64, Fields.GaussField; λ0=λ0, τfwhm=30e-15, energy=energy); julia> fields[1].fields[1].energy/energy ≈ 0.98071312 true julia> fields[2].fields[1].energy/energy ≈ 0.0061826217 true

source
Luna.Fields.make_EtMethod
make_Et(p::PulseField, grid)

Create electric field for PulseField, either the field (for RealGrid) or the envelope (for EnvGrid)

source
Luna.Fields.optcomp_materialMethod
optcomp_material(Eω, grid, material, λ0; kwargs...)

Maximise the peak power of the field by linear propagation through the material. Keyword arguments kwargs are the same as for prop_material.

source
Luna.Fields.optcomp_taylorMethod
optcomp_taylor(Eω, grid, λ0; order=2)

Maximise the peak power of the field by adding Taylor-expanded spectral phases up to order order.

source
Luna.Fields.optfield_cepMethod
optfield_cep(Eω, grid)

Find the value of the absolute phase which produces the maximal field strength in the time domain.

source
Luna.Fields.prop_material!Function
prop_material!(Eω, ω, material, thickness, λ0=nothing;
               P=1, T=PhysData.roomtemp, lookup=nothing)

Linearly propagate the frequency-domain field through a certain thickness of a material. If the central wavelength λ0 is given, remove the group delay at this wavelength. Keyword arguments P (pressure), T (temperature) and lookup (whether to use lookup table instead of Sellmeier expansion).

source
Luna.Fields.prop_materialMethod
prop_material(Eω, ω, material, thickness, λ0=nothing;
               P=1, T=PhysData.roomtemp, lookup=nothing)

Return a copy of the frequency-domain field after linear propagation through a certain thickness of a material. If the central wavelength λ0 is given, remove the group delay at this wavelength. Keyword arguments P (pressure), T (temperature) and lookup (whether to use lookup table instead of Sellmeier expansion).

source
Luna.Fields.prop_mirror!Method
prop_mirror!(Eω, ω, reflections, transferfunction)
prop_mirror!(Eω, grid, reflections, transferfunction)

Propagate the field linearly by adding a number of reflections from a mirror with a given transfer function. transferfunction should take a single argument λ, wavelength in SI units (m), and return the complex frequency-domain response of the mirror (amplitude and phase).

source
Luna.Fields.prop_mirror!Method
prop_mirror!(Eω, ω, reflections, λR, R, λGDD, GDD, λ0, λmin, λmax; kwargs...)
prop_mirror!(Eω, grid, reflections, λR, R, λGDD, GDD, λ0, λmin, λmax; kwargs...)

Propagate the field linearly by adding a number of reflections from a mirror whose tabulated reflectivity and group-delay dispersion per reflection is given by:

  • λR: wavelength samples for reflectivity in SI units (m)
  • R: mirror reflectivity (between 0 and 1)
  • λGDD: wavelength samples for GDD in SI units (m)
  • GDD: GDD in SI units (s²)
  • λ0: central wavelength (used to remove any overall group delay)
  • λmin, λmax: bounds of the wavelength region to apply the transfer function over

Additional keyword arguments are passed to PhysData.process_mirror_data:

  • fitorder: order of polynomial fit to use in removing overall group delay (default: 5)
  • windowwidth: wavelength width of the smoothing region outside (λmin, λmax) for the window in SI units (default: 20e-9, i.e. 20 nm)
source
Luna.Fields.prop_mirror!Method
prop_mirror!(Eω, ω, reflections, mirror)
prop_mirror!(Eω, grid, reflections, mirror)

Propagate the field linearly by adding a number of reflections from the mirror type.

source
Luna.Fields.prop_mirrorMethod
prop_mirror(Eω, ω, args...; kwargs...)
prop_mirror(Eω, grid, args...; kwargs...)

Return a copy of the field after reflection off of mirrors. For other arguments see prop_mirror!

source
Luna.Fields.prop_mode!Function
prop_mode!(Eω, ω, mode, distance, λ0=nothing)

Propagate the field linearly by a certain distance in the given mode. If the central wavelength λ0 is given, remove the group delay at this wavelength. Propagation includes both dispersion and loss.

source
Luna.Fields.prop_taylor!Method
prop_taylor!(Eω, grid, ϕs, λ0)
prop_taylor!(Eω, grid::Grid.AbstractGrid, ϕs, λ0)

Add spectral phase, given as Taylor-expansion coefficients ϕs around central wavelength λ0, to the frequency-domain field . Sampling axis of can be given either as an AbstractGrid or the frequency axis ω.

source
Luna.Fields.prop_taylorMethod
prop_taylor(Eω, grid, ϕs, λ0)
prop_taylor(Eω, grid::Grid.AbstractGrid, ϕs, λ0)

Return a copy of the frequency-domain field with added spectral phase, given as Taylor-expansion coefficients ϕs around central wavelength λ0. Sampling axis of can be given either as an AbstractGrid or the frequency axis ω.

source
Luna.Fields.propagator_materialMethod
propagator_material(material; P=1, T=PhysData.roomtemp, lookup=nothing)

Create a function prop!(Eω, ω, thickness, λ0) which propagates the field through a certain thickness of a material. If the central wavelength λ0 is given, remove the group delay at this wavelength. Keyword arguments P (pressure), T (temperature) and lookup (whether to use lookup table instead of Sellmeier expansion).

source