DataFile1 = "SiR.csv" DataFile2 = "GeR.csv" DataFile3 = "InGaAsStandardR.csv" set datafile separator "," set xlabel "Wavelength (nm)" font ",12" set ylabel "Responsitivity (A/W)" font ",12" set ytics set xrange [400:1800] set yrange [0:1.7] set tics font ",12" plot DataFile1 using 1:2 with lines lw 3 axis x1y1 title "Si",DataFile2 using 1:2 with lines lw 3 axis x1y1 title "Ge",DataFile3 using 1:2 with lines lw 3 axis x1y1 title "InGaAs" PI = 3.1415926535 y0 = 0 # is the baseline offset. xc = 1300 # is the center of the peak. w = 500 # equals the width of the peak at half height. A = 1000 # is the area under the peak. f(x)=y0 + (2*A/PI)*(w/(4*(x-xc)**2 + w**2)) set xrange [400:1800] plot f(x) PI = 3.1415926535 y01 = 0 # is the baseline offset. xc1 = 1000 # is the center of the peak. w1 = 500 # equals the width of the peak at half height. A1 = 100 # is the area under the peak. xc2 = 1200 # is the center of the peak. w2 = 500 # equals the width of the peak at half height. A2 = 100 # is the area under the peak. xc3 = 1400 # is the center of the peak. w3 = 500 # equals the width of the peak at half height. A3 = 800 # is the area under the peak. xc4 = 1500 # is the center of the peak. w4 = 500 # equals the width of the peak at half height. A4 = 800 # is the area under the peak. xc5 = 1600 # is the center of the peak. w5 = 500 # equals the width of the peak at half height. A5 = 100 # is the area under the peak. f(x)=y01 + (2*A1/PI)*(w1/(4*(x-xc1)**2 + w1**2)) + (2*A2/PI)*(w2/(4*(x-xc2)**2 + w2**2)) + (2*A3/PI)*(w3/(4*(x-xc3)**2 + w3**2))+ (2*A4/PI)*(w4/(4*(x-xc4)**2 + w4**2))+ (2*A5/PI)*(w5/(4*(x-xc5)**2 + w5**2)) set xrange [400:1800] plot f(x) DataFile3 = "InGaAsStandardR.cvs" set datafile separator "," set xrange [400:1800] fit f(x) DataFile3 using 1:2 via xc1, w1, A1, xc2, w2, A2, xc3, w3, A3, xc4, w4, A4, xc5, w5, A5 plot f(x), DataFile3 using 1:2 with lines lw 3 axis x1y1 title "InGaAs" SiR alpha = 0.5 mu = 700.0 sig = 300.0 n = 4.0 xcs = 500.0 k = 0.007 g(x)= alpha * exp(-((x - mu)**2 / (2 * sig**2))**n)/(1+exp(-k*(x-xcs))) s(x)=1/(1+exp(-k*(x-xcs))) DataFile1 = "SiR.csv" set datafile separator "," set xrange [400:1200] fit g(x) DataFile1 using 1:2 via alpha, mu, sig, n, xcs, k set xtics font ",24" set ytics font ",24" set xlabel "Wavelength (nm)" font ",24" set ylabel "Responsivity (A/W)" font ",24" set key font ",24" set term svg set output "Si_responsivityFit.svg" plot g(x) lw 3, DataFile1 using 1:2 with lines lw 2 axis x1y1 title "Si",s(x) Final set of parameters Asymptotic Standard Error ======================= ========================== alpha = 4.06484 +/- 14.03 (345.2%) mu = 671.926 +/- 2.272 (0.3381%) sig = 209.564 +/- 3.957 (1.888%) n = 1.76504 +/- 0.04197 (2.378%) xcs = 1835.83 +/- 2602 (141.7%) k = 0.00183068 +/- 0.0007681 (41.96%) Ge alpha = 1.0 mu = 1200.0 sig = 300.0 n = 4.0 xcs = 300.0 k = 0.007 g(x)= alpha * exp(-((x - mu)**2 / (2 * sig**2))**n)/(1+exp(-k*(x-xcs))) s(x)=1/(1+exp(-k*(x-xcs))) DataFile2 = "GeR.csv" set datafile separator "," set xrange [800:1800] set yrange [0:1.1] fit g(x) DataFile2 using 1:2 via alpha, mu, sig, n, xcs, k set xtics font ",24" set ytics font ",24" set xlabel "Wavelength (nm)" font ",24" set ylabel "Responsivity (A/W)" font ",24" set key font ",24" set term svg set output "Ge_responsivityFit.svg" plot g(x) lw 3, DataFile2 using 1:2 with lines lw 2 axis x1y1 title "Ge" Final set of parameters Asymptotic Standard Error ======================= ========================== alpha = 3.45269 +/- 16.64 (481.8%) mu = 1168.53 +/- 32.04 (2.742%) sig = 376.363 +/- 41.36 (10.99%) n = 2.01975 +/- 0.3903 (19.33%) xcs = 2106.83 +/- 4654 (220.9%) k = 0.00162619 +/- 0.001793 (110.3%) InGaAsStandardR alpha = 1.0 mu = 1300.0 sig = 300.0 n = 4.0 xcs = 1200.0 k = 0.007 g(x)= alpha * exp(-((x - mu)**2 / (2 * sig**2))**n)/(1+exp(-k*(x-xcs))) s(x)=1/(1+exp(-k*(x-xcs))) DataFile3 = "InGaAsStandardR.cvs" set datafile separator "," set xrange [800:1800] set yrange [0:1.4] fit g(x) DataFile3 using 1:2 via alpha, mu, sig, n, xcs, k set xtics font ",24" set ytics font ",24" set xlabel "Wavelength (nm)" font ",24" set ylabel "Responsivity (A/W)" font ",24" set key font ",24" set term svg set output "InGaAs_responsivityFit.svg" plot g(x) lw 3, DataFile3 using 1:2 with lines lw 2 axis x1y1 title "InGaAs",s(x) Final set of parameters Asymptotic Standard Error ======================= ========================== alpha = 1.20747 +/- 0.02844 (2.355%) mu = 1261.59 +/- 2.98 (0.2362%) sig = 299.896 +/- 2.142 (0.7142%) n = 11.6189 +/- 0.518 (4.459%) xcs = 1085.17 +/- 11.84 (1.092%) k = 0.00535154 +/- 0.0003109 (5.809%) s(x)=1/(1+exp(-k*(x-xcs))) mu = 0.0 sig = 1.0 lambda = 0.25 n=2 set xrange [-10:10] e(x)=lambda/2*exp(lambda/2*(2*mu+lambda*sig**2+2*x**n))*(1-erf((mu+lambda*sig**2+x**n/(sqrt(2)*sig)))) e(x)=lambda/2*exp(lambda/2*(2*mu+lambda*sig**2-2*x))*erfc((mu+lambda*sig**2-x)/(sqrt(2)*sig)) set xrange [400:1800] plot e(x) e(x) = erfc((mu+lambda*sig**2-x)/(sqrt(2)*sig)) PI = 3.1415926535 y0 = 0 # is the baseline offset. xc = 1300 # is the center of the peak. w = 500 # equals the width of the peak at half height. A = 1400 # is the area under the peak. L = 0.3 T= 1E-9 alpha = 4E6 xcex = 1000 f(x)=(y0 + (2*A/PI)*(w/(4*(x-xc)**2 + w**2)))**3*(L+(1-L)/exp(alpha*T)*(exp(alpha*(x-xcex)*1E-9)-1)) set xrange [400:1800] DataFile3 = "InGaAsStandardR.cvs" set datafile separator "," fit f(x) DataFile3 using 1:2 via xc, w, A, L, T, alpha, xcex plot f(x), DataFile3 using 1:2 with lines lw 3 axis x1y1 title "InGaAs" p0=0 p4=-1E-4 xcp=1300 p(x)=p0+p4*(x-xcp)**4 DataFile3 = "InGaAsStandardR.cvs" set datafile separator "," plot p(x), DataFile3 using 1:2 with lines lw 3 axis x1y1 title "InGaAs"