diff --git a/METIS/METIS.yaml b/METIS/METIS.yaml index 90ede94..bb58beb 100644 --- a/METIS/METIS.yaml +++ b/METIS/METIS.yaml @@ -56,6 +56,13 @@ effects: transmission: "!OBS.pupil_transmission" minimum_throughput: !!float 0. + - name : common_fits_keywords + decription : FITS keywords common to all modes + class : ExtraFitsKeywords + include : True + kwargs : + filename: headers/FITS_common_keywords.yaml + # - name : metis_adc_residuals # class : AtmosphericDispersionCorrection # include : False diff --git a/METIS/default.yaml b/METIS/default.yaml index 835bcff..a3a6a6a 100644 --- a/METIS/default.yaml +++ b/METIS/default.yaml @@ -40,6 +40,22 @@ properties: auto_exposure: fill_frac: 0.75 # fraction to which full well is filled in one DIT + # Default DPR keywords and template name. + # TODO: Perhaps create different 'modes' for each template, with a + # corresponding yaml file with the keywords. + tplname: "METIS_img_lm_obs_GenericOffset" + catg: "SCIENCE" + tech: "IMAGE,LM" + type: "OBJECT" + # More default properties for the observation + mjdobs: "2027-05-04T02:30:00" + tplstart: "2027-05-04T02:30:00" + tplno: 0 + tplexpno: 0 + obsname: "MyScienceTest" + ra: 0.0 + dec: 0.0 + mode_yamls: - object: observation alias: OBS diff --git a/METIS/docs/example_notebooks/RawHeaders.ipynb b/METIS/docs/example_notebooks/RawHeaders.ipynb new file mode 100644 index 0000000..12b1805 --- /dev/null +++ b/METIS/docs/example_notebooks/RawHeaders.ipynb @@ -0,0 +1,513 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "5cbaae4c-e4ac-423a-93c3-80f67b85566c", + "metadata": {}, + "source": [ + "# Raw Headers\n", + "\n", + "A notebook to show the raw headers of the simulated data." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "d3d7858c-b000-436f-91ba-142f04196deb", + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "import numpy as np\n", + "from astropy.io import fits\n", + "from astropy import units as u\n", + "from astropy.wcs import WCS" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "0f8e6494-3a5f-4469-ba9f-3722791d71ee", + "metadata": {}, + "outputs": [], + "source": [ + "from matplotlib import pyplot as plt\n", + "from matplotlib.colors import LogNorm\n", + "%matplotlib inline" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "bc15265c-73eb-4752-abb8-cb888c7cf66e", + "metadata": {}, + "outputs": [], + "source": [ + "import scopesim as sim\n", + "import scopesim_templates\n", + "# Edit this path to use where you have downloaded the IRDB packages (see other notebooks).\n", + "sim.rc.__config__[\"!SIM.file.local_packages_path\"] = \"../../../\"" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "45c9a641-3db7-4387-a173-591930519161", + "metadata": {}, + "outputs": [], + "source": [ + "# sim.bug_report()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c4dc4316-fef2-4906-ba0c-8f0bb3b07698", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "e39b7043-dce3-4dbd-8190-5454a20a7910", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['A0V']\n" + ] + } + ], + "source": [ + "star = scopesim_templates.stellar.star(filter_name=\"V\", amplitude=22)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7c44f895-374b-486c-aabe-cdfada73e460", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "e003ed89-244f-4c9b-9424-ad5a32404a1a", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "DEBUG:astar.scopesim.optics.image_plane_utils:Pixel scale: 0.00547 arcsec / pix\n", + "DEBUG:astar.scopesim.optics.image_plane_utils:Plate scale: 0.30389 arcsec / mm\n", + "DEBUG:astar.scopesim.optics.image_plane_utils:WCS sky corners: [[-0.00155591 -0.00155591]\n", + " [-0.00155591 0.00155591]\n", + " [ 0.00155591 0.00155591]\n", + " [ 0.00155591 -0.00155591]] deg\n", + "DEBUG:astar.scopesim.optics.image_plane_utils:WCS det corners: [[-18.43193261 -18.43193261]\n", + " [-18.43193261 18.43193261]\n", + " [ 18.43193261 18.43193261]\n", + " [ 18.43193261 -18.43193261]] mm\n", + "DEBUG:astar.scopesim.optics.image_plane:det WCS Keywords\n", + "\n", + "Number of WCS axes: 2\n", + "CTYPE : 'LINEAR' 'LINEAR' \n", + "CRVAL : 0.0 0.0 \n", + "CRPIX : 1024.5 1024.5 \n", + "PC1_1 PC1_2 : 1.0 0.0 \n", + "PC2_1 PC2_2 : 0.0 1.0 \n", + "CDELT : 0.018 0.018 \n", + "NAXIS : 2048 2048\n", + "DEBUG:astar.scopesim.optics.image_plane:sky None\n", + "DEBUG:astar.scopesim.optics.image_plane_utils:Pixel scale: 0.00547 arcsec / pix\n", + "DEBUG:astar.scopesim.optics.image_plane_utils:Plate scale: 0.30389 arcsec / mm\n", + "DEBUG:astar.scopesim.optics.image_plane_utils:WCS sky corners: [[-0.00155591 -0.00155591]\n", + " [-0.00155591 0.00155591]\n", + " [ 0.00155591 0.00155591]\n", + " [ 0.00155591 -0.00155591]] deg\n", + "DEBUG:astar.scopesim.optics.image_plane_utils:WCS det corners: [[-18.43193261 -18.43193261]\n", + " [-18.43193261 18.43193261]\n", + " [ 18.43193261 18.43193261]\n", + " [ 18.43193261 -18.43193261]] mm\n", + "DEBUG:astar.scopesim.optics.image_plane:det WCS Keywords\n", + "\n", + "Number of WCS axes: 2\n", + "CTYPE : 'LINEAR' 'LINEAR' \n", + "CRVAL : 0.0 0.0 \n", + "CRPIX : 1024.5 1024.5 \n", + "PC1_1 PC1_2 : 1.0 0.0 \n", + "PC2_1 PC2_2 : 0.0 1.0 \n", + "CDELT : 0.018 0.018 \n", + "NAXIS : 2048 2048\n", + "DEBUG:astar.scopesim.optics.image_plane:sky None\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [ELT]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_EntrWin]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_CM1]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_CM1]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_CM1]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_FM1]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_FM1]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_FM1]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_CM2]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_CM2]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_CM2]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_CM3]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_CM3]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_CM3]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_KM1]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_KM1]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_KM1]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_KM2]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_KM2]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_KM2]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_KM3]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_KM3]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_KM3]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_FM2]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_FM2]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_FM2]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_Dichroic]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_FM3]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_FM3]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_FM3]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_CM4]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_CM4]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_CM4]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_CM5]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_CM5]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_CM5]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [CFO_CM6]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [CFO_CM6]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [CFO_CM6]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [const_90]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [cold_stop]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [IMG_M1]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [IMG_M1]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [IMG_M1]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [IMG_M2]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [IMG_M2]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [IMG_M2]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [IMG_M3]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [IMG_M3]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [IMG_M3]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [IMG_dichroic]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [IMG_dichroic]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [IMG_LM_FM1]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [IMG_LM_FM1]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [IMG_LM_FM1]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [IMG_LM_FM2]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [IMG_LM_FM2]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [IMG_LM_FM2]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [IMG_LM_CM1]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [IMG_LM_CM1]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [IMG_LM_CM1]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [IMG_LM_CM2]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [IMG_LM_CM2]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [IMG_LM_CM2]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [IMG_LM_CM3]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [IMG_LM_CM3]\n", + "DEBUG:astar.scopesim.optics.surface:transmission not found in either '.meta' or '.table': [IMG_LM_CM3]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [Lp]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [Lp]\n", + "DEBUG:astar.scopesim.optics.surface:reflection not found in either '.meta' or '.table': [Lp]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [open]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [open]\n", + "DEBUG:astar.scopesim.optics.surface:reflection not found in either '.meta' or '.table': [open]\n", + "DEBUG:astar.scopesim.optics.surface:emission not found in either '.meta' or '.table': [quantum_efficiency]\n", + "DEBUG:astar.scopesim.optics.surface:emissivity not found in either '.meta' or '.table': [quantum_efficiency]\n", + "DEBUG:astar.scopesim.optics.surface:reflection not found in either '.meta' or '.table': [quantum_efficiency]\n", + " FOVs: 0%| | 0/1 [00:00