{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# How to Generate a Last Interaction Velocity (LIV) Plot\n", "The Last Interaction Velocity Plot tracks and display the velocities at which different elements (or species) last interacted with packets in the simulation." ] }, { "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": {}, "outputs": [], "source": [ "from tardis import run_tardis\n", "from tardis.io.atom_data import download_atom_data\n", "from tardis.io.configuration.config_reader import Configuration\n", "\n", "# We download the atomic data needed to run the simulation\n", "download_atom_data('kurucz_cd23_chianti_H_He_latest')\n", "config = Configuration.from_yaml(str(\"tardis_example.yml\"))\n", "\n", "config.montecarlo.tracking.track_rpacket = True\n", "\n", "sim = run_tardis(config, virtual_packet_logging=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "