From 475323c4bc58f81ad8798362a0a1acd1b5d46dfb Mon Sep 17 00:00:00 2001 From: Hatice Karatay Date: Mon, 18 Dec 2023 15:10:38 -0500 Subject: [PATCH] Add remove cell tag --- .../specfit_demo_3.ipynb | 85 ++++++++++++++++--- notebooks/ifu_optimal/ifu_optimal.ipynb | 2 +- .../MOSspec_sv06_revised.ipynb | 82 +++++++++++++++--- .../1_niriss_ami_binary.ipynb | 22 ++++- .../2_niriss_ami_binary.ipynb | 30 +++++-- .../3_niriss_ami_binary.ipynb | 16 +++- .../Spectral_Extraction-static.ipynb | 46 ++++++++-- 7 files changed, 241 insertions(+), 42 deletions(-) diff --git a/notebooks/composite_model_fitting/specfit_demo_3.ipynb b/notebooks/composite_model_fitting/specfit_demo_3.ipynb index 9cdda8f71..1d53f9d13 100644 --- a/notebooks/composite_model_fitting/specfit_demo_3.ipynb +++ b/notebooks/composite_model_fitting/specfit_demo_3.ipynb @@ -2,14 +2,26 @@ "cells": [ { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "# Composite Model Spectral Fitting" ] }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "**Use case:** Fitting the complex continuum around Lyman-alpha in the spectrum of an active galaxy NGC 5548.
\n", "**Data:** 3-column ECSV file with units for each column.
\n", @@ -21,8 +33,21 @@ "\n", "In this example, we are fitting the complex continuum around Lyman-alpha in the spectrum of an active galaxy (NGC 5548). This involves a powerlaw, extinction, emission lines of various widths and absorption lines. Only certain regions of the spectrum (away from strong absorption lines) are fit. The model has some fixed and some free parameters, as well as parameters that are linked together. We are using the Astropy compound-model machinery to add fit all the components simultaneously. \n", "\n", - "The example makes only partial use of specutils. It reads the data into the Spectrum1D data structure. However, when we get to actually fitting the model, we are just grabbing the numpy arrays (without units, because that caused some errors). \n", - "\n", + "The example makes only partial use of specutils. It reads the data into the Spectrum1D data structure. However, when we get to actually fitting the model, we are just grabbing the numpy arrays (without units, because that caused some errors). " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, + "source": [ "#### Developer Notes\n", "Todo: \n", " \n", @@ -70,7 +95,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "##### Developer notes: \n", "\n", @@ -97,7 +130,13 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "## Data input\n", "\n", @@ -123,7 +162,13 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "Read the tables using astropy's QTable, so that we preserve the units.\n", "\n", @@ -147,7 +192,13 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "## Put the spectrum into a Spectrum1D object\n", "\n", @@ -203,7 +254,13 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "## Create a mask from the regions\n", "\n", @@ -237,7 +294,13 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "## Convenience routine for plotting a spectrum and highlighting the mask\n", "\n", @@ -758,7 +821,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.5" + "version": "3.11.6" } }, "nbformat": 4, diff --git a/notebooks/ifu_optimal/ifu_optimal.ipynb b/notebooks/ifu_optimal/ifu_optimal.ipynb index 2dced2c6e..2af8ef5d3 100644 --- a/notebooks/ifu_optimal/ifu_optimal.ipynb +++ b/notebooks/ifu_optimal/ifu_optimal.ipynb @@ -785,7 +785,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.11.6" } }, "nbformat": 4, diff --git a/notebooks/mos-spectroscopy/MOSspec_sv06_revised.ipynb b/notebooks/mos-spectroscopy/MOSspec_sv06_revised.ipynb index df9bbac18..d124162f0 100644 --- a/notebooks/mos-spectroscopy/MOSspec_sv06_revised.ipynb +++ b/notebooks/mos-spectroscopy/MOSspec_sv06_revised.ipynb @@ -2,7 +2,13 @@ "cells": [ { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "# MOS Spectroscopy of Extragalactic Field\n", "\n", @@ -15,8 +21,8 @@ "## Introduction\n", "\n", "This notebook will perform a seris of spectroscopic analyses on multiple spectra, including smoothing, continuum fitting and subtraction, line identification, centroiding and flux measurements, gaussian fitting, equivalent widths, and template fitting.\n", - "\n ", "\n", + " \n", "**Note:** This notebook is intended to ultimately be compatible with the final data products (1D and 2D spectra) from the JWST pipeline. These data products are not available yet, so the notebook uses LEGA-C data (van der Wel et al. 2016, Straatmann et al. 2018) for now.\n", "\n", "LEGA-C is a galaxy survey of about 3000 galaxies at z~0.8 and M* > 10^10 M_sun in the COSMOS field. The spectra sample the rest-frame optical between ~3000A and 5000A at high resolution and very high signal-to-noise ratio. More information about the survey can be found here: http://www.mpia.de/home/legac/" @@ -188,7 +194,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "##### Developer note\n", "I would appreciate the interactive tools here to zoom and pan through the 2D spectrum. Hoovering to know the precise wavelength of a feature would also be very useful. With that, the interactive tool could show automatically the calibration in wavelength reading it from the header." @@ -325,7 +339,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "##### Developer note\n", "\n", @@ -337,7 +359,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "##### Developer note\n", "\n", @@ -353,7 +383,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "##### Developer note\n", "\n", @@ -547,7 +585,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "##### Developer note\n", "It would be useful to have a tool to cycle through the lines, show a zoom of the spectrum, and inspect how good the line identification is. For now I do it by hand on a single line." @@ -623,7 +669,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "## Fit the line with a Gaussian\n", "\n", @@ -727,7 +781,13 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "## Find the best-fitting template\n", "It needs a list of templates and the redshift of the observed galaxy. For the templates, I am using a set of model SEDs generated with Bruzual & Charlot stellar population models, emission lines, and dust attenuation as described in Pacifici et al. (2012).\n", @@ -829,9 +889,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.11.6" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/notebooks/niriss_ami_binary/1_niriss_ami_binary.ipynb b/notebooks/niriss_ami_binary/1_niriss_ami_binary.ipynb index 0ceacfd9b..ffd1cedf6 100644 --- a/notebooks/niriss_ami_binary/1_niriss_ami_binary.ipynb +++ b/notebooks/niriss_ami_binary/1_niriss_ami_binary.ipynb @@ -2,7 +2,13 @@ "cells": [ { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "# NIRISS AMI: MIRAGE Simulations" ] @@ -133,7 +139,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "*Developer Note:*\n", "If you are outside STScI install the mirage data by following instructions on https://mirage-data-simulator.readthedocs.io/en/latest/reference_files.html and create MIRAGE_DATA location." @@ -683,9 +697,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.11.6" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/notebooks/niriss_ami_binary/2_niriss_ami_binary.ipynb b/notebooks/niriss_ami_binary/2_niriss_ami_binary.ipynb index be032d1df..4b7d91dc8 100644 --- a/notebooks/niriss_ami_binary/2_niriss_ami_binary.ipynb +++ b/notebooks/niriss_ami_binary/2_niriss_ami_binary.ipynb @@ -2,7 +2,13 @@ "cells": [ { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "# NIRISS AMI: Pipeline" ] @@ -696,7 +702,13 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "### OIFITS files for the target and calibrator" ] @@ -755,7 +767,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "*Developer Note:*\n", "The observable extraction performed in this notebook used only the first 5 integrations to save time while demonstrating the use of ImPlaneIA to reduce pipeline-calibrated observations. For accurate science use, we use all the integrations contained in the input data files. Therefore the input data for notebook 3 (3_niriss_ami_binary.ipynb) is slightly different from the output of 2_niriss_ami_binary.ipynb." @@ -816,9 +836,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.11.6" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/notebooks/niriss_ami_binary/3_niriss_ami_binary.ipynb b/notebooks/niriss_ami_binary/3_niriss_ami_binary.ipynb index 611cd995c..e8efbb0d3 100644 --- a/notebooks/niriss_ami_binary/3_niriss_ami_binary.ipynb +++ b/notebooks/niriss_ami_binary/3_niriss_ami_binary.ipynb @@ -3,9 +3,11 @@ { "cell_type": "markdown", "metadata": { + "editable": true, "slideshow": { "slide_type": "slide" - } + }, + "tags": [] }, "source": [ "# NIRISS AMI: Binary fitting of AB Dor using Fouriever" @@ -686,7 +688,13 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "## Additional Resources\n", "\n", @@ -743,9 +751,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.11.6" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/notebooks/optimal_extraction/Spectral_Extraction-static.ipynb b/notebooks/optimal_extraction/Spectral_Extraction-static.ipynb index f9cf64474..b4a5de790 100644 --- a/notebooks/optimal_extraction/Spectral_Extraction-static.ipynb +++ b/notebooks/optimal_extraction/Spectral_Extraction-static.ipynb @@ -3,9 +3,11 @@ { "cell_type": "markdown", "metadata": { + "editable": true, "slideshow": { "slide_type": "slide" - } + }, + "tags": [] }, "source": [ "# MOS Optimal Spectral Extraction" @@ -228,7 +230,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "*Developer Note:*\n", "\n", @@ -814,7 +824,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "#### Developer Note: We will not use datamodels here because the latest packages do not support the simulated data previously created for this notebook. The data set will have to be updated after commissioning." ] @@ -1284,7 +1302,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "*Developer Note:*\n", "\n", @@ -1353,7 +1379,15 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, "source": [ "*Developer Note:*\n", "\n", @@ -1711,7 +1745,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.5" + "version": "3.11.6" } }, "nbformat": 4,