solprop.recipe.preview#

Previews: what a recipe will build, shown before the run (SEP 41, S18).

modes() gives the mode set a guided route builds, with its effective index, dispersion to third order, loss, effective area and nonlinear coefficient over the grid’s band, and each mode’s phase matching to a soliton at the pump in the launch mode; preview_input() gives the input pulse on the run’s grid as the launch sets it, without noise, through the same processing functions that read a run’s file, and on the free-space routes the beam’s fluence across the launch plane too. Both resolve the recipe’s pins first.

Module Attributes

GUIDED

The routes with a mode set to preview.

Functions

modes(recipe[, z])

Return the mode set a guided recipe builds, without building its run.

preview_input(recipe)

Return the input pulse on the run's grid, as the launch sets it, without noise.

Classes

InputPreview(time, power, omega, spectrum, ...)

The input pulse on the run's grid, as the launch sets it, without noise.

ModePreview(label, neff_minus_one, beta, ...)

One mode of a guided route, over the grid's band.

ModeSetPreview(z, omega, modes[, pump, ...])

The mode set a guided route builds, at one position.

solprop.recipe.preview.GUIDED = ('capillary', 'waveguide', 'planar', 'gnlse')#

The routes with a mode set to preview.

The planar route’s mode set is its grid’s slab channels in x, the modes the beam is projected onto, at k_y = 0; the GNLSE’s is its one specified mode, from its Taylor coefficients or its fibre, without a fill (so without gamma over the band).

class solprop.recipe.preview.InputPreview(time, power, omega, spectrum, energy, peak_power, fluence=None, axes=())[source]#

Bases: object

The input pulse on the run’s grid, as the launch sets it, without noise.

On a free-space route (radial, free, planar) the power and the energy are the beam’s, the axial flux through the launch plane in the medium (spatial_power(), spatial_energy()), and the fluence is its time integral at each transverse node (spatial_fluence(), or planar_fluence() on the planar route). On a line grid the power and the energy are per metre of y, W/m and J/m.

Attributes:
timenumpy.ndarray

The time axis, s.

powernumpy.ndarray

The instantaneous power, W, summed over modes or integrated over the beam.

omeganumpy.ndarray

The angular frequency axis, rad/s.

spectrumnumpy.ndarray

The complex spectrum, per mode or per transverse column, as get_spectrum() gives it.

energyfloat

The pulse energy, J.

peak_powerfloat

The peak power, W.

fluencenumpy.ndarray or None

The beam’s fluence at the launch plane, J/m^2, on the free-space routes: shape (n_r,) on a radial grid, (n_x,) on a line, (n_y, n_x) on a Cartesian grid and (n_y, n_x) on the planar route’s (x, y) nodes; None on a guided route.

axestuple of numpy.ndarray

The fluence’s axes in m, one per dimension in its order: (r,), (x,) or (y, x); empty on a guided route.

axes: tuple[Float[ndarray, '_axis'], ...] = ()#
energy: float#
fluence: Float[ndarray, '*nodes'] | None = None#
omega: Float[ndarray, 'n_omega']#
peak_power: float#
power: Float[ndarray, 'n_t']#
spectrum: Complex[ndarray, '*modes n_omega']#
time: Float[ndarray, 'n_t']#
class solprop.recipe.preview.ModePreview(label, neff_minus_one, beta, beta1, beta2, beta3, alpha, aeff, zdw, gamma, phase_mismatch=None, rdw=())[source]#

Bases: object

One mode of a guided route, over the grid’s band.

Attributes:
labelstr

Its display label, as launch and channel name it.

neff_minus_onenumpy.ndarray

The real part of the effective index less one, formed without cancellation.

betanumpy.ndarray

Propagation constant in 1/m.

beta1numpy.ndarray

Group delay per unit length in s/m, analytic.

beta2numpy.ndarray

Group-velocity dispersion in s^2/m.

beta3numpy.ndarray

Third-order dispersion in s^3/m (solprop.modes.base.beta3()).

alphanumpy.ndarray

Power loss coefficient in 1/m.

aefffloat

Effective area in m^2; for a slab mode, an effective width in m.

zdwfloat or None

Zero-dispersion wavelength in m within the band, or None where the dispersion keeps one sign across it (or changes it more than once).

gammanumpy.ndarray or None

The nonlinear coefficient n2 omega / (c A_eff) in rad/(W m), with the fill’s n2 at the grid’s reference wavelength, the carrier its Kerr data are taken at (solprop.tools.nonlinear_coefficient() at each frequency); None where the mode has no fill or the fill no Kerr data.

phase_mismatchnumpy.ndarray or None

The phase mismatch in rad/m between a dispersive wave in this mode and a soliton in the launch mode (the set’s first) at the pump (solprop.tools.phase_mismatch()); None without a pump. See modes() for the pump and the nonlinear term.

rdwtuple of float

The phase-matched wavelengths in m, shortest first, between the band’s short edge and 0.9 of the pump (solprop.tools.lambda_rdw_all()); empty without a pump or a root.

aeff: float#
alpha: Float[ndarray, 'n_omega']#
beta: Float[ndarray, 'n_omega']#
beta1: Float[ndarray, 'n_omega']#
beta2: Float[ndarray, 'n_omega']#
beta3: Float[ndarray, 'n_omega']#
gamma: Float[ndarray, 'n_omega'] | None#
label: str#
neff_minus_one: Float[ndarray, 'n_omega']#
phase_mismatch: Float[ndarray, 'n_omega'] | None = None#
rdw: tuple[float, ...] = ()#
zdw: float | None#
class solprop.recipe.preview.ModeSetPreview(z, omega, modes, pump=None, nonlinear=False)[source]#

Bases: object

The mode set a guided route builds, at one position.

Attributes:
zfloat

The position, m.

omeganumpy.ndarray

The in-band angular frequencies, rad/s, ascending.

modestuple of ModePreview

The modes, in the order the run holds them.

pumpfloat or None

The pump wavelength the phase matching is for, m: the recipe’s wavelength; None when it gives none (a recipe of pulses).

nonlinearbool

Whether the phase matching has the soliton’s nonlinear term: the recipe’s pulse is an unchirped sech or Gaussian, the launch mode’s fill has Kerr data and the pump is in anomalous dispersion; otherwise it is the linear condition.

modes: tuple[ModePreview, ...]#
nonlinear: bool = False#
omega: Float[ndarray, 'n_omega']#
pump: float | None = None#
z: float#
solprop.recipe.preview.modes(recipe, z=None)[source]#

Return the mode set a guided recipe builds, without building its run.

Its cost is the mode solve: on a guide route, the dense tables.

Parameters:
recipeRecipe

A recipe on a guided route.

zfloat or None, optional

The position, m; None for the launch position.

Returns:
ModeSetPreview

The modes over the grid’s band.

Raises:
RecipeError

If the route is not one of GUIDED.

Notes

The phase matching is that of a soliton at the recipe’s pump wavelength travelling in the launch mode, the set’s first, and a dispersive wave in each mode (the launch mode’s own for the first; intermodal for the rest). With an unchirped sech or Gaussian pulse given by its FWHM and its energy or peak power, and a fill with Kerr data, the soliton’s nonlinear wavenumber is that of its largest constituent (solprop.tools.phase_mismatch()’s default); otherwise, and for a pump in normal dispersion, which launches no soliton, the condition is the linear one.

solprop.recipe.preview.preview_input(recipe)[source]#

Return the input pulse on the run’s grid, as the launch sets it, without noise.

The recipe is built without its noise (its seed with it) and translated, which stops before a backend is built; the launched field is read through the processing functions that read a run’s file. On the free-space routes the beam’s power, energy and fluence are measured in the medium at the launch plane, as the tutorials measure a run’s saved plane.

Parameters:
recipeRecipe

The recipe.

Returns:
InputPreview

The pulse in time and frequency, its energy and its peak power, and on a free-space route its fluence.