%% %This code is designed to convert the numerics dumped by the DSA for noise %measurements. %% Dialogue={'Cross size, nm','Enter currents used (space-seperated), \muA','Provide frequency span, Hz','2 wire resistance, \Omega','Back gate voltage ,Volts'}; Tagg='Initialise'; Dim=[1 45]; default={'400','2','1000','1000','0'}; opts.Interpreter='tex'; Startup=inputdlg(Dialogue,Tagg,Dim,default,opts); FSpan=str2double(Startup{3});%Frequency range BW=FSpan*0.0095;%Bandwidth R=str2double(Startup{4});%2 Wire CrossS=str2double(Startup{1}); Currents=str2num(Startup{2}); BG=str2double(Startup{5}); Gain=10001; %Units of Frequency in name if FSpan<1000 UNIT='Hz'; Fname=FSpan; else UNIT='kHz'; Fname=FSpan/1000; end CurrNum=size(Currents); NPoints=401; kB=1.3806485279E-23; FR=0:FSpan/NPoints:FSpan; Freq=FR(7:396); figure ('Name',['Noise figure: Cross size ',Startup{1}, ' ,Frequency range ', Startup{3},' ,Back gate ', Startup{5}],'NumberTitle','off'); VJohn_base=0.13*10^-9;%0.13 sqrt(R)V/sqrt(Hz) VJohn=(VJohn_base*sqrt(R)).^2; loglog(Freq,0.9e-12./(Freq.^1)) VSqrEX=zeros(CurrNum(2),1); Vrms=zeros(CurrNum(2),390); hold on loglog(Freq,VJohn*ones(size(Freq)),'k--') index=1; leg=cell(1,2+size(Currents,2));%Precreating legend so that it does not complain on different current amounts. leg{1}='1/f eye-guide'; leg{2}='Johnson noise level'; %Plotting noises for I=Currents loadstr=['datastruct=importdata(''',num2str(CrossS),'nm_',num2str(I),'uA_',num2str(Fname),UNIT,'_Vg',num2str(BG),'.txt'');']; eval(loadstr) %Cut out errornous below BW and end peak. Vrms(index,:)=datastruct(7:396)/(sqrt(BW)*Gain); % Vrms(index,:)=(10.^(datastruct(7:396)./20))./(sqrt(BW)*Gain); hold on loglog(Freq,Vrms(index,:).^2) VSqrEX(index)=Vrms(index,41); leg{2+index}=[num2str(Currents(index)),'\mu Amps']; index=index+1; end xlabel('Frequency/ Hz','fontsize',18) ylabel('Voltage PSD/ V^2/Hz^0^.^5','fontsize',18) title(['Noise spectrum, ', Startup{1},'nm Cross, x10^-^5 pumped, ', Startup{5}, ' Back Gate voltage, ', Startup{4},'\Omega 2 wire R'],'fontsize',18) legend(leg,'Location','best') set(gca,'fontsize',25,'fontname','times','linewidth',1.5,'fontweight','bold','ticklength',[0.0125 0.01]);box on; set(gcf,'color','w'); box on; %% %PLOTTING ASSISTING CODE %Fitting Hooge % ft=fittype('sqrt((A*I^2)/(Freq*n*s))+c','problem',{'I','n','s'},'independent','Freq','dependent','Vnoise'); % Area=(CrossS)*10^-9*5*(CrossS)*10^-9; % V=Vrms(1,:)'; % F=Freq'; % FIT=fit(F,V,ft,'problem',{Currents(1),n,Area},'Exclude',[191 192 193 194 195 196 197 198 156 158 159 160 161 162 163]); % FOR COMPARITIVE PLOTS % h=figure; % left_color = [1.0 0 0]; % right_color = [0 0 1.0]; % set(h,'defaultAxesColorOrder',[left_color; right_color]);n400span=horzcat(n400spanpos,n400spanneg); % yyaxis left;hold on;plot(n400post*1.6e-19, RH400post./10e-6,'ro','MarkerSize',20); ylabel('Hall coefficient/ \Omega/T') % yyaxis left;hold on;plot(n400pre*1.6e-19, RH400pre./10e-6,'r*','MarkerSize',20); ylabel('Hall coefficient/ \Omega/T') % plot(n400post, Bmin2uA(6:16),'ro','MarkerSize',20); ylabel('\it\bfB_m_i_m \rm\bf(T/\surdHz)') % hold on;plot(n400pre, Bmin2uA(1:5),'r*','MarkerSize',20); ylabel('\it\bfB_m_i_m \rm\bf(T/\surdHz)') % yyaxis right;hold on;plot(n400post*1.6e-19, Vn4002uApost,'bs','MarkerSize',20); ylabel('\it\bfV_n \rm\bf(V/\surdHz)') % yyaxis right;hold on;plot(n400pre*1.6e-19, Vn40002uApre,'b+','MarkerSize',20); ylabel('\it\bfV_n \rm\bf(V/\surdHz)'),yyaxis left;plot(n400span(1:1000)*1.6e-19,6.25e18.*n400span(1:1000).^-1,'k.'); % Leg1={'Post-anneal R_H','Pre-anneal R_H','1/n fitting','Post-anneal noise','Pre-anneal noise'};legend(Leg1,'Location','best'); % yyaxis left;plot(n400spanneg*1.6e-19,6.25e18.*-n400spanneg.^-1,'k.'); % yyaxis right; ylim([-3.5e-6 3.5e-6]); % xlabel('Charge-Carrier concentration/ Cm^-^2','fontsize',18) % title([''],'fontsize',18) % set(gca,'fontsize',25,'fontname','times','linewidth',1.5,'fontweight','bold','ticklength',[0.0125 0.01]);box on; % set(gcf,'color','w'); % box on; %%OFFSET % figure;plot(n3800*1.6e-19,Roff3800,'kx','MarkerSize',18) % xlabel('Charge-Carrier concentration/ Cm^-^2','fontsize',20,'fontname','times'); % ylabel('Offset resistance/ \Omega','fontsize',20,'fontname','times'); % set(gca,'fontsize',22,'fontname','times'); % set(gcf,'color','w'); % box on; % title(['800 nm'],'fontsize',18) % axes('Position',[.65 .65 .2 .2]) % box on % plot(n3800*1.6e-19,Boff3800,'k*','MarkerSize',18) % xlabel('Charge-Carrier concentration/ Cm^-^2','fontsize',18,'fontname','times'); % ylabel('Offset field/ T','fontsize',18,'fontname','times'); % set(gca,'fontsize',25,'fontname','times','linewidth',1.5,'fontweight','bold','ticklength',[0.0125 0.01]);box on; % set(gcf,'color','w'); %%CURRENT % Bmin131500=Vn131500./(RH131500*IH131500*1e-6);figure;plot(IH131500,Bmin131500,'ks','MarkerFaceColor','k','MarkerSize',15) % xlabel('Drive current/ A','fontsize',18,'fontname','times'); % ylabel('B_m_i_n /T/Hz^0^.^5','fontsize',18) % set(gca,'fontsize',25,'fontname','times','linewidth',1.5,'fontweight','bold','ticklength',[0.0125 0.01]);box on; % set(gcf,'color','w'); % % Bmin310000BG=Vn310000BG./(RH31000(1)*IH310000BG*1e-6);Bmin3100020BG=Vn3100020BG./(RH31000(2)*IH3100020BG*1e-6); % Bmin3100040BG=Vn3100040BG./(RH31000(3)*IH3100040BG*1e-6); % Bmin3100060BG=Vn3100060BG./(RH31000(4)*IH3100060BG*1e-6); % Bmin3100080BG=Vn3100080BG./(RH31000(5)*IH3100080BG*1e-6); % Bmin31000100BG=Vn31000100BG./(RH31000(6)*IH31000100BG*1e-6); % Bmin31000110BG=Vn31000110BG./(RH31000(7)*IH31000110BG*1e-6); % figure;plot(IH315000BG,Bmin315000BG,'ks','MarkerFaceColor','k','MarkerSize',15);hold on; % plot(IH3150020BG,Bmin3150020BG,'ks','MarkerFaceColor','b','MarkerSize',15) % plot(IH3150040BG,Bmin3150040BG,'ks','MarkerFaceColor','c','MarkerSize',15) % plot(IH3150060BG,Bmin3150060BG,'ks','MarkerFaceColor','g','MarkerSize',15) % plot(IH3150080BG,Bmin3150080BG,'ks','MarkerFaceColor','y','MarkerSize',15) % plot(IH31500100BG,Bmin31500100BG,'ks','MarkerFaceColor','m','MarkerSize',15) % plot(IH31500110BG,Bmin31500110BG,'ks','MarkerFaceColor','r','MarkerSize',15) % xlabel('\it\bfI_H\rm\bf (A)','fontsize',18,'fontname','times'); % ylabel('\it\bfB_m_i_n\rm\bf (x10^-^4 T/\surdHz)','fontsize',18) % set(gca,'fontsize',25,'fontname','times','linewidth',1.5,'fontweight','bold','ticklength',[0.0125 0.01]);box on; % set(gcf,'color','w'); % Leg1={'0V','20V','40V','60V','80V','100V','110V'};legend(Leg1,'Location','best'); % title(['1000 nm chip 3'],'fontsize',18) %Current density % JH38000BG=IH38000BG/(800e-9*0.33e-9); % figure;plot(JH38000BG,Bmin38000BG,'ks','MarkerFaceColor','k','MarkerSize',15);hold on; % plot(JH380020BG,Bmin380020BG,'ks','MarkerFaceColor','b','MarkerSize',15) % plot(JH380040BG,Bmin380040BG,'ks','MarkerFaceColor','c','MarkerSize',15) % plot(JH380060BG,Bmin380060BG,'ks','MarkerFaceColor','g','MarkerSize',15) % plot(JH380080BG,Bmin380080BG,'ks','MarkerFaceColor','y','MarkerSize',15) % xlabel('\it\bfJ_H\rm\bf (x10^1^7 Am^-^2)','fontsize',18,'fontname','times'); % ylabel('\it\bfB_m_i_n\rm\bf (x10^-4 T/\surdHz)','fontsize',18) % set(gca,'fontsize',25,'fontname','times','linewidth',1.5,'fontweight','bold','ticklength',[0.0125 0.01]);box on; % set(gcf,'color','w'); % Leg1={'5.2x10^1^6 m^-^2','4.1x10^1^6 m^-^2','3.7x10^1^6 m^-^2','2.7x10^1^6 m^-^2','1.9x10^1^6 m^-^2'};legend(Leg1,'Location','best'); %%Bmin % Bmin315002uA=[Bmin315000BG(1),Bmin3150020BG(1),Bmin3150040BG(1),Bmin3150060BG(1),Bmin3150080BG(1),Bmin31500100BG(1),Bmin31500110BG(1)]; % figure;plot(n31500*1.6e-19,Bmin315002uA,'rh','MarkerSize',18,'MarkerFaceColor',[1.0 0 0]) % set(gcf,'color','w'); % box on; % ylabel('\bf\itB_m_i_n\rm\bf (T/\surdHz)','fontsize',18) % xlabel('Charge-Carrier concentration/ Cm^-^2','fontsize',18) % set(gca,'fontsize',25,'fontname','times','linewidth',1.5,'fontweight','bold','ticklength',[0.0125 0.01]);box on;