Note
Go to the end to download the full example code
LP01 Mode Detector#
This example demonstrates the initialization and visualization of an LP01 Mode detector using PyMieSim.
Importing the package: PyMieSim
from PyMieSim.single.detector import CoherentMode
Initializing the detector
detector = CoherentMode(
mode_number="LP01", # Specifying LP01 mode
sampling=500, # Number of sampling points
NA=0.5, # Numerical Aperture
gamma_offset=0, # Gamma offset
phi_offset=40, # Phi offset in degrees
)
WARNING:root:High values of NA: 0.5 do not comply with the paraxial approximation. Value under 0.3 are prefered.
Plotting the detector
figure = detector.plot()
Customizing the plot appearance
figure.background_color = 'black' # Setting the background color to black
figure.unit_size = (1200, 1200) # Adjusting the size of the plot
Displaying the plot
_ = figure.show()
Total running time of the script: (0 minutes 1.795 seconds)