clear; clc; close all; %addpath('C:\Users\Sarina\Documents\Privat\Projekt Reptilienlicht\2011_Reptilien-Photometrie II\MatlabII\export_fig'); %% Broadbandmeter Figures stringInt = '\Sigma_n E_\lambda(\lambda_n)\cdot A(\lambda_n) \cdot \Delta\lambda_n'; stringE = 'Spektrale Bestrahlungsstärke E_\lambda(\lambda)'; stringWL = 'Wellenlänge \lambda / nm'; stringA = 'Spektrale Empfindlichkeit A(\lambda)'; % stringE = 'spectral irradiance E_\lambda(\lambda)' % stringWL = 'wavelength \lambda/ nm' % stringA = 'spectral sensitivity A(\lambda)' load('data.mat'); set(0,'defaulttextinterpreter','tex'); set(0,'DefaultLineLinewidth',3) set(0,'DefaultAxesFontSize',14) colA = [255, 0, 58]/255; colE = [195, 0, 255]/255; colAE = [ 27, 0, 255]/255; colAEP =[0, 141, 191]/255; UVB(:,1)=linspace(250,400,400-250+1); UVB(:,2)=1; UVB((UVB(:,1)<280),2)=0;UVB((UVB(:,1)>320),2)=0; %% Solarmeter 6.2 figure('Color','white'); hold on; for L=260:10:390, line([L,L],[0,1],'Color',[0.8,.8,.8],'Linewidth',0.5); end for Y=0.1:0.1:1, line([250,400],[Y,Y],'Color',[0.8,.8,.8],'Linewidth',0.5); end plot(sm62(:,1),sm62(:,2),'Color',colA); ax1 = gca; set(ax1,'YColor',colA); xlabel(stringWL); ylabel(stringE,'Color',colA); export_fig('radiometer_1.png'); %% Solarmeter 6.2 + Lamp i_=0; for L=280:5:340 i_=i_+1; [Y,I1] = min(abs(callamp(:,1)-L)); [Y,I2] = min(abs(sm62(:,1)-L)); [Y,I3] = min(abs(callamp_sm62(:,1)-L)); s = sprintf('| %d | %d nm | @#E17FFF: %0.3f µW/cm²/nm | @#FF7F9F: %d | @#8D7FFF: %0.3f µW/cm²/nm | ',... i_,L,round(1000*callamp(I1,2))/1000,round(sm62(I2,2)*100),round(1000*callamp_sm62(I3,2))/1000); disp(s); end figure('Color','white'); hold on; for L=260:10:390, line([L,L],[0,1],'Color',[0.8,.8,.8],'Linewidth',0.5); end for Y=0.1:0.1:1, line([250,400],[Y,Y],'Color',[0.8,.8,.8],'Linewidth',0.5); end plot(sm62(:,1),sm62(:,2),'Color',colA); xlabel(stringWL); ylabel(stringA); ax1 = gca; set(ax1,'YColor',colA); ax2 = axes('Position',get(ax1,'Position'),... 'XAxisLocation','bottom',... 'YAxisLocation','right',... 'Color','none',... 'XColor','k',... 'YColor',colE,... 'XLim',get(ax1,'XLim'),... 'XTick',[]... ); hold on; fill(callamp_sm62(:,1),callamp_sm62(:,2),colAEP); plot(callamp(:,1),callamp(:,2),'Parent',ax2,'Color',colE); set(get(ax2,'Ylabel'), 'String',stringE,'Fontsize',13) plot(callamp_sm62(:,1),callamp_sm62(:,2),'Parent',ax2,'Color',colAE); text(330,4,'E_\lambda(\lambda)\cdot A(\lambda)','Color',colAE,'FontSize',13) text(295,30,'A_\lambda(\lambda)','Color',colA,'FontSize',13) text(335,30,'E(\lambda)','Color',colE,'FontSize',13) text(265,4,stringInt,'Color',colAEP,'FontSize',13) export_fig('radiometer_2.png'); %% Solarmeter 6.2 + UVB callamp_UVB = callamp; callamp_UVB((callamp_UVB(:,1)<280),2)=0;callamp_UVB((callamp_UVB(:,1)>320),2)=0; figure('Color','white'); hold on; for L=260:10:390, line([L,L],[0,1],'Color',[0.8,.8,.8],'Linewidth',0.5); end for Y=0.1:0.1:1, line([250,400],[Y,Y],'Color',[0.8,.8,.8],'Linewidth',0.5); end plot(UVB(:,1),UVB(:,2),'Color',colA); xlabel(stringWL); ylabel(stringA); ax1 = gca; set(ax1,'YColor',colA); ax2 = axes('Position',get(ax1,'Position'),... 'XAxisLocation','bottom',... 'YAxisLocation','right',... 'Color','none',... 'XColor','k',... 'YColor',colE,... 'XLim',get(ax1,'XLim'),... 'XTick',[]... ); hold on; fill(callamp_UVB(:,1),callamp_UVB(:,2),colAEP); plot(callamp(:,1),callamp(:,2),'Parent',ax2,'Color',colE); set(get(ax2,'Ylabel'), 'String',stringE,'Fontsize',13) plot(callamp_UVB(:,1),callamp_UVB(:,2),'Parent',ax2,'Color',colAE); text(325,4,'E_\lambda(\lambda)\cdot A(\lambda)','Color',colAE,'FontSize',13) text(305,30,'A(\lambda)','Color',colA,'FontSize',13) text(335,30,'E_\lambda(\lambda)','Color',colE,'FontSize',13) text(265,4,stringInt,'Color',colAEP,'FontSize',13) export_fig('radiometer_3.png'); %% Solarmeter 6.2 + Solarmeter 6.5 + Difference diff = interp1(sm65(:,1),sm65(:,2),sm62(:,1),'spline'); diff = sm62(:,2) - diff; figure('Color','white'); plot(sm62(:,1),sm62(:,2),'Color',colA); hold on; plot(sm65(:,1),sm65(:,2),'Color',colE); plot(sm62(:,1),diff,'Color',colAE); xlabel(stringWL); ylabel(stringA); legend('Solarmeter 6.2','Solarmeter 6.5', 'SM 6.2 - SM 6.5'); xlim([270,360]) export_fig('radiometer_4.png');