Fields.jl
Luna.Fields.CWField
— TypeCWField(Pavg, Aωfunc)
Represents a continuous-wave field with spectral phase/amplitude defined by Aωfunc
.
Fields
Pavg::Float64
: the average powerAωfunc
: a callablef(ω)
to get the amplitude/phase of the field in the frequency domain
Luna.Fields.CWField
— Method(c::CWField)(grid, FT)
Get the field for the provided grid
and Fourier transform FT
Luna.Fields.DataField
— MethodDataField(ω, Iω, ϕω; energy, ϕ=Float64[], λ0=NaN)
Represents a field with spectral power density Iω
and spectral phase ϕω
, sampled on radial frequency axis ω
.
Luna.Fields.DataField
— MethodDataField(ω, Eω; energy, ϕ=Float64[], λ0=NaN)
Create a DataField
from the complex frequency-domain field Eω
sampled on radial frequency grid ω
.
Luna.Fields.DataField
— MethodDataField(fpath; energy, ϕ=Float64[], λ0=NaN)
Create a DataField
by loading ω
, Iω
, and ϕω
from the file at fpath
. The file must contain 3 columns:
- frequency in Hz
- spectral power density (arbitrary units)
- unwrapped spectral phase
Luna.Fields.DataField
— Method(d::DataField)(grid, FT)
Interpolate the DataField
onto the provided grid
(note the argument FT
is unused).
Luna.Fields.PropagatedField
— TypePropagatedField(propagator!, field)
A wrapper around a previously defined TimeField
which applies the mutating propagation function propagator!(Eω, grid)
to the field Eω
.
Luna.Fields.PulseField
— TypePulseField(λ0, energy, ϕ, τ0, Itshape)
Represents a temporal pulse with shape defined by Itshape
.
Fields
λ0::Float64
: the central field wavelengthenergy::Float64
: the pulse energypower::Float64
: the pulse peak power (after applying any spectral phases)ϕ::Vector{Float64}
: spectral phases (CEP, group delay, GDD, TOD, ...)Itshape
: a callablef(t)
to get the shape of the intensity/power in the time domain
Luna.Fields.PulseField
— Method(p::PulseField)(Eω, grid, energy_t, FT)
Add the field to Eω
for the provided grid
, energy_t
function and Fourier transform FT
Luna.Fields.ShotNoise
— Type(s::ShotNoise)(Eω, grid)
Get shotnoise for the provided grid
. The optional parameter FT
is unused and is present for interface compatibility with TimeField
.
Luna.Fields.ShotNoise
— TypeShotNoise(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
Luna.Fields.SpatioTemporalField
— TypeSpatioTemporalField(λ0, energy, ϕ, τ0, Ishape)
Represents a spatiotemporal pulse with shape defined by Ishape
.
Fields
λ0::Float64
: the central field wavelengthenergy::Float64
: the pulse energyϕ::Float64
: the CEO phaseτ0::Float64
: the temproal shift from grid time 0Ishape
: a callablef(t, xs)
to get the shape of the intensity/power in the time-space domain
Luna.Fields.SpatioTemporalField
— Method(s::SpatioTemporalField)(grid, spacegrid, FT)
Get the field for the provided grid
, spacegrid
function and Fourier transform FT
Luna.Fields.TimeField
— TypeTimeField
Abstract supertype for time-domain only fields.
Luna.Fields.CWSech
— MethodCWSech(;λ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
.
Luna.Fields.GaussField
— MethodGaussField(;λ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
.
Luna.Fields.GaussGauss
— MethodGaussian temporal-spatial field defined on x-y grid
Luna.Fields.GaussGauss
— MethodGaussian temporal-spatial field defined radially
Luna.Fields.GaussGaussField
— MethodGaussGaussField(;λ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
.
Luna.Fields.SechField
— MethodSechField(;λ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
.
Luna.Fields.coupled_field
— Methodcoupled_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.
Luna.Fields.energyfuncs
— MethodCalculate energy from modal field E(t)
Luna.Fields.gauss_beam
— Methodgauss_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
.
Luna.Fields.gauss_beam_init
— Methodgauss_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
Luna.Fields.make_Et
— Methodmake_Et(p::PulseField, grid)
Create electric field for PulseField
, either the field (for RealGrid
) or the envelope (for EnvGrid
)
Luna.Fields.optcomp_material
— Methodoptcomp_material(Eω, grid, material, λ0; kwargs...)
Maximise the peak power of the field Eω
by linear propagation through the material
. Keyword arguments kwargs
are the same as for prop_material
.
Luna.Fields.optcomp_taylor
— Methodoptcomp_taylor(Eω, grid, λ0; order=2)
Maximise the peak power of the field Eω
by adding Taylor-expanded spectral phases up to order order
.
Luna.Fields.optfield_cep
— Methodoptfield_cep(Eω, grid)
Find the value of the absolute phase which produces the maximal field strength in the time domain.
Luna.Fields.prop_material!
— Functionprop_material!(Eω, ω, material, thickness, λ0=nothing;
P=1, T=PhysData.roomtemp, lookup=nothing)
Linearly propagate the frequency-domain field Eω
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).
Luna.Fields.prop_material
— Methodprop_material(Eω, ω, material, thickness, λ0=nothing;
P=1, T=PhysData.roomtemp, lookup=nothing)
Return a copy of the frequency-domain field Eω
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).
Luna.Fields.prop_mirror!
— Methodprop_mirror!(Eω, ω, reflections, transferfunction)
prop_mirror!(Eω, grid, reflections, transferfunction)
Propagate the field Eω
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).
Luna.Fields.prop_mirror!
— Methodprop_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 Eω
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)
Luna.Fields.prop_mirror!
— Methodprop_mirror!(Eω, ω, reflections, mirror)
prop_mirror!(Eω, grid, reflections, mirror)
Propagate the field Eω
linearly by adding a number of reflections
from the mirror
type.
Luna.Fields.prop_mirror
— Methodprop_mirror(Eω, ω, args...; kwargs...)
prop_mirror(Eω, grid, args...; kwargs...)
Return a copy of the field Eω
after reflection off of mirrors. For other arguments see prop_mirror!
Luna.Fields.prop_mode!
— Functionprop_mode!(Eω, ω, mode, distance, λ0=nothing)
Propagate the field Eω
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.
Luna.Fields.prop_taylor!
— Methodprop_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 Eω
. Sampling axis of Eω
can be given either as an AbstractGrid
or the frequency axis ω
.
Luna.Fields.prop_taylor
— Methodprop_taylor(Eω, grid, ϕs, λ0)
prop_taylor(Eω, grid::Grid.AbstractGrid, ϕs, λ0)
Return a copy of the frequency-domain field Eω
with added spectral phase, given as Taylor-expansion coefficients ϕs
around central wavelength λ0
. Sampling axis of Eω
can be given either as an AbstractGrid
or the frequency axis ω
.
Luna.Fields.propagator_material
— Methodpropagator_material(material; P=1, T=PhysData.roomtemp, lookup=nothing)
Create a function prop!(Eω, ω, thickness, λ0)
which propagates the field Eω
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).