% Jon Newman
% 2014.01.19

%% Optical power at fiber tip using the Laser
% INPUT MODULATION: DC voltage from power supply 
% MEASUREMENT: Newport 1830-C meter using a Newport 818-SL photodiode.
% K_fac accounts for distance and OD2 neutral density filter correction for
% higher laser powers

% 125 um diameter fiber
fiber_area = pi*(0.125/2)^2; 

% This is the ratio of the laser power during pulsed operation, which is
% more representative of how it is used in our experiments, versus CW mode
% at a given command input, which is how measurments were taken.
pulse_dc_ratio = 5/14.9; 

% Laser
v_cmd = [0 1.6 1.7      1.8     1.9     2.0     2.1     2.2     2.3     2.4     2.5     2.6     2.7     2.8     2.9     3.0     3.5     3.0     3.5     4.0     4.5     10.0];
p_raw = [0 0.0 0.00075  0.0032  0.0075  0.017   0.034   0.054   0.091   0.153   0.22    0.31    0.40    0.49    0.63    0.78    1.90    0.0061  0.0144  0.030   0.048   0.048 ];
K_fac = [1 1   1        1       1       1       1       1       1       1       1       1       1       1       1       1       1       369      369     369    369      369];


% Laser (average non-unique measures)
v_cmd = [0 1.6 1.7      1.8     1.9     2.0     2.1     2.2     2.3     2.4     2.5     2.6     2.7     2.8     2.9     3.0     3.5     4.0     4.5     10.0];
p_raw = [0 0.0 0.00075  0.0032  0.0075  0.017   0.034   0.054   0.091   0.153   0.22    0.31    0.40    0.49    0.63    0.78    3.61    0.030   0.048   0.048 ];
K_fac = [1 1   1        1       1       1       1       1       1       1       1       1       1       1       1       1       1       369    369      369];

p_tip = pulse_dc_ratio*(p_raw .* K_fac)/fiber_area;

cftool
