Week 1 of 4: Foundations
This week you build the foundational skills for the entire Gaussian Beams sequence: optical alignment, photodetector operation, and beam size measurement. The calibration data and measurement techniques you develop this week will be used directly in Weeks 2-4.
This week: Align optics → Calibrate photodetector → Measure beam size
Next week: Learn data acquisition → Characterize noise → Choose optimal gain setting
After completing this week’s lab, you will be able to:
This week you’ll build the foundation for the entire lab sequence. Your work centers on three activities:
1. Build and align your optical setup. You’ll mount a laser and mirrors, then use the “walking the beam” technique to achieve parallel propagation. Document your setup with a diagram—you’ll refer back to this in later weeks.
2. Understand and calibrate your photodetector. Before you can trust voltage readings, you need to know how the detector behaves. You’ll measure offset voltages at each gain setting and verify that gain ratios match the datasheet. This calibration enables you to combine measurements taken at different gain settings.
3. Characterize measurement uncertainty. You’ll observe voltage fluctuations, identify their character (random noise vs. drift), and make decisions about your measurement strategy for beam profiling.
If time permits: Begin knife-edge beam size measurements. If not, you’ll complete this in Week 3.
See the detailed deliverables checklist at the end of this guide.
This lab sequence uses Python for data acquisition, analysis, and visualization. The following skills will be introduced as you progress through the weeks:
| Week | Python Skills | Resources |
|---|---|---|
| Week 1 | NumPy basics, Matplotlib plotting, file I/O | Data Analysis |
| Week 2 | Curve fitting with SciPy, NI-DAQmx | Data Analysis, NI-DAQmx |
| Week 3 | Error propagation, motor control | Data Analysis, Thorlabs Motors |
| Week 4 | Integrated automation | All above |
Before Week 2, ensure you are comfortable
with: - NumPy array operations - Basic plotting with Matplotlib
- Loading data with np.loadtxt()
If you need to review these skills, see the Python Resources page.
Your lab notebook will play an important role in this course. You will use your notebook for keeping records of many things including:
The lab notebook will be an important part of your grade because learning to keep a good lab notebook is an important part of your professional development.
Optic – Any optical component that manipulates the light in some way. Examples include lenses, mirrors, polarizing filters, beam splitters, etc.
Optomechanics – This category includes optics mounts and the components to align them. Examples in the lab include post, post holders, bases, lens mounts, adjustable mirror mounts, rotation mounts, and translation stages.
Your group should find an empty optical breadboard workstation in one of the five color coded optics bays in G-214. Spend some time to explore the space and familiarize yourself with the components. The shelf above the breadboard should have:
It’s very important that you do not handle optical components (lenses, mirrors, polarizers, wave plates, beam splitters, etc.) with your bare hands. The oils on your skin can damage the optics and degrade the light in your experiment. Always handle these components while using latex/nitrile gloves or finger cots, which can be found on the top of the tool cabinets in your optics bay, or on top of the black drawer cabinets in the main lab. This technical note from Newport discusses how to go about cleaning dirty optics, and is also demonstrated in this video. For a more in-depth treatment on cleaning optics, we have a copy of “The Proper Care of Optics: Cleaning, Handling, Storage, and Shipping” by Robert Schalck for reference in the lab (it should be located on top of the black tool cabinets in the main lab).
The two videos linked below provide information and tips on how to use and mount components on the optical breadboards that we have in the lab. Please watch these before proceeding.
Mounting Your Optomech: Bases, Post Holders, and Posts | Thorlabs Insights
Tips for Bolting Post Holders to Optical Tables, Bases, and Breadboards | Thorlabs Insights
Now, we will begin assembling the components.
As you are mounting the optics, choose the heights so that the laser hits the center of each optic and the beam is parallel to the table.
Next, you will align your laser such that beam is aligned parallel to the table. You will do this by using two mirrors and a technique that is called “walking a beam”. This video provides an overview on how to do so. The most relevant information for our lab starts at 4:09 (which the above link should take you to). Also, we have 3D printed beam alignment tools that are used in place of the iris in the video (these can be found in the colored drawer cabinet in your optics bay).
The goal of this part of the lab is to understand a lot about the specifications given on the datasheet for the Thorlabs PDA36A (or PDA36A2) Switchable Gain Amplified Photodetectors (we have both in the lab, so check the model number to know which one you are using). It is important to realize that data sheets (also called spec sheets or specification sheets) provide a model for the realistic behavior of the device. This model can be tested and improved, a process more commonly called “calibration.” Note that there are two power switches, one on the power supply and one on the photodetector. The photodetector will respond to light with the power off but it won’t work well and changing the gain will have little effect.
Calibrating the photodetector is essential when working with multiple gain settings. Imagine you’re measuring beam size later today (or in Week 4’s automated measurements): at one position the signal saturates at 40 dB gain, but gives good readings at 30 dB. How would you combine these measurements onto a single scale? That’s what calibration enables—it lets you stitch data from different gain settings together accurately.
The photodetector gain is specified in decibels (dB), a logarithmic scale commonly used in electronics. Here’s how it works:
The definition: For voltage gain, \[dB = 20 \times \log_{10}\left(\frac{V_{out}}{V_{in}}\right)\]
What does log₁₀ mean? The function \(\log_{10}(x)\) asks: “10 raised to what power equals \(x\)?” For example:
Converting dB to linear gain: To find the actual gain from a dB value, invert the formula: \[\text{voltage gain} = 10^{dB/20}\]
For example, 20 dB corresponds to \(10^{20/20} = 10^1 = 10\times\) gain.
Important: What “0 dB” means on the PDA36A. On this photodetector, “0 dB” does not mean “no amplification.” The 0 dB setting has a transimpedance gain of 1.51 × 10³ V/A—this is the baseline. The dB labels indicate gain relative to this baseline: the 20 dB setting has 10× more gain than 0 dB, the 40 dB setting has 100× more, and so on.
Build your intuition: Predict the linear gain for 40 dB before moving the slider below, then check your answer. Try a few values until the conversion feels natural.
0 dB 70 dB
Think about it: The dB scale can also be defined for power: \(dB = 10 \times \log_{10}(P_{out}/P_{in})\). Notice the factor is 10 instead of 20. Why does this make sense? (Hint: How is power related to voltage in a resistive circuit?)
You might not get this immediately—that’s fine. Discuss with your partner or revisit after completing the calibration.
Calibrating the offset voltage.
The offset voltage is the photodetector’s output when no light is incident on the sensor. You’ll need to subtract this from your measurements to get accurate readings.
Measure the offset: Block all light from reaching the detector and record the output voltage at each gain setting (0, 10, 20, … 70 dB). How does the offset change with gain?
Compare to datasheet: The datasheet specifies typical and maximum offset values for each gain setting. Are your measured values within the specified range?
Eliminating stray light: What steps did you take to ensure no light reached the detector? How confident are you that stray light isn’t affecting your offset measurements?
Calibrating the gain.
Absolute vs. relative gain: The datasheet specifies gain in V/A (volts out per amp of photocurrent in). Can you measure this absolute gain with the equipment available, or can you only measure how gain changes between settings (relative gain)? Explain your reasoning. (Note: This lab only requires relative gain.)
Measure relative gain: Choose a light level where the detector doesn’t saturate at your highest gain setting—you may need to partially block the beam. Then measure output voltage at several gain settings (e.g., 0, 10, 20, 30, 40 dB) without changing anything else. Calculate the gain ratio between adjacent settings.
Compare to datasheet: The datasheet lists expected gain ratios between settings (each 10 dB step should be ~3.16×, each 20 dB step should be ~10×). How do your measured ratios compare? Are any discrepancies within reasonable experimental uncertainty?
Estimate laser power: Using the datasheet values for responsivity (at 632.8 nm) and the 0 dB transimpedance gain, estimate your laser’s output power from your measured voltage. Does this agree with the power labeled on the laser? If not, what might explain the difference?
Thinking further: If you had access to a calibrated optical power meter, how would you use it to measure the absolute transimpedance gain at each setting?
Write the conversion equations: Express the relationship between incident optical power \(P_{in}\) and photodetector output voltage \(V\). Your equations should include:
Write both directions: (1) \(P_{in} \rightarrow V\) and (2) \(V \rightarrow P_{in}\).
You’ll use this photodetector throughout the lab sequence—for beam size measurements today and for automated profiling in Week 4. Before moving on, consider how you will use your calibration results:
Datasheet vs. measured values: Based on your calibration, would you trust the datasheet gain values, or would you use your measured values? Under what conditions might the datasheet values be inadequate?
Handling discrepancies: If your measured offset voltage differed significantly from the datasheet (say, by more than 50%), what would you do before proceeding?
There is no single correct answer—justify your choice in 2-3 sentences.
Choosing a gain setting: For most measurements, you’ll use this photodetector at a single gain setting. Which setting would you tentatively choose based on your calibration? (You will refine this choice in Week 2 after characterizing noise.)
You’ve just calibrated your photodetector and recorded voltage values. But how confident should you be in those numbers? You’ve encountered measurement uncertainty in previous courses—this section gives you hands-on practice applying those concepts to real-time optical measurements, a skill you’ll use throughout this lab sequence.
Make sure that your laser has been turned on for at least 5 minutes so it has had the opportunity to warm up.
Connect your photodetector to the oscilloscope and observe the voltage signal from the laser.
1. Observe the temporal structure
Watch the signal for 30 seconds or more. The key question isn’t just “how much does it fluctuate?” but “what kind of fluctuations do you see?”
Record what you observe in your notebook. Do you see primarily random noise, drift, periodic components, or some combination?
2. Quantify the fluctuations
Take 10 voltage readings and calculate:
3. Make experimental decisions
Based on your observations, answer these questions in your notebook:
Does σ capture your uncertainty? If you observed drift, the standard deviation of random samples may not accurately represent your measurement uncertainty. Why not?
How many measurements do you need? Calculate how many measurements would give you 1% relative uncertainty in the mean (i.e., \(\sigma_{\overline{V}}/\overline{V} = 0.01\)). Is this practical for your beam size measurements?
What’s your measurement strategy? For the knife-edge scan, will you record single readings at each position or average multiple readings? What’s the trade-off between speed and precision?
These decisions matter for your beam size measurement. If drift is present during a knife-edge scan, it could systematically bias your fitted beam size. If you’re averaging at each position, you’re trading measurement time for precision.
In Week 2, you’ll characterize noise more systematically and learn to make these trade-offs quantitatively.
The goal of this section is to develop a measurement technique and analysis scheme to measure the width of a laser beam. The scheme will let you measure the width in one dimension. The technique is most useful for beams that have an approximately Gaussian intensity profile. You will improve and refine this technique in the upcoming weeks of this lab.
Time management note: This section has multiple parts with different priorities:
Essential (must complete): Derive the error function model and answer the required questions in “Before you take data.” This theoretical understanding is critical preparation for Week 2.
Important (complete if time allows): Build the setup and take data. If you don’t finish in Week 1, you will complete this in Week 3.
Optional (good practice): Try the curve fitting practice exercise with test data. This prepares you for Week 2, but fitting is covered in detail in Week 2’s prelab.
The basic scheme involves measuring the power in the laser beam as the beam is gradually blocked by a knife edge (razor blade) using a setup similar to Figure 3.
Note: Nonlinear least squares fitting is covered in detail in Week 2’s prelab. This section prepares you to understand what you’ll be fitting.
Required (answer in your notebook):
Optional practice (if time permits):
If you want to get a head start on curve fitting, you can
practice with test data. See the Python Resources page
for a guide to curve fitting with
scipy.optimize.curve_fit. Week 2’s prelab covers
this in detail, so don’t worry if you don’t complete this
now.
Before Week 2, complete the following to ensure you’re ready for the curve fitting and data acquisition work ahead. This is not busywork—Week 2’s prelab assumes you can confidently work with NumPy arrays and Matplotlib. Use this exercise to honestly assess your readiness and identify gaps.
Download the test data: Test_Profile_Data.csv
Open the file in a text editor or spreadsheet to see its structure. Then, before running any code, answer these questions in your notebook:
The file has two columns (position and voltage) and
about 30 rows of data. After running
data = np.loadtxt('Test_Profile_Data.csv', delimiter=',', skiprows=1),
what will data.shape return?
The code below uses data[:, 0] and
data[:, 1]. In plain English, what does the
: mean? What does the 0
mean?
The raw position data is in meters, but the plot displays millimeters. Why might millimeters (or smaller units) be preferable for displaying a beam profile measurement? (Hint: think about typical laser beam radii.)
Now run the code and check your predictions:
import numpy as np
import matplotlib.pyplot as plt
# Load the data
data = np.loadtxt('Test_Profile_Data.csv', delimiter=',', skiprows=1)
print(f"Data shape: {data.shape}") # Check your prediction!
position = data[:, 0] # meters
voltage = data[:, 1] # volts
# Create a plot
plt.figure(figsize=(8, 5))
plt.plot(position * 1000, voltage, 'bo', markersize=4)
plt.xlabel('Position (mm)')
plt.ylabel('Voltage (V)')
plt.title('Beam Profile Test Data')
plt.grid(True, alpha=0.3)
plt.savefig('week1_python_check.png', dpi=150)
plt.show()In your notebook: Were your predictions correct? If not, make sure you understand why before proceeding.
Running code proves you can execute it. Modifying code proves you understand it. Make these changes:
Change units: Display position in micrometers (μm) instead of millimeters. Update both the data conversion and the axis label.
Change appearance: Change the markers from blue circles to red squares. (Hint: look up Matplotlib marker styles, or ask an AI assistant—the skill is knowing what to ask.)
Add information: Add a horizontal
dashed line at the mean voltage value. (Hint:
plt.axhline())
Transfer task: Create a second
figure showing only the first half of the data points. Save it
as week1_python_subset.png. (This tests whether
you understand array slicing, not just symbol
substitution.)
Self-check: Your modified plot (tasks 1-3) should show position in μm (ranging from about -1800 to +4200 μm based on this dataset). Your subset plot (task 4) should show roughly half as many data points as the original.
For each skill below, rate yourself honestly. This is not graded—it’s for you to identify gaps before Week 2.
Calibration check: Before filling in the
table, try this without looking at any code: write a line of
Python that extracts only the first 5 position values from the
position array. If this took you more than 30
seconds or you weren’t sure of the answer, you should probably
rate yourself “C” for array operations—and that’s okay, as long
as you address it before Week 2.
| Skill | A: Confident | B: Could figure out | C: Would struggle |
|---|---|---|---|
| Extract a specific column from a 2D NumPy array | |||
| Create a plot with title and labeled axes | |||
| Read a Python error message and identify which line caused it | |||
| Modify code to change units or appearance | |||
| Save a figure to a file |
If you rated yourself “C” on any skill: Before Week 2, work through the relevant sections of Python Resources. Budget 1-2 hours. It’s much better to address gaps now than to struggle during the Week 2 prelab.
In Week 2, you’ll encounter code like this:
def beam_profile(x, amplitude, center, width, offset):
return amplitude * erf(np.sqrt(2) * (x - center) / width) + offset
popt, pcov = curve_fit(beam_profile, x_data, y_data, p0=[1.4, 0.01, 0.0005, 1.4])
print(f"Beam size w: {popt[2]:.4f} m")You don’t need to understand curve_fit
yet—that’s Week 2’s content. But you do need to
understand:
x_data and y_data are
(arrays you loaded from a file)popt[2] (the third element)
from the resultIf the exercises above felt confusing, address that gap now. Week 2 builds directly on these skills, and struggling with Python basics will distract you from learning the physics.
Your lab notebook should include the following for this week:
Photodetector physics explanation: diagram and written explanation of how the photodetector converts light to voltage
Calibration comparison: quantitative comparison of your measurements to datasheet values
Beam size measurement (if completed): fit plot, extracted beam size with uncertainty
Reflection questions:
Prediction questions (Step 1): Written
answers to the three prediction questions about
data.shape, array indexing, and unit
conversion—include your reasoning, not just the answer
Prediction verification (Step 2): Note whether your predictions were correct, and if not, what you learned
Modified plot (Step 3): Your customized
plot showing position in μm, red square markers, and mean
voltage line (week1_python_modified.png)
Subset plot (Step 3, task 4): Plot
showing only the first half of the data points
(week1_python_subset.png)
Self-assessment (Step 4): Completed skill rating table with honest A/B/C ratings, including the calibration check