Stats.jl

Luna.Stats.collect_statsMethod
collect_stats(grid, Eω, funcs...)

Create a closure which collects statistics from the individual functions in funcs.

Each function given will be called with the arguments (d, Eω, Et, z, dz), where

  • d -> dictionary to store statistics values. each func should mutate this
  • Eω -> frequency-domain field
  • Et -> analytic time-domain field
  • z -> current propagation distance
  • dz -> current stepsize
source
Luna.Stats.copyto_fft!Method
copyto_fft!(Eωa, Eω, idxhi)

Copy the rFFT-sampled field to the FFT-sampled buffer Eωa, ready for inverse FFT

source
Luna.Stats.core_radiusMethod
core_radius(a)

Create stats function to capture core radius as defined by a (either a Number or a callable a(z))

source
Luna.Stats.electrondensityMethod
electrondensity(grid, ionrate, dfun, aeff; oversampling=1)

Create stats function to calculate the maximum electron density in mode average.

If oversampling > 1, the field is oversampled before the calculation

Warning

Oversampling can lead to a significant performance hit

source
Luna.Stats.electrondensityMethod
electrondensity(grid, ionrate, dfun, modes; oversampling=1)

Create stats function to calculate the maximum electron density for multimode simulations.

If oversampling > 1, the field is oversampled before the calculation

Warning

Oversampling can lead to a significant performance hit

source
Luna.Stats.energy_windowMethod
energy_window(grid, energyfun_ω, window; label)

Create stats function to calculate the energy filtered by a window. The stats dataset will be named energy_[label].

source
Luna.Stats.energy_λMethod
energy_λ(grid, energyfun_ω, λlims; label)

Create stats function to calculate the energy in a wavelength region given by λlims. If label is omitted, the stats dataset is named by the wavelength limits.

source
Luna.Stats.fwhm_rMethod
fwhm_r(grid, modes; components=:y)

Create stats function to calculate the radial FWHM (aka beam size) in a modal propagation.

source
Luna.Stats.fwhm_tMethod
fwhm_t(grid)

Create stats function to calculate the temporal FWHM (pulse duration) for mode average.

source
Luna.Stats.peakintensityMethod
peakintensity(grid, aeff)

Create stats function to calculate the mode-averaged peak intensity given the effective area aeff(z).

source
Luna.Stats.peakpowerMethod
peakpower(grid, Eω, λlims; label=nothing)

Create stats function to calculate the peak power within a frequency range defined by the wavelength limits λlims. If label is given, the stats dataset is labeled as peakpower_[label], otherwise label is created automatically from λlims.

source
Luna.Stats.peakpowerMethod
peakpower(grid, Eω, window; label)

Create stats function to calculate the peak power within a frequency range defined by the window function window. window must have the same length as grid.ω. The stats dataset is labeled as peakpower_[label].

source
Luna.Stats.plan_analyticMethod
plan_analytic(grid, Eω)

Plan a transform from the frequency-domain field to the analytic time-domain field.

Returns both a buffer for the analytic field and a closure to do the transform.

source
Luna.Stats.zdwMethod
zdw(mode)

Create stats function to capture the zero-dispersion wavelength (ZDW).

Warning

Since Modes.zdw is based on root-finding of a derivative, this can be slow!

source
Luna.Stats.zdwMethod
zdw(mode)

Create stats function to capture the zero-dispersion wavelength (ZDW).

Warning

Since Modes.zdw is based on root-finding of a derivative, this can be slow!

source
Luna.Stats.ω0Method
ω0(grid)

Create stats function to calculate the centre of mass (first moment) of the spectral power density.

source