Stats.jl
Luna.Stats.collect_stats — Method
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
funcshould mutate this - Eω -> frequency-domain field
- Et -> analytic time-domain field
- z -> current propagation distance
- dz -> current stepsize
Luna.Stats.copyto_fft! — Method
copyto_fft!(Eωa, Eω, idxhi)Copy the rFFT-sampled field Eω to the FFT-sampled buffer Eωa, ready for inverse FFT
Luna.Stats.core_radius — Method
core_radius(a)Create stats function to capture core radius as defined by a (either a Number or a callable a(z))
Luna.Stats.density — Method
density(dfun)Create stats function to capture the gas density as defined by dfun(z)
Luna.Stats.electrondensity — Method
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
Luna.Stats.electrondensity — Method
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
Luna.Stats.energy — Method
energy(grid, energyfun_ω)Create stats function to calculate the total energy.
Luna.Stats.energy_window — Method
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].
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.
Luna.Stats.fwhm_r — Method
fwhm_r(grid, modes; components=:y)Create stats function to calculate the radial FWHM (aka beam size) in a modal propagation.
Luna.Stats.fwhm_t — Method
fwhm_t(grid)Create stats function to calculate the temporal FWHM (pulse duration) for mode average.
Luna.Stats.mode_reconstruction_error — Method
mode_reconstruction_error(t::TransModal)Create a stats function to calculate and collect the mode reconstruction error in the induced polarisation on axis at every step.
Luna.Stats.peakintensity — Method
peakintensity(grid, aeff)Create stats function to calculate the mode-averaged peak intensity given the effective area aeff(z).
Luna.Stats.peakintensity — Method
peakintensity(grid, mode)Create stats function to calculate the peak intensity for several modes.
Luna.Stats.peakpower — Method
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.
Luna.Stats.peakpower — Method
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].
Luna.Stats.peakpower — Method
peakpower(grid)Create stats function to calculate the peak power.
Luna.Stats.plan_analytic — Method
plan_analytic(grid, Eω)Plan a transform from the frequency-domain field Eω to the analytic time-domain field.
Returns both a buffer for the analytic field and a closure to do the transform.
Luna.Stats.pressure — Method
pressure(dfun, gas)Create stats function to capture the pressure. Like density but converts to pressure.
Luna.Stats.zdw — Method
zdw(mode)Create stats function to capture the zero-dispersion wavelength (ZDW).
Since Modes.zdw is based on root-finding of a derivative, this can be slow!
Luna.Stats.zdw — Method
zdw(mode)Create stats function to capture the zero-dispersion wavelength (ZDW).
Since Modes.zdw is based on root-finding of a derivative, this can be slow!
Luna.Stats.ω0 — Method
ω0(grid)Create stats function to calculate the centre of mass (first moment) of the spectral power density.