Stats.jl
Luna.Stats.collect_stats — Methodcollect_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! — Methodcopyto_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 — Methodcore_radius(a)Create stats function to capture core radius as defined by a (either a Number or a callable a(z))
Luna.Stats.density — Methoddensity(dfun)Create stats function to capture the gas density as defined by dfun(z)
Luna.Stats.electrondensity — Methodelectrondensity(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 — Methodelectrondensity(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 — Methodenergy(grid, energyfun_ω)Create stats function to calculate the total energy.
Luna.Stats.energy_window — Methodenergy_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_λ — Methodenergy_λ(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 — Methodfwhm_r(grid, modes; components=:y)Create stats function to calculate the radial FWHM (aka beam size) in a modal propagation.
Luna.Stats.fwhm_t — Methodfwhm_t(grid)Create stats function to calculate the temporal FWHM (pulse duration) for mode average.
Luna.Stats.mode_reconstruction_error — Methodmode_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 — Methodpeakintensity(grid, aeff)Create stats function to calculate the mode-averaged peak intensity given the effective area aeff(z).
Luna.Stats.peakintensity — Methodpeakintensity(grid, mode)Create stats function to calculate the peak intensity for several modes.
Luna.Stats.peakpower — Methodpeakpower(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 — Methodpeakpower(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 — Methodpeakpower(grid)Create stats function to calculate the peak power.
Luna.Stats.plan_analytic — Methodplan_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 — Methodpressure(dfun, gas)Create stats function to capture the pressure. Like density but converts to pressure.
Luna.Stats.zdw — Methodzdw(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 — Methodzdw(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.