{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "from solcore.absorption_calculator import calculate_ellipsometry\n", "from solcore import material, si\n", "from solcore.structure import Structure, Layer" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First we defined a couple of materials, for example, GaAs and AlGAs" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "GaAs = material('GaAs')(T=300)\n", "AlGaAs = material('AlGaAs')(T=300, Al=0.3)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, let's build the structure. We don't add a substrate and assume that there is an infinitely thick absorbing
\n", "material in the back." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "my_structure = Structure([\n", " Layer(si(40, 'nm'), material=AlGaAs),\n", " Layer(si(3000, 'nm'), material=GaAs),\n", "])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We want to calculate the ellipsometry of this structure as a function of the wavelength for a few angles" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "wavelength = np.linspace(400, 1000, 200)\n", "angles = [65, 70, 75]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "out = calculate_ellipsometry(my_structure, wavelength, angle=angles)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This results must be taken with care. As the ellipsometry routine can only deal with coherent light, there might be
\n", "strange oscillations related with intereference in thick layers, something that should not happen.
\n", "Setting no_back_reflection=True (the default) should take care of most of this effects, but might add other unexpected
\n", "ones." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, ax1 = plt.subplots(1, 1)\n", "ax2 = ax1.twinx()\n", "\n", "ax1.plot(wavelength, out['psi'][:, 0], 'b', label=r'$\\Psi$')\n", "ax2.plot(wavelength, out['Delta'][:, 0], 'r', label=r'$\\Delta$')\n", "for i in range(1, len(angles)):\n", " ax1.plot(wavelength, out['psi'][:, i], 'b')\n", " ax2.plot(wavelength, out['Delta'][:, i], 'r')\n", "\n", "ax1.set_xlabel(\"Wavelength (nm)\")\n", "ax1.set_ylabel(r'$\\Psi$ (º)')\n", "ax2.set_ylabel(r'$\\Delta$ (º)')\n", "\n", "ax1.legend(loc=\"upper left\")\n", "ax2.legend(loc=\"upper right\")\n", "\n", "plt.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }