In [1]:
%%html
<script type="text/javascript">
show=true;
function toggle(){
if (show){$('div.input').hide();}else{$('div.input').show();}
show = !show}
</script>
<h2><a href="javascript:toggle()" target="_self">Click to toggle code input</a></h2>
In [2]:
%pylab inline
In [3]:
import seaborn as sns
sns.set_context("notebook", font_scale=1.5, rc={"lines.linewidth": 2.5})
cmap = sns.cubehelix_palette(light=1, as_cmap=True)
sns.palplot(sns.cubehelix_palette(light=1))
In [4]:
import pandas as pd
In [5]:
df = pd.read_csv('../data/cln_20130218_cary5000.csv')
df.set_index('wavelength', inplace=True)
df.head()
Out[5]:
In [6]:
plt.figure(figsize=(12,20));
sns.heatmap(df.iloc[::2,2:-3], vmin=0, vmax=55);
plt.yticks(rotation=0);
plt.title(u'Transmission through bonded Si');
In [7]:
#sns.set_context("paper", font_scale=2.0)
plt.figure(figsize=(5, 4));
plt.plot(df.index, df.VG03_pos1/df.VG06_post);
#plt.plot(df.wavelength, df.VG06);
#plt.plot(df.wavelength, df.VG06_post);
plt.ylim(0,1);
plt.xlim(1200,2500);
plt.xlabel('$\lambda$ (nm)')
plt.ylabel('Gap Transmission');
In [8]:
@vectorize
def sellmeier_Si(lam_nm):
''' return the Si refractive index, n, for a given wavelength
the default temperature is 295.0 K
Sellmeier coeffs are from Frey et al. 2006 (NASA CHARMS group)
Relationship is valid are valid over the range:
20<T<300
1.1< wl <5.6
lam can be a vector or scalar
'''
t_k = 295.0
lam_um = lam_nm/1000.0
if (lam_um < 1.0) or (lam_um > 5.6):
raise Exception
#if (t_K < 20) or (t_K > 400):
# raise Exception
s1j = [10.4907,-2.08020E-04,4.21694E-06,-5.82298E-09,3.44688E-12]
s2j = [-1346.61,29.1664,-0.278724,1.05939E-03,-1.35089E-06]
s3j = [4.42827E+07,-1.76213E+06,-7.61575E+04,678.414,103.243]
s1 = np.polynomial.polynomial.polyval(t_k, s1j)
s2 = np.polynomial.polynomial.polyval(t_k, s2j)
s3 = np.polynomial.polynomial.polyval(t_k, s3j)
l1j = [0.299713,-1.14234E-05,1.67134E-07,-2.51049E-10,2.32484E-14]
l2j = [-3.51710E+03,42.3892,-0.357957,1.17504E-03,-1.13212E-06]
l3j = [1.71400E+06,-1.44984E+05,-6.90744E+03,-39.3699,23.5770]
l1 = np.polynomial.polynomial.polyval(t_k, l1j)
l2 = np.polynomial.polynomial.polyval(t_k, l2j)
l3 = np.polynomial.polynomial.polyval(t_k, l3j)
l_2 = lam_um**2
n2 = 1.0 + (s1*l_2/(l_2-l1**2)) + (s2*l_2/(l_2-l2**2)) + (s3*l_2/(l_2-l3**2))
n=np.sqrt(n2)
return n
In [9]:
df['n_Si'] = sellmeier_Si(df.index)
In [10]:
@vectorize
def T_gap_Si(lam_nm, dgap_nm):
''' return the Transmission spectrum for a given axial extent of Air gap in Si
Transmission is absolute
'''
# Determine the refractive index
n1 = sellmeier_Si(lam_nm)
#Silicon reflectance (Fresnel losses at 1 interface)
R0 = ((n1-1.0)/(n1+1.0))**2.0
#Coefficient of Finesse
F = 4.0*R0/(1.0-R0)**2.0
delta = 2.0*3.141592654*dgap_nm/lam_nm
T_net=2.0*n1/(1.0+2.0*n1*F*sin(delta)**2.0+n1**2.0)
T_old=1.0/(1.0+F*np.sin(delta)**2.0)
return T_net
In [11]:
sns.set_context("paper", font_scale=1.5)
sns.set(style="ticks")
plt.figure(figsize=(5, 4));
plt.step(df.index, df.VG06/100.0, linestyle='--',label='Bare Si measurement');
plt.step(df.index, df.VG03_pos1/100.0, label='VG03 measurement');
plt.plot(df.index, T_gap_Si(df.index, 3967.0),
linestyle=':',color=sns.xkcd_rgb["pale red"], label='d = 3967 nm model');
#plt.plot(df.wavelength, df.VG06);
#plt.plot(df.wavelength, df.VG06_post);
plt.ylim(0,0.55);
plt.xlim(1200,2500);
plt.xlabel('$\lambda$ (nm)')
plt.ylabel('Transmission');
plt.legend(loc='best');
plt.savefig('VG03_model.pdf')
In [12]:
def T_gap_Si_withFF(wl_nm, d_gap, ff):
'''computes weighted average model for a given gap size and fill factor
*inputs*
wl: wavelength in nm
d_gap: axial extent of the gap in nm
ff: fill factor of gap area as a fraction (0<ff<1)
'''
return ff*T_gap_Si(wl_nm, d_gap) + (1.0-ff)*T_gap_Si(wl_nm, 0.0)
In [13]:
sns.set_context("paper", font_scale=1.5)
sns.set(style="ticks")
plt.figure(figsize=(5, 4));
plt.step(df.index, df.VG06/df.VG06, linestyle='--',label='Bare Si measurement');
plt.step(df.index, df.VG03_pos2/df.VG06, label='VG03 measurement');
d_gap = 4120.0
ff = 0.045
plt.plot(df.index, T_gap_Si_withFF(df.index, d_gap, ff)/T_gap_Si(df.index, 0.0),
linestyle=':',color=sns.xkcd_rgb["pale red"], label='d = {0} nm, \nf = {1} model'.format(d_gap, ff, '4i', '4.3f'));
plt.ylim(0.9, 1.01);
plt.xlim(1200,2500);
plt.xlabel('$\lambda$ (nm)')
plt.ylabel('Normalized Gap Transmission');
plt.legend(loc='best');
plt.savefig('VG03_model_ff.pdf')
In [14]:
sns.set_context("paper", font_scale=1.5)
sns.set(style="ticks")
plt.figure(figsize=(5, 4));
plt.step(df.index, df.VG06/df.VG06, linestyle='--',label='Bare Si measurement');
plt.step(df.index, df.VG02_pos3/df.VG06, label='VG02 measurement');
plt.plot(df.index, T_gap_Si(df.index, 20.0)/T_gap_Si(df.index, 0.0),
linestyle=':',color=sns.xkcd_rgb["pale red"], label='d = 20 nm model');
#plt.plot(df.wavelength, df.VG06);
#plt.plot(df.wavelength, df.VG06_post);
plt.ylim(0.9,1.01);
plt.xlim(1200,2500);
plt.xlabel('$\lambda$ (nm)')
plt.ylabel('Transmission');
plt.legend(loc='best');
plt.savefig('VG02_model.pdf')
In [ ]: