{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "This notebook presents METIS LSS L-band simulation of three models of a young stellar object (YSO)." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import scopesim as sim\n", "sim.bug_report()\n", "\n", "# Edit this path if you have a custom install directory, otherwise comment it out. [For ReadTheDocs only]\n", "sim.link_irdb(\"../../../\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "\n", "from astropy.io import fits\n", "from astropy import units as u\n", "\n", "from matplotlib import pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If you haven't got the instrument packages yet, uncomment the following cell, which will install the packages into `./inst_pkgs`, a subdirectory of your current working directory. This is the default location where scopesim looks for instrument packages." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# sim.download_packages([\"METIS\", \"ELT\", \"Armazones\"])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If you have downloaded the packages but to a different location, you can set\n", "```python\n", "sim.set_inst_pkgs_path(\"/path/to/inst/pkgs\")\n", "```\n", "We recommend, however, to create a working directory for each simulation project and to use the default installation of packages into a subdirectory. Keeping simulation results and configuration files together that way makes it easy to reconstruct later the exact conditions under which a simulation was run." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Preparation of source cubes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The input data are cubes of three different models of the same YSO, HD100546. We keep the names of FITS files, the `Source` objects and the results of the ScopeSim simulations in dictionaries, indexed by short names for the models." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fitsfiles = {\n", " \"cav\": \"models_Lband_HD100546_cav_f100PAH.cube_3.0mas.fits\",\n", " \"emptycav\": \"models_Lband_HD100546_empytcav.cube_3.0mas.fits\",\n", " \"gap\": \"models_Lband_HD100546_gap100.cube_3.0mas.fits\",\n", "}\n", "print(\"Model names:\", list(fitsfiles))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The FITS files can be downloaded from the ScopeSim server. If you already have them, make sure that the files are in the correct location (e.g. current working directory, see also the note below). The next code cell will replace the file names with absolute paths to the download cache location. If you already have the files in the current working directory, simply skip that line and ScopeSim will look for them there." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "