close all clear all % load JPL data f0 = dir('*dark'); f1 = dir('*bright*'); % get temperature vs time tempList = []; refPDList = []; for ii = 1:numel(f1) fname = f1(ii).name; tempList = [tempList; str2num(fname(15:17))]; refPDList = [refPDList; str2num(fname(27:30))*1E-6]; end % QIL ELOG 2474 REFPDcal = [0 1.048 1.171 90.75 0.941 1.043 80.66 0.827 0.904 70.56 0.708 0.763 60.47 0.596 0.627 50.45 0.48 0.485 39.92 0.357 0.338 29.82 0.237 0.191 19.73 0.117 0.045 9.64 0.080 0.000 0.00 0.080 0.000]; aFit = polyfit(REFPDcal(:, 2)*1E-3, REFPDcal(:, 3)*1E-3, 1); % % plot the data close all figure('DefaultAxesFontSize', 16) plot(tempList(:, 1), '-o'); hold all grid on ylabel('Temp (K)') figure('DefaultAxesFontSize', 16) figure('DefaultAxesFontSize', 16) % import the scan data QEvT = []; DCvT = []; ncount = 1; for ii = 1:1:min([numel(f1), numel(f0)]) dark = dlmread(f0(ii).name); photo = dlmread(f1(ii).name); figure(2) subplot(2,1,1) semilogy(dark(:, 1), dark(:, 2), 'LineWidth', 2) grid on hold all title('A2P2 dark') axis([-0.2 1 1E-9 1E-2]) subplot(2,1,2) semilogy(photo(:, 1), photo(:, 2), 'LineWidth', 2) grid on hold all axis([-0.2 1 5E-5 3E-3]) title('A2P2 photocurrent with ~1.13mW incident') subplot(2,1,1) xlabel('Bias voltage (V)') ylabel('Current (A)') subplot(2,1,2) xlabel('Bias voltage (V)') ylabel('Current (A)') % get the difference darkS = dark(1:size(photo,1)-1, 2); photoS = photo(1:size(photo,1)-1, 2); biasS = photo(1:size(photo,1)-1, 1); powIN = aFit(1)*refPDList(ii) + aFit(2); hnue = 6.63E-34*3E8/2.004E-6/1.6E-19; windowTrans = 0.966; % KOJI ELOG 2458 QE = [biasS, (photoS - darkS)/(powIN*windowTrans)*hnue]; dataALL(ii).QE = QE; figure(3) plot(QE(:, 1), QE(:, 2)); grid on hold all tempII{ncount} = ['T = ', num2str(tempList(ii)), 'K']; ncount = ncount + 1; QEvT = [QEvT; tempList(ii), max(QE(:, 2))]; DCvT = [DCvT; tempList(ii), dark(end,2)]; end figure(2) subplot(2,1,1) legend(tempII) subplot(2,1,2) legend(tempII) orient tall print('-dpdf', '-fillpage', 'PC_DC_v_T.pdf') figure('DefaultAxesFontSize', 16) subplot(2,1,2) plot(QEvT(:, 1), QEvT(:, 2), 'LineWidth', 2) grid on xlabel('Temperature (K)') ylabel('QE') title('A2P2 diode QE vs temperature') %figure('DefaultAxesFontSize', 16) subplot(2,1,1) semilogy(DCvT(:, 1), DCvT(:, 2), 'LineWidth', 2) grid on xlabel('Temperature (K)') ylabel('Dark Current') title('A2P2 diode dark current vs temperature') orient tall print('-dpdf', '-fillpage', 'A2P2_001_test.pdf')