% load JPL data f0 = dir('*dark*.txt'); f1 = dir('*photo*.txt'); f2 = dir('*cond*.txt'); % get temperature vs time tempList = []; pList = []; for ii = 1:numel(f2)-1 fname = f2(ii).name; tSub = fname(17:24); h0 = str2num(tSub(1:2)); m0 = str2num(tSub(4:5)); s0 = str2num(tSub(7:8)); t = h0*3600 + m0*60 + s0; % import the data dataIN = dlmread(fname); pList = [pList; dataIN(4)]; tempList = [tempList; t dataIN(2) dataIN(3)]; end % plot the data close all figure('DefaultAxesFontSize', 16) plot(tempList(:, 1), tempList(:, 2), '-o'); hold all grid on plot(tempList(:, 1), tempList(:, 3), '-o'); ylabel('Temp (K)') xlabel('Time (s)') figure('DefaultAxesFontSize', 16) figure('DefaultAxesFontSize', 16) % import the scan data QEvT = []; DCvT = []; ncount = 1; for ii = 1:3: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('A2P6 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('A2P6 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); QE = [biasS, (photoS - darkS)/1.17E-3*0.622/0.966]; dataALL(ii).QE = QE; figure(3) plot(QE(:, 1), QE(:, 2)); grid on hold all tempII{ncount} = ['T = ', num2str(round(mean(tempList(ii, 2:3)))), 'K']; ncount = ncount + 1; QEvT = [QEvT; mean(tempList(ii, 2:3)), max(QE(:, 2))]; DCvT = [DCvT; mean(tempList(ii, 2:3)), 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('A2P6 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('A2P6 diode dark current vs temperature') orient tall print('-dpdf', '-fillpage', 'A2P6_001_test.pdf')