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#

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

Initialize a continuous wave.

FromFreqRange(n, v_min, v_max, **kwargs)

Initialize a set of time and frequency grids given the total number of grid points and a target minimum and maximum frequency.

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.

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

Initialize a squared Lorentzian pulse.

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

Initialize a parabolic pulse.

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

Initialize a squared hyperbolic secant pulse.

__init__(n, v_ref, dv[, v0, a_v, alias])

autocorrelation([m])

Calculate the intensity autocorrelation and related diagnostic information.

copy()

Copy the pulse.

rtf_grids([alias, fast_n, update])

Complementary time and frequency domain grids for the representation of analytic functions with real-valued amplitudes.

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

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

t_width([m])

Calculate the width of the pulse in the time domain.

v_width([m])

Calculate the width of the pulse in the frequency domain.

Attributes#

a_t

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

a_v

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

dt

The time grid step size of the analytic representation, with units of s.

dv

The frequency grid step size of the analytic representation, with units of Hz.

e_p

The pulse energy, with units of J.

n

The number of grid points of the analytic representation.

p_t

The power envelope, with units of J/s.

p_v

The power spectrum, with units of J/Hz.

phi_t

The phase of the complex envelope, in rad.

phi_v

The spectral phase, in rad.

ra_t

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

rdt

The time grid step size of the real-valued time domain representation, with units of s.

rdv

The frequency grid step size of the real-valued time domain representation, with units of Hz.

rn

The number of grid points of the real-valued time domain representation.

rn_range

The minimum and maximum indices of the origin-contiguous frequency grid, associated with the real-valued time domain representation, that correspond to the first and last points of the analytic frequency grid.

rn_slice

A slice object that indexes the origin-contiguous frequency grid, associated with the real-valued time domain representation, onto the analytic frequency grid.

rp_t

The instantaneous power, with units of J/s.

rt_grid

The time grid of the real-valued time domain representation, with units of s.

rt_ref

The grid reference time of the real-valued time domain representation, with units of s.

rt_window

The span of the time grid in the real-valued time domain representation, with units of s.

rv_grid

The origin-contiguous frequency grid of the real-valued time domain representation, with units of Hz.

rv_ref

The grid reference frequency of the real-valued time domain representation, with units of Hz.

rv_window

The span of the frequency grid in the real-valued time domain representation, with units of Hz.

t_grid

The time grid of the analytic representation, with units of s.

t_ref

The grid reference time of the analytic representation, with units of s.

t_window

The span of the time grid in the analytic representation, with units of s.

tg_v

The spectral group delay, with units of s.

v0

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

v0_idx

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

v_grid

The frequency grid of the analytic representation, with units of Hz.

v_ref

The grid reference frequency of the analytic representation, with units of Hz.

v_window

The span of the frequency grid in the analytic representation, with units of Hz.

vg_t

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