def supplementary_material1(): """ SE rate for Silicon to air semi-infinite half spaces.""" # """Plot leaky and guided SE rates and then sum for randomly orientated dipole.""" # WIDTH = 412.56 # the number (in pt) latex spits out when typing: \the\linewidth (paper 246, thesis 412.56) # FACTOR = 0.8 # the fraction of the width you'd like the figure to occupy lam0 = 1540 # Create structure st = SPE() st.add_layer(0.05 * lam0, 3.48) st.add_layer(50, 2) st.add_layer(0.05 * lam0, 1) st.set_vacuum_wavelength(lam0) st.info() # Calculate res = st.calc_spe_structure(th_pow=11) z = res['z'] # Convert z into z/lam0 and center z = st.calc_z_to_lambda(z) # ------- Plots ------- # Plot data fig, ax1 = plt.subplots() ax1.plot(z, res['leaky']['avg'], label='Avg') ax1.plot(z, res['leaky']['parallel'], '--', label=r'$\parallel$') ax1.plot(z, res['leaky']['perpendicular'], '-.', label=r'$\bot$') ax1.set_ylabel('$\Gamma / \Gamma_0$') ax1.set_xlabel('Position z [$\lambda$]') ax1.legend(fontsize='small') ax1.set_ylim(0, ax1.get_ylim()[1]) bounds = ax1.get_ylim() # Draw rectangles for the refractive index ax2 = ax1.twinx() for z0, dz, n in zip(st.d_cumulative, st.d_list, st.n_list): z0 = st.calc_z_to_lambda(z0) dz = st.calc_z_to_lambda(dz, center=False) rect = Rectangle((z0 - dz, 0), dz, n.real, facecolor='c', alpha=0.15) ax2.add_patch(rect) # Note: add to ax1 so that zorder has effect ax2.set_ylabel('n') ax2.set_ylim(bounds) ax1.set_zorder(ax2.get_zorder() + 1) # put ax1 in front of ax2 ax1.patch.set_visible(False) # hide ax1'canvas' for zb in st.get_layer_boundaries()[:-1]: zb = st.calc_z_to_lambda(zb) ax1.axvline(x=zb, color='k', lw=2) ax1.set_xlim([min(z), max(z)]) if SAVE: plt.savefig('../Images/SupplementaryMaterial1') plt.show()
def fig4(): """ Silicon to air semi-infinite half spaces. """ # Create structure st = SPE() st.add_layer(lam0, si) st.add_layer(lam0, air) st.set_vacuum_wavelength(lam0) st.info() # Calculate spontaneous emission over whole structure result = st.calc_spe_structure_leaky(th_pow=10) z = result['z'] spe = result['spe'] # Convert z into z/lam0 and center z = st.calc_z_to_lambda(z) # Plot spontaneous emission rates fig, (ax1, ax2) = plt.subplots(1, 2, sharey='row', figsize=(15, 5)) ax1.plot(z, (spe['TM_p_lower'] + spe['TE_lower']) / (spe['TE'] + spe['TM_p']), label='Lower') ax1.plot(z, (spe['TM_p_upper'] + spe['TE_upper']) / (spe['TE'] + spe['TM_p']), label='Upper') ax2.plot(z, (spe['TM_s_lower']) / spe['TM_s'], label='Lower') ax2.plot(z, (spe['TM_s_upper']) / spe['TM_s'], label='Upper') # Plot internal layer boundaries for z in st.get_layer_boundaries()[:-1]: ax1.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax2.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax1.set_ylim(0, 1.1) ax1.set_title('Spontaneous Emission Rate. LHS n=3.48, RHS n=1.') ax1.set_ylabel('$\Gamma / \Gamma_0$') ax1.set_xlabel('z/$\lambda$') ax2.set_xlabel('z/$\lambda$') ax1.legend(title='Horizontal Dipoles', fontsize='small') ax2.legend(title='Vertical Dipoles', fontsize='small') fig.tight_layout() if SAVE: plt.savefig('../Images/creatore_fig4') plt.show()
def fig6(): """ Silicon layer bounded by two semi infinite air claddings. """ # Create structure st = SPE() st.add_layer(2.5 * lam0, air) st.add_layer(lam0, si) st.add_layer(2.5 * lam0, air) st.set_vacuum_wavelength(lam0) st.info() # Calculate spontaneous emission over whole structure result = st.calc_spe_structure_leaky() z = result['z'] spe = result['spe'] # Convert z into z/lam0 and center z = st.calc_z_to_lambda(z) # Plot spontaneous emission rates fig = plt.figure() ax1 = fig.add_subplot(211) ax1.plot(z, spe['TE'], label='TE') ax1.plot(z, spe['TM_p'], label='TM') ax1.plot(z, spe['TE'] + spe['TM_p'], 'k', label='TE + TM') ax2 = fig.add_subplot(212) ax2.plot(z, spe['TM_s'], label='TM') # Plot layer boundaries for z in st.get_layer_boundaries()[:-1]: ax1.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax2.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax1.set_ylim(0, 1.4) ax2.set_ylim(0, 1.4) ax1.set_title( 'Spontaneous Emission Rate. Silicon (n=3.48) with air cladding (n=1.)') ax1.set_ylabel('$\Gamma / \Gamma_0$') ax2.set_ylabel('$\Gamma /\Gamma_0$') ax2.set_xlabel('z/$\lambda$') ax1.legend(title='Horizontal Dipoles', loc='lower right', fontsize='medium') ax2.legend(title='Vertical Dipoles', loc='lower right', fontsize='medium') if SAVE: plt.savefig('../Images/creatore_fig6') plt.show()
def fig9(): """ Silicon layer bounded by two semi infinite air claddings. """ # Create structure st = SPE() st.add_layer(2.5 * lam0, sio2) st.add_layer(lam0, si) st.add_layer(2.5 * lam0, air) st.set_vacuum_wavelength(lam0) st.info() # Calculate spontaneous emission over whole structure result = st.calc_spe_structure_leaky() z = result['z'] spe = result['spe'] # Convert z into z/lam0 and center z = st.calc_z_to_lambda(z) # Plot spontaneous emission rates fig = plt.figure() ax1 = fig.add_subplot(211) ax1.plot(z, spe['TE'], label='TE') ax1.plot(z, spe['TM_p'], label='TM') ax1.plot(z, spe['TE'] + spe['TM_p'], 'k', label='TE + TM') ax2 = fig.add_subplot(212) ax2.plot(z, spe['TM_s'], label='TM') # Plot layer boundaries for z in st.get_layer_boundaries()[:-1]: ax1.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax2.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax1.set_ylim(0, 2) ax2.set_ylim(0, 3) ax1.set_title( 'The spatial dependence of the normalized spontaneous emission rate \n' 'into leaky modes for asymmetric Silicon waveguide (SiO2/Si/air).') ax1.set_ylabel('$\Gamma / \Gamma_0$') ax2.set_ylabel('$\Gamma /\Gamma_0$') ax2.set_xlabel('z/$\lambda$') ax1.legend(title='Horizontal Dipoles', loc='upper right', fontsize='small') ax2.legend(title='Vertical Dipoles', loc='upper right', fontsize='small') if SAVE: plt.savefig('../Images/creatore_fig9') plt.show()
def fig13b(): """ Silicon layer bounded by two semi infinite air claddings. """ # Create structure st = SPE() # st.add_layer(1e3, si) st.add_layer(1900, sio2) st.add_layer(100, si) st.add_layer(20, sio2) st.add_layer(100, si) st.add_layer(1e3, air) st.set_vacuum_wavelength(lam0) st.info() # Calculate spontaneous emission over whole structure result = st.calc_spe_structure_guided() z = result['z'] spe = result['spe'] # Convert z into z/lam0 and center z = st.calc_z_to_lambda(z) # Plot spontaneous emission rates fig = plt.figure() ax1 = fig.add_subplot(111) ax1.plot(z, spe['TE'], label=r'$\Gamma^{\mathrm{TE}}$') ax1.plot(z, spe['TM_p'], label=r'$\Gamma^{\mathrm{TM}}_∥$') ax1.plot(z, spe['TM_s'], label=r'$\Gamma^{\mathrm{TM}}_⊥$') ax1.plot(z, spe['avg'], label=r'total') ax1.legend() # Plot layer boundaries for z in st.get_layer_boundaries()[:-1]: ax1.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax1.set_ylim(0, 16) ax1.set_xlim(0, 0.5) # ax1.set_title('The spatial dependence of the normalized spontaneous emission rate \n' # 'into leaky modes for asymmetric Silicon waveguide (SiO2/Si/air).') ax1.set_ylabel('$\Gamma / \Gamma_0$') ax1.set_xlabel('z/$\lambda$') if SAVE: plt.savefig('../Images/creatore_fig13b') plt.show()
def fig8(): # Create structure st = SPE() st.add_layer(1.5 * lam0, sio2) st.add_layer(lam0, si) st.add_layer(1.5 * lam0, air) st.set_vacuum_wavelength(lam0) st.info() # Do Simulation result = st.calc_spe_structure_guided() z = result['z'] spe = result['spe'] # Convert z into z/lam0 and center z = st.calc_z_to_lambda(z) # Plot results fig, (ax1, ax2) = plt.subplots(2, 1, sharex='col', sharey='none') ax1.plot(z, spe['TE'], label='TE') ax1.plot(z, spe['TM_p'], label='TM') ax1.plot(z, spe['TE'] + spe['TM_p'], label='TE + TM') ax2.plot(z, spe['TM_s'], label='TM') for z in st.get_layer_boundaries()[:-1]: z = st.calc_z_to_lambda(z) ax1.axvline(x=z, color='k', lw=1, ls='--') ax2.axvline(x=z, color='k', lw=1, ls='--') ax1.set_ylim(0, 4) ax2.set_ylim(0, 5) ax1.set_title( 'The spatial dependence of the normalized spontaneous emission rate \n' 'into guided modes for asymmetric Silicon waveguide (SiO2/Si/air).') ax1.set_ylabel('$\Gamma / \Gamma_0$') ax2.set_ylabel('$\Gamma /\Gamma_0$') ax2.set_xlabel('z/$\lambda$') ax1.legend(title='Horizontal Dipoles', fontsize='small') ax2.legend(title='Vertical Dipoles', fontsize='small') fig.tight_layout() if SAVE: plt.savefig('../Images/creatore_fig8') plt.show()
def fig5(): # Create structure st = SPE() st.add_layer(1.5 * lam0, air) st.add_layer(lam0, si) st.add_layer(1.5 * lam0, air) st.set_vacuum_wavelength(lam0) st.info() result = st.calc_spe_structure_guided() z = result['z'] spe = result['spe'] # Convert z into z/lam0 and center z = st.calc_z_to_lambda(z) fig, (ax1, ax2) = plt.subplots(2, 1, sharex='col', sharey='none') ax1.plot(z, spe['TE'], label='TE') ax1.plot(z, spe['TM_p'], label='TM') ax1.plot(z, spe['TE'] + spe['TM_p'], label='TE + TM') ax2.plot(z, spe['TM_s'], label='TM') for z in st.get_layer_boundaries()[:-1]: ax1.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax2.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') # ax1.set_ylim(0, 4) # ax2.set_ylim(0, 6) ax1.set_title('Spontaneous Emission Rate. Core n=3.48, Cladding n=1.') ax1.set_ylabel('$\Gamma / \Gamma_0$') ax2.set_ylabel('$\Gamma /\Gamma_0$') ax2.set_xlabel('z/$\lambda$') size = 12 ax1.legend(title='Horizontal Dipoles', prop={'size': size}) ax2.legend(title='Vertical Dipoles', prop={'size': size}) fig.tight_layout() if SAVE: plt.savefig('../Images/creatore_fig5') plt.show()
def example3(): """ SE rate for Silicon to air semi-infinite half spaces.""" # """Plot leaky and guided SE rates and then sum for randomly orientated dipole.""" lam0 = 1540 # Create structure st = SPE() st.add_layer(0.5 * lam0, 1.45) st.add_layer(100, 1.65) st.add_layer(500, 1.45) st.add_layer(0.5 * lam0, 1) st.set_vacuum_wavelength(lam0) st.info() # Calculate res = st.calc_spe_structure(th_pow=11) z = res['z'] # Convert z into z/lam0 and center z = st.calc_z_to_lambda(z) # ------- Plots ------- # Plot data fig, ax1 = plt.subplots() if st.supports_guiding(): ax1.plot(z, res['leaky']['avg'] + res['guided']['avg'], label='Avg') ax1.plot(z, res['leaky']['parallel'] + res['guided']['parallel'], '--', label=r'$\parallel$') ax1.plot(z, res['leaky']['perpendicular'] + res['guided']['perpendicular'], '-.', label=r'$\bot$') else: ax1.plot(z, res['leaky']['avg'], label='Avg') ax1.plot(z, res['leaky']['parallel'], '--', label=r'$\parallel$') ax1.plot(z, res['leaky']['perpendicular'], '-.', label=r'$\bot$') ax1.set_ylabel('$\Gamma / \Gamma_0$') ax1.set_xlabel('Position z [$\lambda$]') ax1.legend(fontsize='small') ax1.set_ylim(0, ax1.get_ylim()[1]) bounds = ax1.get_ylim() # Draw rectangles for the refractive index ax2 = ax1.twinx() for z0, dz, n in zip(st.d_cumulative, st.d_list, st.n_list): z0 = st.calc_z_to_lambda(z0) dz = st.calc_z_to_lambda(dz, center=False) rect = Rectangle((z0 - dz, 0), dz, n.real, facecolor='c', alpha=0.15) ax2.add_patch(rect) # Note: add to ax1 so that zorder has effect ax2.set_ylabel('n') ax2.set_ylim(bounds) ax1.set_zorder(ax2.get_zorder() + 1) # put ax1 in front of ax2 ax1.patch.set_visible(False) # hide ax1'canvas' for zb in st.get_layer_boundaries()[:-1]: zb = st.calc_z_to_lambda(zb) ax1.axvline(x=zb, color='k', lw=2) ax1.set_xlim([min(z), max(z)]) if SAVE: plt.savefig('../Images/Air') plt.show()
def example1(): """ SE rate for Silicon to air semi-infinite half spaces.""" from lifetmm.SPE import SPE import pandas as pd from lifetmm.Materials import n_1540nm as sample """Plot leaky and guided SE rates and then sum for randomly orientated dipole.""" # Load Sample Data df = pd.read_csv('../Data/Screening.csv', index_col='Sample ID') n = df.loc[sample]['n'] d = df.loc[sample]['d'] * 1e3 # in nm not um chip = {'Sample ID': sample, 'n': n, 'd': d} # Create Structure st = SPE() st.set_vacuum_wavelength(lam0) st.add_layer(d_clad * lam0, n_dict['SiO2']) st.add_layer(chip['d'], chip['n']) st.add_layer(d_clad * lam0, n_dict['Air']) st.info() # Calculate res = st.calc_spe_structure(th_pow=11) z = res['z'] z = st.calc_z_to_lambda(z) # ------- Plots ------- fig, (ax1, ax2) = plt.subplots(2, 1, sharex='col', sharey='none') ax1.plot(z, res['leaky']['avg']) if st.supports_guiding(): ax2.plot(z, res['guided']['avg']) ax1.set_ylabel('$\Gamma / \Gamma_0$') ax2.set_ylabel('$\Gamma / \Gamma_0$') ax2.set_xlabel('Position z ($\lambda$)') ax1.set_title('Leaky') ax2.set_title('Guided') for zb in st.get_layer_boundaries()[:-1]: zb = st.calc_z_to_lambda(zb) ax1.axvline(x=zb, color='k', lw=2) ax2.axvline(x=zb, color='k', lw=2) # Draw rectangles for the refractive index ax1b = ax1.twinx() ax2b = ax2.twinx() for z0, dz, n in zip(st.d_cumulative, st.d_list, st.n_list): z0 = st.calc_z_to_lambda(z0) dz = st.calc_z_to_lambda(dz, center=False) rect = Rectangle((z0 - dz, 0), dz, n.real, facecolor='c', alpha=0.2) ax1b.add_patch(rect) ax1b.set_ylabel('n') ax1b.set_ylim(0, 1.5 * max(st.n_list.real)) rect = Rectangle((z0 - dz, 0), dz, n.real, facecolor='c', alpha=0.2) ax2b.add_patch(rect) ax2b.set_ylabel('n') ax2b.set_ylim(0, 1.5 * max(st.n_list.real)) ax1.set_zorder(ax1b.get_zorder() + 1) # put ax1 in front of ax2 ax1.patch.set_visible(False) # hide ax1'canvas' ax2.set_zorder(ax2b.get_zorder() + 1) # put ax1 in front of ax2 ax2.patch.set_visible(False) # hide ax1'canvas' if SAVE: plt.savefig('../Images/{}_individual'.format(chip['Sample ID'])) fig, ax1 = plt.subplots() if st.supports_guiding(): ax1.plot(z, res['leaky']['avg'] + res['guided']['avg'], label='Avg') else: ax1.plot(z, res['leaky']['avg'], label='Avg') ax1.set_ylabel('$\Gamma / \Gamma_0$') ax1.set_xlabel('Position z ($\lambda$)') ax1.legend() # Draw rectangles for the refractive index ax2 = ax1.twinx() for z0, dz, n in zip(st.d_cumulative, st.d_list, st.n_list): z0 = st.calc_z_to_lambda(z0) dz = st.calc_z_to_lambda(dz, center=False) rect = Rectangle((z0 - dz, 0), dz, n.real, facecolor='c', alpha=0.15) ax2.add_patch(rect) # Note: add to ax1 so that zorder has effect ax2.set_ylabel('n') ax2.set_ylim(0, 1.5 * max(st.n_list.real)) ax1.set_zorder(ax2.get_zorder() + 1) # put ax1 in front of ax2 ax1.patch.set_visible(False) # hide ax1'canvas' for zb in st.get_layer_boundaries()[:-1]: zb = st.calc_z_to_lambda(zb) ax1.axvline(x=zb, color='k', lw=2) if SAVE: plt.savefig('../Images/{}_total'.format(chip['Sample ID'])) plt.show()
def fig3(): """ Silicon to air semi-infinite half spaces. """ # Create structure st = SPE() st.add_layer(lam0, 1.45) st.add_layer(lam0, air) st.set_vacuum_wavelength(lam0) st.info() # Calculate spontaneous emission over whole structure result = st.calc_spe_structure_leaky() z = result['z'] spe = result['spe'] # Convert z into z/lam0 and center z = st.calc_z_to_lambda(z) # Plot spontaneous emission rates fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, sharex='col', sharey='row', figsize=(15, 7)) ax1.plot(z, spe['TE'], label='TE') ax1.plot(z, spe['TM_p'], label='TM') ax1.plot(z, spe['TE'] + spe['TM_p'], label='TE + TM') ax2.plot(z, spe['TE_lower_full'] + spe['TM_p_lower_full'], label='Fully radiative lower outgoing') ax2.plot(z, spe['TE_lower_partial'] + spe['TM_p_lower_partial'], label='Partially radiative lower outgoing') ax2.plot(z, spe['TE_upper'] + spe['TM_p_upper'], label='Fully radiative upper outgoing') ax3.plot(z, spe['TM_s'], label='TM') ax4.plot(z, spe['TM_s_lower_full'], label='Fully radiative lower outgoing') ax4.plot(z, spe['TM_s_lower_partial'], label='Partially radiative lower outgoing') ax4.plot(z, spe['TM_s_upper'], label='Fully radiative upper outgoing') # Plot internal layer boundaries for z in st.get_layer_boundaries()[:-1]: ax1.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax2.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax3.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax4.axvline(st.calc_z_to_lambda(z), color='k', lw=1, ls='--') ax1.set_ylim(0, 4) ax3.set_ylim(0, 6) ax1.set_title('Spontaneous Emission Rate. LHS n=3.48, RHS n=1.') ax1.set_ylabel('$\Gamma / \Gamma_0$') ax3.set_ylabel('$\Gamma /\Gamma_0$') ax3.set_xlabel('z/$\lambda$') ax4.set_xlabel('z/$\lambda$') ax1.legend(title='Horizontal Dipoles', fontsize='small') ax2.legend(title='Horizontal Dipoles', fontsize='small') ax3.legend(title='Vertical Dipoles', fontsize='small') ax4.legend(title='Vertical Dipoles', fontsize='small') fig.tight_layout() if SAVE: plt.savefig('../Images/creatore_fig3') plt.show()