Laser Profiles#

class lasy.profiles.Profile(wavelength, pol)[source]#

Base class for all laser profiles.

Any new laser profile should inherit from this class, and define its own evaluate method, using the same signature as the method below. For most cases, use derived classes instead of this base class.

Common operators (addition and multiplication by a scalar) are provided as part of this base class. For such operations, the user is responsible for handling the complex phase and weights of summed profiles. In particular, summing between different types of profiles is not recommended.

Parameters:
wavelengthscalar

Central wavelength for which the laser pulse envelope is defined.

pollist of 2 complex numbers

Polarization vector that multiplies array_in to get the Ex and Ey fields. The envelope of each component of the electric field is given by: - Ex_env = array_in*pol(0) - Ey_env = array_in*pol(1) Standard polarizations can be obtained from: - Linear polarization in x: pol = (1,0) - Linear polarization in y: pol = (0,1) - Circular polarization: pol = (1,j)/sqrt(2) (j is the imaginary number) The polarization vector is normalized to have a unitary magnitude.

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

Return the envelope field of the laser.

Parameters:
x, y, tndarrays of floats

Define points on which to evaluate the envelope These arrays need to all have the same shape.

Returns:
envelopendarray of complex numbers

Contains the value of the envelope at the specified points This array has the same shape as the arrays x, y, t