Transverse Laser Profiles#

class lasy.profiles.transverse.TransverseProfile[source]#

Base class for all transverse profiles.

Any new transverse 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. This feature is tailored for linear combination of profiles of the same type, in particular analytical profiles like Laguerre-gauss or Hermite-Gauss.

evaluate(x, y)[source]#

Return the transverse envelope modified by any spatial offsets.

Parameters:
x, y: ndarrays of floats

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

Returns:
envelope: ndarray of complex numbers

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

set_offset(x_offset, y_offset)[source]#

Populate the x and y spatial offsets of the profile.

The profile will be shifted by these according to x+x_offset and y+y_offset prior to execution of _evaluate.

Parameters:
x_offset, y_offset: floats (m)

Define spatial offsets to the beam. That is, how much to shift the beam by transversely