Breadcrumbs

 

 

Download ModelDownload SourceembedLaunch Website ES WebEJS

About

Intro Page

Laser Beam Profile

Developed by E. Behringer

This set of exercises guides the student to model the results of an experiment to determine the profile of a laser beam using a knife-edge technique. It requires the development of the model of the knife-edge profile, and fitting of the model profile to experimental data. Here, the computational tasks are handled by built-in functions of the computational tool being used to complete these exercises.

Subject Area Waves & Optics
Level Beyond the First Year
Available Implementation Python
Learning Objectives

Students who complete this set of exercises will be able to

  • express an equation predicting the profile of a laser oscillating in the TEM00 mode in terms of dimensionless (“scaled”) variables suitable for coding (Exercise 1);
  • produce both line plots and contour plots of the (scaled) irradiance of the beam versus (scaled) position(s) (Exercises 1 and 2);
  • develop a model of, and plot, the knife-edge profile of the laser beam (Exercise 3); and
  • fit the model, i.e., of the irradiance versus knife-edge position, to experimental data (Exercise 4)
Time to Complete 120 min
Exericse 4

EXERCISE 4: FIT EXPERIMENTAL DATA TO THE MODEL KNIFE-EDGE PROFILE

Imagine that you have gone to the lab, set up the experiment to determine the beam profile, and obtained the data shown in the table below. Uncertainties in xstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> are Δstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">xstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">=style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">±style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">0.0001style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> in., and the uncertainties in Pstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">(style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">xstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">)style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">/style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">Pstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">0style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">are ±style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">0.001style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">.

xstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> [in.] Pstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">(style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">xstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">)style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">/style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">Pstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">0style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> xstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> [in.] Pstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">(style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">xstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">)style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">/style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">Pstyle="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">0style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">
-0.0366 1.000 0.0014 0.420
-0.0346 1.000 0.0034 0.315
-0.0326 1.000 0.0054 0.229
-0.0306 0.999 0.0074 0.156
-0.0286 0.999 0.0094 0.105
-0.0266 0.998 0.0114 0.066
-0.0246 0.998 0.0134 0.040
-0.0226 0.998 0.0154 0.025
-0.0206 0.995 0.0174 0.016
-0.0186 0.992 0.0194 0.012
-0.0166 0.983 0.0214 0.010
-0.0146 0.968 0.0234 0.008
-0.0126 0.947 0.0254 0.007
-0.0106 0.915 0.0274 0.007
-0.0086 0.870 0.0294 0.007
-0.0066 0.814 0.0314 0.006
-0.0046 0.738 0.0334 0.006
-0.0026 0.638 0.0354 0.005
-0.0006 0.532

On the same graph, plot: the experimental data with error bars: the “guess” function  with mm; and the fit function.

Beam_Profile_Exercise_4.py

#

# Beam_Profile_Exercise_4.py

#

# This file will generate a plot of

# beam profile data, guess function, and fit function

# for the TEM00 laser mode

#

# The fit is generated using the curve_fit function of Python

#

# Written by:

#

# Ernest R. Behringer

# Department of Physics and Astronomy

# Eastern Michigan University

# Ypsilanti, MI 48197

# (734) 487-8799

# This email address is being protected from spambots. You need JavaScript enabled to view it.

#

# Selected and normalized power data from graduate student:

#

# Najwa Sulaiman

# Department of Physics and Astronomy

# Eastern Michigan University

# Ypsilanti, MI 48197

# This email address is being protected from spambots. You need JavaScript enabled to view it.

#

# 20160627 by ERB

#

# import the commands needed to make the plot and fit the data

from __future__ import print_function

from pylab import xlim,xlabel,ylim,ylabel,grid,show,plot,legend,title

from numpy import linspace,ones,sqrt

from scipy.special import erf

from scipy.optimize import curve_fit

from matplotlib.pyplot import errorbar

# Inputs

npts_guess = 200 # number of intervals in the guess function

#

# Initialize the fit parameter(s)

w0 = 0.020 # The initial guess for w0 [in.]

print('The initial guess for w0 is ',w0,' in.')

# The knife-edge position data (corrected from raw data) [in.]

Xcorr_points = -linspace(0.0366, -0.0354, 37)

# The power data (corrected and normalized from raw data)

Powercorr_points = [1.000, 1.000, 1.000, 0.999, 0.999, 0.998, 0.998, 0.998, 0.995, 0.992, 0.983, 0.968, 0.947, 0.915, 0.870, 0.814, 0.738, 0.638, 0.532, 0.420, 0.315, 0.229, 0.156, 0.105, 0.066, 0.040, 0.025, 0.016, 0.012, 0.010, 0.008, 0.007, 0.007, 0.007, 0.006, 0.006, 0.005]

# Error bar data here

Xcorr_points_err = 0.0001*ones(len(Xcorr_points)) # position error [in.]

Powercorr_points_err = 0.01*ones(len(Powercorr_points)) # scaled power error

# Define the fit function: 0.5*(1.0 - erf(sqrt(2.0)*x/w0))

def func(x, w0):

return 0.5*(1.0 - erf(sqrt(2.0)*x/w0))

# Generate the guess function

# First, the knife-edge position values

Xcorr_inch_guess = linspace(min(Xcorr_points),max(Xcorr_points),npts_guess)

# Second, the scaled power guess

Powercorr_guess = func(Xcorr_inch_guess, w0)

# Use the curve_fit function to fit the model to the experimental data

# Note that the output consists of two parts:

# The first part is an array of the values of the fit parameters

# as determined by a least-squares fitting algorithm;

# the second part is the covariance array (a square, symmetric matrix)

# that has the uncertainties in the parameters on the diagonal of the array.

curve_fit_output = curve_fit(func, Xcorr_points, Powercorr_points, w0)

print(curve_fit_output)

w0_fit = curve_fit_output[0]

# Generate the array needed to make a smooth plot of the fit function

Powercorr_fit = func(Xcorr_inch_guess,w0_fit)

# Define the limits of the horizontal axis

xlim(min(Xcorr_points),max(Xcorr_points))

# Label the horizontal axis, with units

xlabel("Knife-edge position \(x\) [inch]", size = 16)

# Define the limits of the vertical axis

ylim(min(Powercorr_points),max(Powercorr_points))

# Label the vertical axis, with units

ylabel("Scaled transmitted power \(P(x)/P_0\)", size = 16)

# Make a grid on the plot

grid(True)

# Plot the data as symbols with error bars: magenta (m) circles (o).

errorbar(Xcorr_points,Powercorr_points,xerr=Xcorr_points_err,yerr=Powercorr_points_err,fmt="mo",label="Data")

# Plot the guess as a line: black (k) dashed (--)

plot(Xcorr_inch_guess,Powercorr_guess,"k--",label="Guess")

# Plot the fit as a line: blue (b)

plot(Xcorr_inch_guess,Powercorr_fit,"b",label="Fit")

# Make the legend

legend(loc=1)

# Make title

title('Guess value of \(w_0 = \)%.2e mm, fit value of \(w_0 = \)%.2e mm'%(w0,w0_fit))

show()

 

Translations

Code Language Translator Run

Credits

Fremont Teng; Loo Kang Wee

beam using the knife-edge technique. Exercise 4 specifically guides students in fitting a theoretical model of the laser beam profile to experimental data obtained in a lab setting. The exercise leverages computational tools, in this case Python, to perform the data fitting using built-in functions. The primary goal is for students to understand how to apply a model to experimental data and extract meaningful parameters, specifically the beam waist (\(w_0\)), through curve fitting.

Main Themes and Important Ideas/Facts:

  1. Objective of Exercise 4: The core objective is to fit a model of the laser beam's knife-edge profile to provided experimental data. This builds upon previous exercises where students would have:
  • Expressed the equation for a TEM00 laser mode beam profile in scaled variables.
  • Generated plots of the beam's irradiance.
  • Developed a model for the knife-edge profile. The introduction states, "This set of exercises guides the student to model the results of an experiment to determine the profile of a laser beam using a knife-edge technique. It requires the development of the model of the knife-edge profile, and fitting of the model profile to experimental data." Exercise 4 is the culmination of this process, focusing on the "fitting of the model, i.e., of the irradiance versus knife-edge position, to experimental data."
  1. The Knife-Edge Technique: The exercise implicitly assumes familiarity with the knife-edge technique for measuring a laser beam profile. This method involves scanning a sharp edge across the laser beam and measuring the transmitted power as a function of the knife-edge position. The derivative of this transmitted power profile is related to the intensity profile of the beam.
  2. The TEM00 Laser Mode: The exercise specifies that the laser is oscillating in the TEM00 mode, which has a Gaussian intensity profile. The fitting function used in the provided Python script is based on the error function (erf), which arises from integrating the Gaussian profile as the knife-edge blocks part of the beam. The exercise mentions that students should be able to "express an equation predicting the profile of a laser oscillating in the TEM00 mode... ( Exercise 1 )."
  3. Experimental Data: Exercise 4 provides a table of simulated experimental data consisting of "x [in.]" (knife-edge position in inches) and "P(x) / P0" (the scaled transmitted power, where P(x) is the power transmitted when the knife-edge is at position x, and P0 is the total power of the beam). The data includes uncertainties in both the position (\(\Delta x = \pm 0.0001\) in.) and the scaled power (\(\pm 0.001\)). This highlights the importance of considering experimental errors.
  4. Model Function: The Python script explicitly defines the model function to be fitted to the data:
  5. def func(x, w0):
  6. return 0.5*(1.0 - erf(sqrt(2.0)*x/w0))
  7. This function represents the theoretical scaled transmitted power as a function of the knife-edge position (\(x\)) and the beam waist (\(w_0\)), which is the parameter to be determined by the fit.
  8. Computational Fitting using Python: The exercise utilizes the curve_fit function from the scipy.optimize module in Python to perform the non-linear least-squares fitting of the model function to the experimental data. The script initializes a "guess" value for the beam waist (\(w_0 = 0.020\) in.) which is used as a starting point for the fitting algorithm. The output of curve_fit provides the optimized value of \(w_0\) and the covariance matrix, which contains information about the uncertainties in the fitted parameter. The script prints the initial guess for \(w_0\): "The initial guess for w0 is 0.02 in." and the output of the curve fitting process.
  9. Visualization: The Python script generates a plot that includes:
  • The experimental data points with error bars.
  • A plot of the "guess" function using the initial estimate of \(w_0\).
  • A plot of the "fit" function using the optimized value of \(w_0\). The labels and title of the plot are programmatically generated, including the guess and fitted values of \(w_0\): title('Guess value of \(w_0 = \)%.2e mm, fit value of \(w_0 = \)%.2e mm'%(w0,w0_fit)) (note that the units in the title are in mm in the template, but the data and initial guess are in inches). The plot allows for a visual comparison between the experimental data, the initial model, and the fitted model.
  1. Learning Outcomes: Upon completing this set of exercises, students should be able to:
  • "express an equation predicting the profile of a laser oscillating in the TEM00 mode in terms of dimensionless (“scaled”) variables suitable for coding ( Exercise 1 );"
  • "produce both line plots and contour plots of the (scaled) irradiance of the beam versus (scaled) position(s) ( Exercises 1 and 2 );"
  • "develop a model of, and plot, the knife-edge profile of the laser beam ( Exercise 3 ); and"
  • "fit the model, i.e., of the irradiance versus knife-edge position, to experimental data ( Exercise 4 )"
  1. Context within a Larger Curriculum: This exercise is part of a broader set focusing on "Waves & Optics" at a level "Beyond the First Year." It utilizes Python as the computational tool, indicating an expectation of some programming proficiency. The inclusion of links to other resources and simulations on the website suggests a rich learning environment around these topics.

Quotes from the Sources:

  • "This set of exercises guides the student to model the results of an experiment to determine the profile of a laser beam using a knife-edge technique."
  • "It requires the development of the model of the knife-edge profile, and fitting of the model profile to experimental data."
  • "Students who complete this set of exercises will be able to fit the model, i.e., of the irradiance versus knife-edge position, to experimental data ( Exercise 4 )"
  • "Imagine that you have gone to the lab, set up the experiment to determine the beam profile, and obtained the data shown in the table below."
  • The Python script comments: "# This file will generate a plot of beam profile data, guess function, and fit function for the TEM00 laser mode" and "# The fit is generated using the curve_fit function of Python".
  • The script also prints: "The initial guess for w0 is 0.02 in."

Conclusion:

Exercise 4 of the PICUP laser beam profile activity provides a practical, computationally-driven experience for students to apply theoretical knowledge of laser beam profiles to real (or simulated) experimental data. By using the knife-edge technique model and fitting it to the data using Python, students can determine the beam waist and gain a deeper understanding of data analysis and model validation in physics. The exercise emphasizes the connection between theoretical models, experimental measurements, and the power of computational tools in scientific investigation.

 

 

Laser Beam Profiling Study Guide

Key Concepts

  • Laser Beam Profile: The spatial distribution of the irradiance (power per unit area) across the cross-section of a laser beam.
  • TEM00 Mode: The fundamental transverse electromagnetic mode of a laser resonator, characterized by a Gaussian intensity profile.
  • Irradiance: The power per unit area carried by an electromagnetic wave. For a TEM00 laser beam, it follows a Gaussian function of the radial distance from the beam axis.
  • Knife-Edge Technique: An experimental method to determine the beam profile by scanning a sharp edge (knife-edge) across the beam and measuring the transmitted power as a function of the knife-edge position.
  • Scaled Variables: Dimensionless variables used in equations to simplify coding and analysis by removing dependence on specific units or scales.
  • Knife-Edge Profile: The theoretical prediction of how the transmitted power changes as a knife-edge is moved across a laser beam. For a Gaussian beam, this profile is related to the error function.
  • Error Function (erf): A special function that appears in probability, statistics, and partial differential equations. In this context, it arises from integrating the Gaussian irradiance profile partially blocked by the knife-edge.
  • Curve Fitting: A statistical method used to find the curve that best represents a series of data points. In this exercise, it involves fitting the theoretical knife-edge profile model to the experimental data.
  • Guess Function: An initial estimate of the parameters of the model function used to start the curve fitting process.
  • Fit Function: The model function with the parameters adjusted to best match the experimental data through the curve fitting process.
  • Uncertainties/Error Bars: Estimates of the range within which the true values of measured quantities are likely to lie. These are important for evaluating the quality of the fit.
  • Computational Tool: Software (like Python) used to perform calculations, generate plots, and perform curve fitting.
  • Least-Squares Fitting Algorithm: A common algorithm used in curve fitting to minimize the sum of the squares of the differences between the experimental data and the values predicted by the model.
  • Covariance Array: A matrix that provides information about the uncertainties in the fitted parameters and how they are related to each other. The diagonal elements represent the variance (square of the standard deviation) of each parameter.

Quiz

  1. What is a laser beam profile and what does it describe about a laser beam?
  2. Explain the significance of the TEM00 mode for a laser beam's intensity distribution.
  3. Describe the basic principle behind the knife-edge technique for determining a laser beam profile.
  4. What mathematical function is typically associated with the irradiance profile of a TEM00 laser beam?
  5. In the context of this exercise, why are dimensionless or "scaled" variables useful?
  6. Explain what the knife-edge profile represents and how it relates to the error function for a Gaussian beam.
  7. What is the purpose of curve fitting in this exercise, and what are we trying to achieve by fitting the model to the data?
  8. Describe the roles of the "guess function" and the "fit function" in the process of analyzing the laser beam profile data.
  9. Why is it important to consider the uncertainties in the experimental data when analyzing the results of a knife-edge experiment?
  10. Briefly explain the output of the curve_fit function in Python, specifically mentioning the two main parts of the output.

Quiz Answer Key

  1. A laser beam profile is the spatial distribution of the irradiance across the laser beam's cross-section. It describes how the power per unit area varies as you move across the beam.
  2. The TEM00 mode is the fundamental mode and has a characteristic Gaussian intensity profile, meaning the intensity is highest at the center and decreases exponentially with the radial distance. This mode is often desired for its well-defined and focused beam.
  3. The knife-edge technique involves moving a sharp edge across the laser beam and measuring the power of the beam transmitted past the edge at each position. By analyzing how the transmitted power changes with the knife-edge's position, the beam profile can be inferred.
  4. The irradiance profile of a TEM00 laser beam is typically described by a Gaussian function, which is bell-shaped and mathematically defined by an exponential term involving the square of the distance from the beam's center.
  5. Scaled variables are useful because they remove the dependence on specific units (like inches or millimeters) and scales of the experiment. This simplifies the mathematical expressions, makes the code more general, and allows for easier comparison across different experimental setups.
  6. The knife-edge profile is a theoretical curve that predicts how the fraction of the total laser power transmitted past the knife-edge changes as the knife-edge moves across the beam. For a Gaussian beam, this profile is mathematically related to the integral of the Gaussian function, which involves the error function (erf).
  7. The purpose of curve fitting is to find the parameters of the theoretical knife-edge profile model (which depends on the beam width, w0) that result in the best agreement with the experimentally obtained data of transmitted power versus knife-edge position. This allows us to estimate the laser beam's width.
  8. The guess function is an initial estimate of the theoretical knife-edge profile, based on an initial guess for the beam width parameter (w0). The fit function is the theoretical profile with the beam width parameter adjusted through the curve fitting process to provide the best match to the experimental data.
  9. Uncertainties in the experimental data, represented by error bars, provide an indication of the precision of the measurements. Considering these uncertainties is crucial for evaluating how well the theoretical model fits the data and for determining the reliability of the estimated beam width.
  10. The curve_fit function in Python returns two main components. The first is an array containing the optimized values of the fit parameters (like the beam width, w0). The second is the covariance array, which provides information about the uncertainties in these fitted parameters and their correlations.

Essay Format Questions

  1. Discuss the theoretical basis for modeling a TEM00 laser beam profile and explain how the knife-edge technique allows for the experimental determination of this profile.
  2. Explain the process of fitting a theoretical model to experimental data, focusing on the roles of the guess function, the fit function, and the importance of minimizing the difference between them.
  3. Describe the significance of error bars in experimental data and how they contribute to the evaluation of the quality and reliability of a fitted model in the context of laser beam profiling.
  4. Analyze the provided Python code, outlining the key steps involved in reading and plotting the experimental data, defining the model function, and performing the curve fitting to determine the laser beam width.
  5. Discuss the learning objectives of this exercise, elaborating on how modeling and fitting experimental data to a theoretical profile enhances understanding of laser beam characteristics and experimental techniques.

Glossary of Key Terms

  • Dimensionless Variable: A quantity that does not have physical units, often created by scaling a variable with a characteristic value.
  • Gaussian Profile: A bell-shaped curve mathematically described by the function \(f(x) = A \exp(-(x-\mu)^2 / (2\sigma^2))\), where A is the amplitude, \(\mu\) is the mean, and \(\sigma\) is the standard deviation. In this context, it describes the laser beam's irradiance distribution.
  • Irradiance Profile: The distribution of irradiance (power per unit area) as a function of spatial coordinates.
  • Laser Oscillating in TEM00 Mode: A laser operating in its fundamental transverse electromagnetic mode, producing a beam with a Gaussian irradiance profile.
  • Model of the Knife-Edge Profile: A mathematical function that predicts the fraction of the laser beam power transmitted past a knife-edge as a function of the knife-edge's position, based on the assumed irradiance profile of the beam.
  • Scaled Irradiance: The irradiance of the laser beam normalized by its peak irradiance, resulting in a dimensionless quantity.
  • Scaled Position: The spatial position normalized by a characteristic length scale of the beam, such as the beam width, resulting in a dimensionless quantity.
  • TEM00: Transverse Electromagnetic Mode zero-zero, the fundamental Gaussian mode of a laser resonator.
  • w0: The beam waist radius, a parameter characterizing the width of the Gaussian laser beam at its narrowest point. In this exercise, it is the parameter being estimated through curve fitting.

Sample Learning Goals

[text]

For Teachers

[text]

Research

[text]

Video

[text]

 Version:

  1. https://www.compadre.org/PICUP/exercises/exercise.cfm?I=134&A=laser_beam_profile 
  2. http://weelookang.blogspot.com/2018/06/laser-beam-profile-exercise-4-fit.html 

Other Resources

[text]

end faq

{accordionfaq faqid=accordion4 faqclass="lightnessfaq defaulticon headerbackground headerborder contentbackground contentborder round5"}

Frequently Asked Questions: Laser Beam Profiling with Knife-Edge Technique

1. What is the purpose of the laser beam profile exercise?

This exercise aims to guide students in understanding how to experimentally determine the intensity profile of a laser beam, specifically one oscillating in the TEM00 mode. It involves using the knife-edge technique to collect data and then developing a model to fit this experimental data, thereby characterizing the beam's spatial distribution of irradiance.

2. What is the knife-edge technique used for in this context?

The knife-edge technique is an experimental method used to sample the laser beam's power. By gradually moving a sharp edge (the "knife-edge") across the laser beam and measuring the power transmitted past the edge at each position, one can indirectly determine the intensity profile of the beam. The change in transmitted power as the knife-edge moves provides information about the spatial distribution of the beam's irradiance.

3. What is the TEM00 mode of a laser beam, and why is it significant?

The TEM00 mode (Transverse Electromagnetic mode 00) is the fundamental Gaussian mode of a laser beam. It is characterized by a Gaussian-shaped intensity profile in the transverse plane, meaning the intensity is highest at the center of the beam and decreases radially according to a Gaussian function. This mode is often preferred due to its well-defined and predictable spatial characteristics, including a smooth, single-peaked intensity distribution and minimal divergence.

4. What does the exercise involve in terms of modeling and data analysis?

The exercise requires students to first express the equation for the irradiance profile of a TEM00 laser beam in a scaled, dimensionless form suitable for computation. Then, they need to develop a model for the knife-edge profile, which predicts how the transmitted power changes as the knife-edge position varies. Finally, the core of the exercise (Exercise 4) involves fitting this model to experimental data obtained using the knife-edge technique. This fitting process typically uses computational tools and algorithms (like Python's curve_fit function) to find the parameters of the model that best match the measured data.

5. What is the role of the "guess function" and the "fit function" in Exercise 4?

In Exercise 4, a "guess function" is generated based on an initial estimate of a key parameter of the laser beam profile, denoted as w0 (related to the beam width). This guess function is plotted alongside the experimental data to provide a visual comparison and a starting point for the fitting process. The "fit function" is the model of the knife-edge profile with its parameters optimized by fitting it to the experimental data using a least-squares algorithm. This fit function represents the best theoretical description of the experimental measurements based on the chosen model.

6. What is the significance of the parameter w0 in the context of a Gaussian laser beam profile?

The parameter w0 (often referred to as the beam waist radius) is a crucial characteristic of a Gaussian laser beam profile (TEM00 mode). It represents the radius at which the irradiance of the beam falls to 1/e² (approximately 13.5%) of its peak value on the beam axis. w0 effectively defines the beam width at its narrowest point and is a key parameter in describing the spatial extent and propagation of the laser beam.

7. What computational tools are mentioned or implied as being used in this exercise?

The exercise explicitly mentions the use of Python as an available implementation language. The provided code snippet (Beam_Profile_Exercise_4.py) imports libraries such as pylab (for plotting), numpy (for numerical operations), scipy.special (specifically the error function erf), scipy.optimize (the curve_fit function for data fitting), and matplotlib.pyplot (for error bar plots). This indicates that Python, along with these scientific computing libraries, is the primary computational tool used for modeling, data analysis, and visualization in this exercise.

8. What are the learning objectives for students completing this set of exercises?

Upon completing these exercises, students should be able to:

  • Express the equation for a TEM00 laser beam profile using scaled variables suitable for coding.
  • Generate line plots and contour plots of the scaled irradiance of the laser beam.
  • Develop a model for the knife-edge profile of the laser beam and plot it.
  • Fit this model of irradiance versus knife-edge position to experimental data to characterize the beam.
1 1 1 1 1 1 1 1 1 1 Rating 0.00 (0 Votes)