diff --git a/notebooks/NIRSpec/ifu_optimal/ifu_optimal.ipynb b/notebooks/NIRSpec/ifu_optimal/ifu_optimal.ipynb index d1920ca40..5086081f2 100644 --- a/notebooks/NIRSpec/ifu_optimal/ifu_optimal.ipynb +++ b/notebooks/NIRSpec/ifu_optimal/ifu_optimal.ipynb @@ -26,14 +26,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Use case:** optimal spectral extraction; method by [Horne (1986)](https://ui.adsabs.harvard.edu/abs/1986PASP...98..609H/abstract).\n", - "\n", - "**Data:** JWST NIRSpec IFU data; point sources.\n", - "\n", - "**Tools:** jwst, webbpsf, matplotlib, scipy, custom functions.\n", - "\n", - "**Cross-intrument:** any spectrograph. \n", - "\n", + "**Use case:** optimal spectral extraction; method by [Horne (1986)](https://ui.adsabs.harvard.edu/abs/1986PASP...98..609H/abstract).
\n", + "**Data:** JWST NIRSpec IFU data; point sources.
\n", + "**Tools:** jwst, webbpsf, matplotlib, scipy, custom functions.
\n", + "**Cross-intrument:** any spectrograph.
\n", "**Documentation:** This notebook is part of a STScI's larger [post-pipeline Data Analysis Tools Ecosystem](https://jwst-docs.stsci.edu/jwst-post-pipeline-data-analysis)." ] }, @@ -250,9 +246,7 @@ " \n", "print(\"\\nGood Data Region\")\n", "try:\n", - " region2 = cubeviz_data.get_selection_definition(\n", - " \"Subset 2\", format=\"astropy-regions\"\n", - " )\n", + " region2 = cubeviz.get_interactive_regions()['Subset 2']\n", " print(region2)\n", " region2_exists = True\n", " data_xrange = [\n", @@ -300,8 +294,8 @@ "\n", "print(\"\\nSource\")\n", "try:\n", - " spectrum_subset1 = cubeviz.get_data(cubeviz.data_labels[0].label,\n", - " spatial_subset=\"Subset 1\", function=\"mean\")\n", + " spectrum_subset1 = cubeviz.get_data(cubeviz.data_labels[0],\n", + " spatial_subset=\"Subset 1\", function=\"sum\")\n", " print(spectrum_subset1)\n", "except Exception:\n", " print(\"There is no Subset 1 selected in the spectrum viewer.\")\n", @@ -411,7 +405,7 @@ ] }, "source": [ - "*Developer Note:* Is there a way to retrieve the coordinates (RA, Dec) of the Subset1 region, for use in a SkyCircularAperture?" + "**Developer Note:** Is there a way to retrieve the coordinates (RA, Dec) of the Subset1 region, for use in a SkyCircularAperture?" ] }, { @@ -578,7 +572,7 @@ ] }, "source": [ - "*Developer Note:* The file Webbpsf_ifucube.fits is large (946.3 MB) and takes some time to load from Box.\n", + "**Developer Note:** The file Webbpsf_ifucube.fits is large (946.3 MB) and takes some time to load from Box.\n", "It might behoove the user to download it to a local directory and retrieve it from there." ] }, @@ -747,6 +741,15 @@ "specviz.y_limits(0.0, clip_level / 7)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The viewer looks like this:\n", + "\n", + "\"Specviz," + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -785,7 +788,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.6" + "version": "3.11.9" } }, "nbformat": 4, diff --git a/notebooks/NIRSpec/ifu_optimal/requirements.txt b/notebooks/NIRSpec/ifu_optimal/requirements.txt index fc4aff4ff..b3600be25 100644 --- a/notebooks/NIRSpec/ifu_optimal/requirements.txt +++ b/notebooks/NIRSpec/ifu_optimal/requirements.txt @@ -1,3 +1,3 @@ -numpy>=1.26.2 -scipy>=1.11.4 -jdaviz>=3.8.0 +numpy>=1.26.4 +scipy>=1.13.1 +jdaviz>=3.10.2 diff --git a/notebooks/NIRSpec/ifu_optimal/sdssj1652_nirspec_ifu_specviz.png b/notebooks/NIRSpec/ifu_optimal/sdssj1652_nirspec_ifu_specviz.png new file mode 100644 index 000000000..bb1a125d4 Binary files /dev/null and b/notebooks/NIRSpec/ifu_optimal/sdssj1652_nirspec_ifu_specviz.png differ