{ "cells": [ { "cell_type": "raw", "id": "47a11a1d", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Dark Current Model\n", "------------------\n", "Dark current is the charge accumulated by an unilluminated sensor.\n", "Teledyne/e2v provides a dark current model in the \n", "`datasheet `_ as\n", "\n", ".. math::\n", "\n", " \\frac{Q_d}{Q_{do}} = 122 T^3 e^{-6400 / T}\n", " \n", "where :math:`Q_d` is the dark current,\n", ":math:`Q_{do}` is the dark current at 293 K,\n", "and :math:`T` is the temperature.\n", " \n", "In this notebook we will plot this theoretical dark current over a range of temperatures." ] }, { "cell_type": "code", "execution_count": null, "id": "b5a6ceb5", "metadata": { "ExecuteTime": { "end_time": "2025-08-14T04:53:22.158437Z", "start_time": "2025-08-14T04:53:18.967940Z" } }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import astropy.units as u\n", "import astropy.visualization\n", "import named_arrays as na\n", "import msfc_ccd" ] }, { "cell_type": "raw", "id": "1d9c610d", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Define a grid of temperatures with which to sample the dark current" ] }, { "cell_type": "code", "execution_count": null, "id": "70708419", "metadata": { "ExecuteTime": { "end_time": "2025-08-14T04:53:22.158437Z", "start_time": "2025-08-14T04:53:18.967940Z" } }, "outputs": [], "source": [ "temperature = na.linspace(200, 300, axis=\"temperature\", num=101) * u.K" ] }, { "cell_type": "raw", "id": "0c1da283", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Initialize the sensor model" ] }, { "cell_type": "code", "execution_count": null, "id": "4f8f2c79", "metadata": { "ExecuteTime": { "end_time": "2025-08-14T04:53:22.158437Z", "start_time": "2025-08-14T04:53:18.967940Z" } }, "outputs": [], "source": [ "sensor = msfc_ccd.TeledyneCCD230()" ] }, { "cell_type": "raw", "id": "bde0cbb9", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Compute the theoretical dark current using the :meth:`msfc_ccd.TeledyneCCD230.dark_current` method." ] }, { "cell_type": "code", "execution_count": null, "id": "00ee0ef1", "metadata": { "ExecuteTime": { "end_time": "2025-08-14T04:53:22.158437Z", "start_time": "2025-08-14T04:53:18.967940Z" } }, "outputs": [], "source": [ "dark_current = sensor.dark_current(temperature)" ] }, { "cell_type": "raw", "id": "1786fae2", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Plot the dark current vs. temperature" ] }, { "cell_type": "code", "execution_count": null, "id": "initial_id", "metadata": { "ExecuteTime": { "end_time": "2025-08-14T04:53:22.158437Z", "start_time": "2025-08-14T04:53:18.967940Z" } }, "outputs": [], "source": [ "with astropy.visualization.quantity_support():\n", " fig, ax = plt.subplots()\n", " ax2 = ax.twiny()\n", " na.plt.plot(\n", " temperature,\n", " dark_current,\n", " ax=ax,\n", " )\n", " na.plt.plot(\n", " temperature.to(u.deg_C, equivalencies=u.temperature()),\n", " dark_current,\n", " ax=ax2,\n", " )\n", " ax.set_yscale(\"log\")\n", " ax.set_xlabel(f\"temperature ({ax.get_xlabel()})\")\n", " ax2.set_xlabel(f\"temperature ({ax2.get_xlabel()})\")\n", " ax.set_ylabel(f\"dark current ({ax.get_ylabel()})\")" ] } ], "metadata": { "celltoolbar": "Raw Cell Format", "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.11.1" } }, "nbformat": 4, "nbformat_minor": 5 }