# get chemical potential data graphene sheet on top of WG clear; load("graphene_electro-optic_modulator_2"); data2 = getresult("CHARGE::band_top","bandstructure"); V2 = data2.V_gate; Ef2 = pinch(data2.Efn - data2.Ei); # find Ef around mid point at y = 0 um y = data2.y; temp = find((y>-0.05e-6) & (y<0.05e-6)); Ef2 = sum(Ef2(temp,1:length(V2)),1)/length(temp); #plot(V2,Ef2); # model gr2 valid only for Ef > 0.05 temp = 0; temp = find(Ef2>0.05); V2 = V2(temp); Ef2 = Ef2(temp); #plot(V2,Ef2); load("graphene_electro-optic_modulator_1"); data1 = getresult("CHARGE::band_top","bandstructure"); V1 = data1.V_gate; Ef1 = pinch(data1.Efn - data1.Ei); # find Ef around mid point at y = 0 um y=0; y = data1.y; temp=0; temp = find((y>-0.05e-6) & (y<0.05e-6)); Ef1 = sum(Ef1(temp,1:length(V1)),1)/length(temp); #plot(V1,Ef1); # model gr1 valid only for Ef < 0.05 temp = 0; temp = find(Ef1<0.05); V1 = V1(temp); Ef1 = Ef1(temp); #plot(V1,Ef1); V2 = flip(V2,1); Ef2 = flip(Ef2,1); V = [V2 ; V1]; Ef_top = [Ef2 ; Ef1]; plot(V,Ef_top,"Drive Voltage [V]","Chemical potential [eV]"); f="mu_vs_voltage_top.txt"; # remove the file it if already exists if (fileexists(f)) { rm(f);} # write the file header write(f,"Drive Voltage [V], Chemical potential [eV]"); # write the data to the file for(i=1:length(V)){ # loop over the length of the data write(f,num2str(V(i))+", "+num2str(Ef_top(i))); } #mu_data = readdata("transmission_vs_myuc_original.txt"); #mu = mu_data(1:20,1); #T = mu_data(1:20,2); #plot(mu,T); #T_Vg = interp(T,mu,abs(Ef_top)); #plot(V,abs(Ef)); #paper = readdata("paper_data.txt"); #T_paper = paper(1:91,2); #V_paper = paper(1:91,1); #plot(V,T_Vg);