Instrument Calibration - Polarization-Lab/ULTRASIP-FIREXAQ GitHub Wiki
Calibration and Lab Setting Assumptions
When calibrating ULTRASIP in a lab setting, we make a number of assumptions:
- The irradiance on every pixel is equivalent, the source used is uniform and Lambertian
- The reference linear polarizer used has a diattenuation equal to 1, the light transmitted is linearly polarized
- The light entering the reference polarizer is unpolarized
- For some applications, it is assumed that the source is monochromatic (390 nm)
These assumptions are important because they allow for the average of the image to be taken across the entire field of view, something that every calibration script relies on.
Aligning the Polarizer in the ELL14
The polarizer in the ELL14 is not guaranteed to be perfected level with our definition of zero degrees. As a result, an offset must be added to the ELL14 motor. However, due to the nature of the problem, alignment has to be done in a laboratory setting with a source of linearly polarized light aligned with the desired reference zero. AlignUV.m and Calibrate.m then find the angular offset needed to properly align the ELL14. They each use a different method:
-
AlignUV.mtakes n number of stokes images, processes said images, calculates the AoLP of the 100% linearly polarized incident light, and finds the mean. By knowing the AoLP, the code then knows how far off the reference home is for the ELL14 and adjusts by that amount. Best practice is to perform more than five measurements, totaling 20 images and five AoLP calculations. Note that this code changes the home position of the ELL14 automatically. -
Calibrate.mis a recursive algorithm that takes images at varying degrees with a step of delD from D_min to D_max. It then finds the maximum of that dataset and then repeats with a new D_min = max - delD, D_max = max + delD, and delD = delD / 10 until delD is below the angular resolution of the ELL14. Best practice is to scan from -90 to 90 degrees with an initial delD of 10 degrees. For visual inspection, the code also plots the camera counts versus ELL14 angle relative to the current reference, see below:
Although AlignUV.m is faster and more immune to noise than Calibrate.m, Calibrate.m creates a plot of the counts versus angle which can help diagnose other issues with the instrument that AlignUV.m assumes are perfect. For example, the plots generated by Calibrate.m follow Malus' Law and inspecting them for possible deviations can give insight to the polarizers used in the experiment.
Setting Exposure Time
The ImagEM13 camera does not automatically set the proper exposure time for images and therefore has to be set manually. For the time being, this is done in a laboratory environment with 100% linearly polarized light. There are two scripts that can be used to find a proper exposure time.
FindExposure.m looks for the linear region in the counts versus exposure time dataset. The bounds of this region as well as the desired camera counts are user defined in the first few lines of the script. When the script is run, it will first prompt the user to guess the exposure time. The camera finds the max counts which will fall into one of three conditions:
- The counts are below the user defined lower bound, in which case the exposure time is incrementally increased until the counts fall within the linear region
- The counts are above the user defined upper bound, in which case the exposure time is incrementally decreased until the counts fall within the linear region
- The counts fall within the linear region, in which case the program moves onto the next step.
Once the code finds one point in the linear region, it increments the exposure time by some amount in some direction to find a second. Since this region is approximately linear, the code forms a linear equation out of these two points and uses this approximation to estimate a good exposure time to get close to the desired counts. To verify results, the code takes a snapshot with this new exposure time and outputs the image for visual inspection. In this example, desired counts was set to 45000 counts:
ExposureTime.m takes images with varying exposure times with the ELL14 at 0 degrees, averages over the whole FOV and plots the average counts versus exposure time. In addition, the script repeats this process with the ELL14 rotated 90 degrees. One thing to note is that the data at 90 degrees should be perfectly linear with a shallow slope compared to the data for 0 degrees if the ELL14 is properly aligned.
Also note that the curve will take a different shape depending on the specular distribution of the source. A narrowband source (left) versus a broadband source (right):
To ensure that the data follows our assumptions, the average counts for any ELL14 position must be in the linear region of the appropriate graph.
ExposureTest.m is intended for use in troubleshooting as a backup to FindExposure.m. FindExposure.m is much faster than ExposureTest.m and is intended for actual instrument calibration.