Model.simulate#

Model.simulate(z_grid, dz=None, local_error=1e-06, n_records=None, plot=None)[source]#

Simulate propagation of the input pulse through the optical mode.

Parameters:
z_gridfloat or array_like of floats

The total propagation distance over which to simulate, or the z positions at which to solve for the pulse spectrum. An adaptive step-size algorithm is used to propagate between these points. If only the end point is given the starting point is assumed to be the origin.

dzfloat, optional

The initial step size. If None, one will be estimated.

local_errorfloat, optional

The target relative local error for the adaptive step size algorithm. The default is 1e-6.

n_recordsNone or int, optional

The number of simulation points to return. If set, the z positions will be linearly spaced between the first and last points of z_grid. If None, the default is to return all points as defined in z_grid. The record always includes the starting and ending points.

plotNone or string, optional

A flag that activates real-time visualization of the simulation. The options are "time", "frq", or "wvl", corresponding to the time, frequency, and wavelength domains. If set, the plot is updated each time the simulation reaches one of the z positions returned at the output. If None, the simulation is run without real-time plotting.

Returns:
pulsePulse

The output pulse. This object can be used as the input to another simulation.

zndarray of float

The z positions at which the pulse spectrum (a_v) and complex envelope (a_t) have been returned.

a_tndarray of complex

The root-power complex envelope of the pulse at each z position.

a_vndarray of complex

The root-power spectrum of the pulse at each z position.