Sources#
- class PlaneWave(wavelength, amplitude, polarization)[source]#
Bases:
BaseSource
Represents a plane wave light source for light scattering simulations.
Inherits from LightSource and specifies amplitude directly.
- Parameters:
wavelength (Quantity) – Wavelength of the light field in meters.
polarization (BasePolarization | Quantity) – Polarization state of the light field, if float is given it is assumed Linear polarization of angle theta.
amplitude (Quantity) – Amplitude of the electric field.
- amplitude: Quantity#
- 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: BasePolarization | Quantity#
- wavelength: Quantity#
- class Gaussian(wavelength, polarization, optical_power, NA)[source]#
Bases:
BaseSource
Represents a Gaussian light source for light scattering simulations, characterized by its optical power and numerical aperture.
- Parameters:
wavelength (Quantity) – Wavelength of the light field in meters.
polarization (BasePolarization | Quantity) – Polarization state of the light field, if float is given it is assumed Linear polarization of angle theta.
optical_power (Quantity) – Optical power of the source in Watts.
NA (Quantity) – Numerical aperture of the source.
- NA: Quantity#
- amplitude: Quantity#
- optical_power: Quantity#
- 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: BasePolarization | Quantity#
- wavelength: Quantity#