Sources#

class PlaneWave(*, wavelength, polarization, amplitude)[source]#

Bases: PLANEWAVE, BaseSource

Represents a plane wave light source for optical simulations.

Parameters:
  • wavelength (units.Quantity) – Wavelength of the light field in meters.

  • polarization (BasePolarization | units.Quantity) – Polarization state of the light field, if float is given it is assumed Linear polarization of angle theta.

  • amplitude (units.Quantity) – Amplitude of the electric field.

amplitude: ElectricField#
plot(color='red', opacity=0.8, show_axis_label=False)[source]#

Plots the 3D structure of the Gaussian source.

This method creates a 3D plot of the Gaussian source, adds the structure to the plot, and optionally displays axis labels.

Parameters:
  • color (str) – The color of the structure in the plot. Default is ‘red’.

  • opacity (float) – The opacity of the structure. Default is 0.8.

  • show_axis_label (bool) – If True, axis labels will be shown. Default is False.

Return type:

None

polarization: Angle | BasePolarization#
wavelength: Length#
class Gaussian(*, wavelength, polarization, optical_power, NA, amplitude=None)[source]#

Bases: GAUSSIAN, BaseSource

Represents a Gaussian light source for optical simulations.

wavelength: Length

Wavelength of the light field in meters.

polarizationAngle | BasePolarization

Polarization state of the light field, if float is given it is assumed Linear polarization of angle theta.

optical_power: Power

Optical power of the source in Watts.

NA: Dimensionless

Numerical aperture of the source.

Parameters:
  • wavelength (Length)

  • polarization (Angle | BasePolarization)

  • optical_power (Power)

  • NA (Dimensionless)

  • amplitude (ElectricField)

NA: Dimensionless#
amplitude: ElectricField = None#
numerical_aperture_to_angle(numerical_aperture)[source]#

Convert numerical aperture (NA) to angle in radians.

Parameters:
  • NA (float) – The numerical aperture.

  • numerical_aperture (float)

Returns:

The angle in radians.

Return type:

float

optical_power: Power#
plot(color='red', opacity=0.8, show_axis_label=False)[source]#

Plots the 3D structure of the Gaussian source.

This method creates a 3D plot of the Gaussian source, adds the structure to the plot, and optionally displays axis labels.

Parameters:
  • color (str) – The color of the structure in the plot. Default is ‘red’.

  • opacity (float) – The opacity of the structure. Default is 0.8.

  • show_axis_label (bool) – If True, axis labels will be shown. Default is False.

Return type:

None

polarization: Angle | BasePolarization#
wavelength: Length#