Profile defined from external Numpy array#

class lasy.profiles.FromArrayProfile(wavelength, pol, array, dim, axes, axes_order=['x', 'y', 't'])[source]#

Profile defined from numpy array directly.

The numpy array contains the envelope of the electric field of the laser pulse, defined as \(\mathcal{E}\) in:

\[\begin{split}\begin{aligned} E_x(x,y,t) = \operatorname{Re} \left( \mathcal{E}(x,y,t) e^{-i \omega_0t}p_x \right)\\ E_y(x,y,t) = \operatorname{Re} \left( \mathcal{E}(x,y,t) e^{-i \omega_0t}p_y \right)\end{aligned}\end{split}\]

where \(\operatorname{Re}\) stands for real part, \(E_x\) (resp. \(E_y\)) is the laser electric field in the \(x\) (resp. \(y\)) direction.

Parameters:
wavelengthfloat (in meter)

The main laser wavelength \(\lambda_0\) of the laser, which defines \(\omega_0\) in the above formula, according to \(\omega_0 = 2\pi c/\lambda_0\).

pollist of 2 complex numbers (dimensionless)

Polarization vector. It corresponds to \(p_u\) in the above formula ; \(p_x\) is the first element of the list and \(p_y\) is the second element of the list. Using complex numbers enables elliptical polarizations.

array3darray of complex numbers

Contains the values of the envelope, defined as \(\mathcal{E}\) in the above formula.

dimstring

“xyt” or “rt”

axesPython dictionary containing the axes vectors.

Keys are ‘x’, ‘y’, ‘t’. Values are the 1D arrays of each axis. array.shape = (axes[‘x’].size, axes[‘y’].size, axes[‘t’].size) in 3D, and similar in cylindrical geometry.

axes_orderList of strings

Gives the name and ordering of the axes in the array. Currently, only implemented for 3D, and supported values are [‘x’, ‘y’, ‘t’] and [‘t’, ‘y’, ‘x’].

evaluate(x, y, t)[source]#

Return the envelope field of the scaled profile.

evaluate_mrt(mode, r, t)[source]#

Return the envelope field of the scaled profile.