Skip to content

Calibration

José Carlos edited this page Sep 9, 2024 · 4 revisions

To ensure maximum performance of the PLM, it's necessary to calibrate its lookup table and the Mirror Bias voltage supplied to it.

The PLM offers a Mirror Bias line that is wavelength-dependent and is used to affect the vertical stroke range of the pistoning mirrors. The appropriate Mirror Bias voltage is likely written on the PLM head packaging, but we found that it was best to calibrate it before using the PLM in optical experiments.

For an explanation of the experimental setup for calibration, please refer to the paper here. In this wiki entry, I'll explain the code used to create the calibration holograms.

% By default, it is set to TI's LUT
phase_levels = [0, 0.0100, 0.0205, 0.0422, 0.0560, 0.0727, 0.1131, 0.1734, 0.3426, 0.3707, 0.4228, 0.4916, 0.5994, 0.6671, 0.7970, 0.9375, 1];
plm.SetLookupTable(phase_levels);

numPatterns = 16;
phase = zeros(N, M, numPatterns);
hologram = zeros(4*2*N, 2*M, 'uint8');
for i = 1:numPatterns
    phase(1:N/2,:, i) = phase_levels(i);
end

frame = plm.BitpackHolograms(phase);

num_frames = 1;
offset = 0;
format = 1; % RGBA
plm.InsertFrames(frame, offset, format);

plm.SetFrame(0);

% When ready, you can command the PLM to read from the screen only once (24 holograms, 1 bitpacked frame)
% >>>> Keep in mind that the PLM has to be in Play Once mode.
% This feature only works if the plmctrl's library has TI's hidapi wrappers included
plm.PlayOnce();
Clone this wiki locally