Esempio n. 1
0
def t2_leaky():
    """
    T2 EDTS layer next to air.
    """
    # Create structure
    st = LifetimeTmm()
    st.set_vacuum_wavelength(lam0)
    st.add_layer(2 * lam0, sio2)
    st.add_layer(d_etds, edts)
    st.add_layer(2 * lam0, air)
    st.info()

    # Calculate spontaneous emission for leaky and guided modes
    result = st.calc_spe_structure_leaky(th_pow=9)
    z = result['z']
    z = st.calc_z_to_lambda(z)
    spe = result['spe']

    # 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/t2_leaky.png', dpi=300)
    plt.show()
Esempio n. 2
0
def t2_fig4():
    """
    Silicon to air semi-infinite half spaces.
    """
    # Create structure
    st = LifetimeTmm()
    st.set_vacuum_wavelength(lam0)
    st.add_layer(2 * lam0, sio2)
    st.add_layer(d_etds, edts)
    st.add_layer(2 * lam0, air)
    st.info()

    # Calculate spontaneous emission over whole structure
    result = st.calc_spe_structure_leaky(th_pow=9)
    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')
    ax2.legend(title='Vertical Dipoles')

    fig.tight_layout()
    if SAVE:
        plt.savefig('../Images/t2_fig4.png', dpi=300)
    plt.show()
Esempio n. 3
0
def fig4():
    """ n=3 or n=1 (air) to n=1.5 (Erbium deposition) semi-infinite half spaces.
    Plot the average total spontaneous emission rate of dipoles as a function of
    distance from the interface.
    """
    # Vacuum wavelength
    lam_vac = 1550
    # Plotting units
    units = lam_vac / (2 * pi)

    # Create plot
    f, ax = plt.subplots(figsize=(15, 7))

    for n in [1, 3]:
        print('Evaluating n={:g}'.format(n))
        # Create structure
        st = LifetimeTmm()
        st.set_vacuum_wavelength(lam_vac)
        st.add_layer(4 * units, n)
        st.add_layer(4 * units, 1.5)
        st.info()
        # Calculate spontaneous emission over whole structure
        result = st.calc_spe_structure_leaky()
        z = result['z']
        # Shift so centre of structure at z=0
        z -= st.get_structure_thickness() / 2
        spe = result['spe']['total']
        # Plot spontaneous emission rates
        ax.plot(z/units, spe, label=('n='+str(n)), lw=2)
        ax.axhline(y=n, xmin=0, xmax=0.4, ls='dotted', color='k', lw=2)

        # Plot internal layer boundaries
        for z in st.get_layer_boundaries()[:-1]:
            # Shift so centre of structure at z=0
            z -= st.get_structure_thickness() / 2
            ax.axvline(z/units, color='k', lw=2)

    ax.axhline(1.5, ls='--', color='k', lw=2)
    ax.set_title('Spontaneous emission rate at boundary for semi-infinite media. RHS n=1.5.')
    ax.set_ylabel('$\Gamma / \Gamma_0$')
    ax.set_xlabel('Position z ($\lambda$/2$\pi$)')
    plt.legend()
    plt.tight_layout()
    if SAVE:
        plt.savefig('../Images/spe_vs_n.png', dpi=300)
    plt.show()
Esempio n. 4
0
def spe():
    st = LifetimeTmm()
    st.set_vacuum_wavelength(lam0)

    # Add layers
    # st.add_layer(lam0, 1)
    st.add_layer(lam0, si)
    st.add_layer(lam0, air)
    st.add_layer(lam0, si)
    # st.add_layer(lam0, 1)

    # Get results
    result = st.calc_spe_structure_leaky()
    z = result['z']
    spe = result['spe']
    spe_TE = spe['TE_total']
    spe_TM_p = spe['TM_p_total']
    spe_TM_s = spe['TM_s_total']

    # Plot spe 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')

    ax1.set_title('Spontaneous Emission Rate. LHS n=3.48, RHS n=1.')
    ax1.set_ylabel('$\Gamma / \Gamma_0$')
    ax2.set_ylabel('$\Gamma /\Gamma_0$')
    ax2.set_xlabel('Position in layer (nm)')

    ax1.axhline(y=1, linestyle='--', color='k')
    ax2.axhline(y=1, linestyle='--', color='k')
    # Plot layer boundaries
    for z in st.get_layer_boundaries()[:-1]:
        ax1.axvline(z, color='k', lw=2)
        ax2.axvline(z, color='k', lw=2)
    ax1.legend(title='Horizontal Dipoles')
    ax2.legend(title='Vertical Dipoles')
    plt.show()
Esempio n. 5
0
def example1():
    """ Silicon to air semi-infinite half spaces.
    """
    # Vacuum wavelength
    lam0 = 1550

    n_list = np.linspace(1, 2, 3)
    spe_list = []
    for n in n_list:
        print('Evaluating n={}'.format(n))
        # Create structure
        st = LifetimeTmm()
        st.set_vacuum_wavelength(lam0)
        st.add_layer(1550, 1.5)
        st.add_layer(1550, n)
        # Calculate spontaneous emission over whole structure
        result = st.calc_spe_structure_leaky()
        z = result['z']
        spe = result['spe']['total']

        # Only get spe rates in the active layer and then average
        ind = np.where(z <= 1550)
        spe = spe[ind]
        spe = np.mean(spe) - 1.5
        spe_list.append(spe)

    spe_list = np.array(spe_list)
    # Plot spontaneous emission rates vs n
    f, ax = plt.subplots(figsize=(15, 7))
    ax.plot(n_list, spe_list)

    ax.set_title('Average spontaneous emission rate over doped layer (d=1550nm) compared to bulk.')
    ax.set_ylabel('$\Gamma / \Gamma_1.5$')
    ax.set_xlabel('n')
    plt.legend()
    plt.tight_layout()
    if SAVE:
        plt.savefig('../Images/spe_vs_n.png', dpi=300)
        np.savez('../Data/spe_vs_n', n=n_list, spe=spe_list)
    plt.show()