{ "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_rat\n", "from solcore.absorption_calculator.dielectric_constant_models import DielectricConstantModel, Drude, Poles" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "x = 2 * np.logspace(3, 4, 200)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Model parameters for three ITO layers grown at different temperatures. They have been obtained after fitting the
\n", "ellipsometry data." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "e_inf = [3.7883, 3.8915, 3.8982]\n", "A = [16.038, 36.556, 36.806]\n", "Br = [0.11112, 0.10413, 0.088618]\n", "label = ['150', '250', '350']\n", "ls = ['solid', 'dashed', 'dashdot']" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "for i in range(len(e_inf)):\n", "\n", " # We create the oscillators for each layer\n", " drud = Drude(An=A[i], Brn=Br[i])\n", "\n", " # Then we put them together inside a dielectric model\n", " model = DielectricConstantModel(e_inf=e_inf[i], oscillators=[drud])\n", "\n", " # We might want to calculate the RAT of the films\n", " out = calculate_rat([[300, model]], x)\n", " plt.figure(1)\n", " plt.plot(x/1000, out['R'], 'b', label='R ' + label[i], ls=ls[i])\n", " plt.plot(x/1000, out['A'], 'r', label='A ' + label[i], ls=ls[i])\n", " plt.plot(x/1000, out['T'], 'g', label='T ' + label[i], ls=ls[i])\n", "\n", " # And also want to know the n and k data\n", " n = model.n_and_k(x)\n", " plt.figure(2)\n", " plt.plot(x/1000, np.real(n), 'b', label='n ' + label[i], ls=ls[i])\n", " plt.plot(x/1000, np.imag(n), 'g', label='k ' + label[i], ls=ls[i])\n", "\n", "plt.figure(1)\n", "plt.xlabel('Wavelength (µm)')\n", "plt.ylabel('RAT')\n", "plt.xlim((2, 20))\n", "plt.legend(loc=0)\n", "\n", "plt.figure(2)\n", "plt.xlabel('Wavelength (µm)')\n", "plt.ylabel('n & k')\n", "plt.xlim((2, 20))\n", "plt.legend(loc=2)" ] } ], "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 }