% Polarizer calibration / Rana's lab % Tobin Fricke 2007-10-26 % Experimental setup: % [Dump] % | % +-------+ | % | Laser |-------|lambda/2|----|PBS|----[Power Meter] % +-------+ % set(0, 'DefaultLineLineWidth', 3); % The data (written in lab notebook, 2007-10-23) theta = 40:2:98; power = [0.922 0.688 0.153 0.095 0.332 0.966 1.735 3.154 4.546 ... 5.83 8.02 9.89 10.62 12.72 16.88 19.34 22.38 23.64 25.32 27.91 ... 29.99 31.15 32.07 33.50 34.25 34.62 34.61 34.19 33.55 32.42]; % Fitting function fcn = @(a, x) (a(1)/2)*(1 + sind(a(2)+4*x)) a = lsqcurvefit(fcn, [35 0], theta, power) % Plot theta2 = linspace(min(theta), max(theta), 100); hold on; h = [0 0]; h(2) = plot(theta2, fcn(a, theta2), '-', 'Color', [0 0.5 0]); h(1) = plot(theta, power, 'bo', 'MarkerSize', 6); hold off; xlabel('Polarizer angle [degrees]'); ylabel('Power measured through beamsplitter [Watts]'); grid on; legend(h, 'data', ... sprintf('fit to model: %3.1f*(1 + sin(4\\theta + %3.1f))/2', a(1), a(2)), ... 'Location', 'NorthWest'); %% Make a table of power --> polarizer angle P=0:2:34; P = [P a(1)]; % Make sure the maximum power is on the list theta3 = (asin((P*2/a(1))-1)*180/pi - a(2))/4 + 90 format bank; [P ; theta3 ]' h = text(0.65, 0.4, [sprintf(' Power Angle\n') ... sprintf('%4.0f W %4.0f\\circ\n', [P ; theta3 ])],... 'Units', 'Normalized') set(h, 'FontName', 'Courier', ... 'Background', 'white'); print(gcf, '-dpdf', 'polarizer.pdf');