laserbeamsize.m2_display Module
A module for finding M² values for a laser beam.
Full documentation is available at <https://laserbeamsize.readthedocs.io>
Finding the beam waist size, location, and M² for a beam is straightforward:
>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> import laserbeamsize as lbs
>>>
>>> lambda0 = 632.8e-9 # meters
>>> z = np.array([168, 210, 280, 348, 414, 480, 495, 510, 520, 580, 666, 770]) * 1e-3
>>> r = np.array([597, 572, 547, 554, 479, 403, 415, 400, 377, 391, 326, 397]) * 1e-6
>>>
>>> # create a graphic of the fit
>>> lbs.M2_diameter_plot(z, 2 * r, lambda0)
>>> plt.show()
>>>
>>> # create a better graphic of the fit
>>> lbs.M2_radius_plot(z, 2 * r, lambda0)
>>> plt.show()
Functions
|
Plot the semi-major and semi-minor beam fits and residuals. |
|
Plot radii, beam fits, and asymptotes. |
|
Plot a beam from its waist through a lens to its focus. |