LinecutGenerator.m

Last Updated 4/18/22

LinecutGenerator.m is a program that was originally generated for a lab done in OPT204: Sources and Detectors Lab. The lab was single photon interference. Within the lab, we took photos of the interferogram created by single photons in both a two-slit and mach-zehnder interferometer. However, we did not get any quantitative data at the time of measurement. So we required an additional analysis program in order to take the image gathered and create a plot of the intensity of the light across the interference pattern.

The input of to the program must be a tilt fringe interferogram image with the fringes oriented vertically as shown below:


The program works by averaging each of the columns and then plotting those average values. Therefore, it is recommended that the image is cropped as the one above so only the interferogram is factored into the averages. After creating the plot (referred to as "linecut"), the code calculates and displays the max intensity, min intensity, and visibility of the fringes.

The reason that I have chosen to average the columns is because of the experimental setup. In the experiment, because we are using normal incident light and a beam that overfills the input (this matters especially for the two-slit interferometer), the vertical axis should theoretically have the same intensity. Therefore, to reduce noise contributions that would affect a typical linecut, I have chosen to average the columns.

Potential future outlooks for this code would be to be able to input a non-processed image and have the code be able to detect and calculate the same values. That way this could be integrated into a manufacturing process more easily. Processed in this case means cropped and rotated so that the fringes are vertical.

Below is the script: