{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Spectral element DEComposition (SDEC) Plot\n", "The SDEC Plot illustrates the contributions of different chemical elements in the formation of a simulation model's spectrum. It is a spectral diagnostic plot similar to those originally proposed by M. Kromer (see, for example, [Kromer et al. 2013](https://arxiv.org/abs/1311.0310), figure 4)." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2021-10-01T11:54:24.525446Z", "start_time": "2021-10-01T11:54:24.522894Z" }, "nbsphinx": "hidden" }, "outputs": [], "source": [ "# We filter out warnings throughout this notebook\n", "import warnings\n", "warnings.filterwarnings('ignore')\n", "\n", "# Due to the large size of the SDEC plots in SVG format, we request output as a\n", "# high-resolution PNG\n", "%config InlineBackend.figure_formats='png2x'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First, create and run a simulation for which you want to generate this plot:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2021-10-01T11:55:28.560853Z", "start_time": "2021-10-01T11:54:24.527697Z" }, "scrolled": true }, "outputs": [], "source": [ "from tardis import run_tardis\n", "from tardis.io.atom_data.util import download_atom_data\n", "\n", "# We download the atomic data needed to run the simulation\n", "download_atom_data('kurucz_cd23_chianti_H_He')\n", "\n", "sim = run_tardis(\"tardis_example.yml\", virtual_packet_logging=True)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "