Pulse#

class pynlo.light.Pulse(n, v_ref, dv, v0=None, a_v=None, alias=1)[source]#

Bases: TFGrid

An optical pulse.

A set of complementary time and frequency grids are generated to represent the pulse in both the time and frequency domains.

Parameters:
nint

The number of grid points.

v_reffloat

The target central frequency of the grid.

dvfloat

The frequency step size. This is equal to the reciprocal of the time window.

v0float, optional

The comoving-frame reference frequency. The default value is the center frequency of the resulting grid.

a_varray_like of complex, optional

The root-power spectrum. The default value is an empty spectrum.

aliasfloat, optional

The number of harmonics supported by the real-valued time domain grid without aliasing. The default is 1, which only generates enough points for one alias-free Nyquist zone. A higher number may be useful when simulating nonlinear interactions.

See also

pynlo.utility.TFGrid

Documentation of the methods and attributes related to this class’s time and frequency grids.

Notes

The power spectrum and temporal envelope are normalized to the pulse energy e_p:

e_p == np.sum(p_v*dv) == np.sum(p_t*dt) == np.sum(rp_t*rdt)

The amplitude of the analytic root-power spectrum is a factor of 2**0.5 larger than the double-sided root-power spectrum of the real-valued time domain. When transforming between the two representations use the following normalization:

a_v = 2**0.5 * ra_v[rn_slice]
ra_v[rn_slice] = 2**-0.5 * a_v

The comoving-frame reference frequency v0 is only used to adjust the group delay of the time window during pulse propagation simulations, it does not otherwise affect the properties of the pulse.

Methods#

FromPowerSpectrum(p_v, n, v_min, v_max[, ...])

Initialize a pulse using existing spectral data.

Gaussian(n, v_min, v_max, v0, e_p, t_fwhm[, m])

Initialize a Gaussian or super-Gaussian pulse.

Sech(n, v_min, v_max, v0, e_p, t_fwhm, **kwargs)

Initialize a squared hyperbolic secant pulse.

Parabolic(n, v_min, v_max, v0, e_p, t_fwhm, ...)

Initialize a parabolic pulse.

Lorentzian(n, v_min, v_max, v0, e_p, t_fwhm, ...)

Initialize a squared Lorentzian pulse.

CW(n, v_min, v_max, v0, p_avg, **kwargs)

Initialize a continuous wave.

v_width([m])

Calculate the width of the pulse in the frequency domain.

t_width([m])

Calculate the width of the pulse in the time domain.

autocorrelation([m])

Calculate the intensity autocorrelation and related diagnostic information.

spectrogram([t_fwhm, v_range, n_t, t_range])

Calculate the spectrogram of the pulse through convolution with a Gaussian window.

copy()

Copy the pulse.

Attributes#

a_v

The root-power spectrum, with units of (J/Hz)**0.5.

p_v

The power spectrum, with units of J/Hz.

phi_v

The spectral phase, in rad.

tg_v

The spectral group delay, with units of s.

a_t

The root-power complex envelope, with units of (J/s)**0.5.

p_t

The power envelope, with units of J/s.

phi_t

The phase of the complex envelope, in rad.

vg_t

The instantaneous frequency of the complex envelope, with units of Hz.

ra_t

The real-valued instantaneous root-power amplitude, with units of (J/s)**0.5.

rp_t

The instantaneous power, with units of J/s.

e_p

The pulse energy, with units of J.

v0

The comoving-frame reference frequency, with units of Hz.

v0_idx

The array index of the comoving frame’s reference frequency.