{ "cells": [ { "cell_type": "markdown", "id": "e9d3db20-05e8-44fa-88cd-779331c0a727", "metadata": {}, "source": [ "# NIRSpec/G395H Flux Calibration" ] }, { "cell_type": "markdown", "id": "c98f94a4-9c0c-46b1-aed9-831483d158d3", "metadata": {}, "source": [ "This notebook will walk you through the additional steps necessary for flux calibration of NIRSpec/G395H BOTS observations.\n", "Note that the process to follow will be the same for the other NIRSpec gratings (or PRISM) -- we're using G395H here as an example since that was the grating used in the JWST Transiting Exoplanet Community Early Release Science (ERS) program. \n", "This notebook also assumes that you've already worked through the NIRSpec/G395H reduction notebook and have produced the relevant outputs." ] }, { "cell_type": "code", "execution_count": null, "id": "bea041c1-d654-46d2-829e-7203da4a477c", "metadata": { "tags": [] }, "outputs": [], "source": [ "# First thing to do is set your CRDS variables so we can download the most up-to-date JWST \n", "# reference files. \n", "\n", "import os\n", "os.environ['CRDS_PATH'] = './crds_cache'\n", "os.environ['CRDS_SERVER_URL'] = 'https://jwst-crds.stsci.edu'" ] }, { "cell_type": "markdown", "id": "2648e65c-2641-4c6b-b516-18953a23677d", "metadata": {}, "source": [ "Flux calibration converts the extracted stellar spectra into \"real\" units (e.g., erg/s/cm^2/µm) from the pipeline default \"data numbers\" (DN/s) or electrons (e/s). This invovles correcting the wavelength-dependent instrument throughput and applying the relevant unit conversions which were calibrated during commissioning using flux standard stars. " ] }, { "cell_type": "markdown", "id": "0d541685-55ac-4d5a-b379-953dca77f26d", "metadata": {}, "source": [ "We start this tutorial with the WaveCorrStep Stage 2 outputs from the NIRSpec/G395H reduction tutorial" ] }, { "cell_type": "code", "execution_count": null, "id": "7576df84-6b03-4430-a9c9-a0bd811ea2f7", "metadata": {}, "outputs": [], "source": [ "# Specify the input directory containing the WaveCorrStep outputs.\n", "\n", "indir = 'pipeline_outputs_directory/Stage2/'\n", "\n", "# Lists of the WaveCorrStep outputs for each segment.\n", "\n", "filenames1 = [indir + 'jw01366003001_04101_00001-seg001_nrs1_wavecorrstep.fits',\n", " indir + 'jw01366003001_04101_00001-seg002_nrs1_wavecorrstep.fits',\n", " indir + 'jw01366003001_04101_00001-seg003_nrs1_wavecorrstep.fits']\n", "\n", "filenames2 = [indir + 'jw01366003001_04101_00001-seg001_nrs2_wavecorrstep.fits',\n", " indir + 'jw01366003001_04101_00001-seg002_nrs2_wavecorrstep.fits',\n", " indir + 'jw01366003001_04101_00001-seg003_nrs2_wavecorrstep.fits']" ] }, { "cell_type": "markdown", "id": "0a127108-dcf5-4a69-8ac7-729366f4f881", "metadata": {}, "source": [ "