{ "cells": [ { "cell_type": "markdown", "id": "e0bf37ee", "metadata": {}, "source": [ "# Iterated integral complementary error function\n", "\n", "Check implementation of the iterated integral complementary error function." ] }, { "cell_type": "code", "execution_count": null, "id": "a43941e4", "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "\n", "from bruggeman.general import ierfc" ] }, { "cell_type": "markdown", "id": "b0894cfc", "metadata": {}, "source": [ "Implementation:\n", "\n", "\"Iterated" ] }, { "cell_type": "markdown", "id": "05e6ceef", "metadata": {}, "source": [ "Compare to figure 3 in [Olsthoorn, (2006)](https://edepot.wur.nl/13730)." ] }, { "cell_type": "code", "execution_count": null, "id": "789f447d", "metadata": {}, "outputs": [], "source": [ "z = np.linspace(0, 3, 51)\n", "ierfc_min1 = ierfc(z, -1)\n", "ierfc0 = ierfc(z, 0)\n", "plt.figure(figsize=(10, 3))\n", "plt.plot(z, ierfc_min1, ls=\"dashed\", label=\"ierfc(z, -1)\", lw=1.0, color=\"k\")\n", "plt.plot(z, ierfc0, ls=\"solid\", label=\"ierfc(z, 0)\", lw=1.0, color=\"k\")\n", "for n in range(1, 8):\n", " plt.plot(\n", " z, ierfc(z, n) / ierfc(0, n), label=f\"ierfc(z, {n}) / ierfc(0, {n})\", lw=1.0\n", " )\n", "plt.legend()\n", "plt.grid()" ] }, { "cell_type": "code", "execution_count": null, "id": "cb40f04e", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "bruggeman (broken)", "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.13.11" } }, "nbformat": 4, "nbformat_minor": 5 }