From 02a05d6b814f2f910e9007f509e11f07dfb57a0b Mon Sep 17 00:00:00 2001 From: Jeff Jennings Date: Fri, 27 Sep 2024 13:56:01 -0400 Subject: [PATCH] all notebooks: move requirements cell down; ensure preamable is in single cell --- tutorials/FITS-cubes/FITS-cubes.ipynb | 38 +++++++++++++----- tutorials/FITS-header/FITS-header.ipynb | 23 +++++++++++ tutorials/FITS-images/FITS-images.ipynb | 25 ++++++++++++ tutorials/FITS-tables/FITS-tables.ipynb | 25 ++++++++++++ .../Models-Quick-Fit/Models-Quick-Fit.ipynb | 27 +++++++++++++ .../1-SpectroscopicTraceTutorial.ipynb | 28 +++++++++++++ .../2-WavelengthCalibration.ipynb | 29 ++++++-------- ...Extract_Wavelength-CalibrateSpectrum.ipynb | 38 +++++++----------- tutorials/UVES/UVES.ipynb | 27 +++++++++++++ .../User-Defined-Model.ipynb | 26 +++++++++++++ .../1-Coordinates-Intro.ipynb | 26 +++++++++++++ .../2-Coordinates-Transforms.ipynb | 26 +++++++++++++ .../3-Coordinates-Velocities.ipynb | 26 +++++++++++++ .../4-Coordinates-Crossmatch.ipynb | 26 +++++++++++++ tutorials/color-excess/color-excess.ipynb | 39 +++++++++++++++---- .../gaia-galactic-orbits.ipynb | 29 ++++++-------- tutorials/plot-catalog/plot-catalog.ipynb | 25 ++++++++++++ .../PVDiagramPlotting.ipynb | 27 +++++++++++++ tutorials/quantities/quantities.ipynb | 25 ++++++++++++ tutorials/redshift-plot/redshift-plot.ipynb | 20 +++++----- .../SpectralCubeReprojectExample.ipynb | 27 +++++++++++++ .../synthetic-images/synthetic-images.ipynb | 25 ++++++++++++ .../units-and-integration.ipynb | 26 +++++++++++++ tutorials/vo/conesearch.ipynb | 26 +++++++++++++ .../celestial_coords1.ipynb | 24 ++++++++++++ 25 files changed, 598 insertions(+), 85 deletions(-) diff --git a/tutorials/FITS-cubes/FITS-cubes.ipynb b/tutorials/FITS-cubes/FITS-cubes.ipynb index fdd8831d..ea0c4338 100755 --- a/tutorials/FITS-cubes/FITS-cubes.ipynb +++ b/tutorials/FITS-cubes/FITS-cubes.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -37,25 +40,40 @@ "\n", "The primary libraries we'll be using are: [astroquery](http://www.astropy.org/astroquery/), [spectral_cube](https://spectral-cube.readthedocs.io/en/latest/), [reproject](https://reproject.readthedocs.io/en/stable/#), [matplotlib](https://matplotlib.org/)) \n", "\n", - "They can be installed using conda:" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ + "They can be installed using conda:\n", + "\n", "```\n", "conda install -c conda-forge astroquery\n", "conda install -c conda-forge spectral-cube\n", "conda install -c conda-forge reproject\n", - "```" + "```\n", + "\n", + "Alternatively, if you don't use conda, you can use pip." ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": 1, "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "astroquery\n", + "matplotlib\n", + "numpy\n", + "reproject\n", + "spectral_cube\n", + "\n" + ] + } + ], "source": [ - "Alternatively, if you don't use conda, you can use pip." + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" ] }, { diff --git a/tutorials/FITS-header/FITS-header.ipynb b/tutorials/FITS-header/FITS-header.ipynb index 0d921675..dccd81b0 100755 --- a/tutorials/FITS-header/FITS-header.ipynb +++ b/tutorials/FITS-header/FITS-header.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -34,6 +37,26 @@ "keyword." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/tutorials/FITS-images/FITS-images.ipynb b/tutorials/FITS-images/FITS-images.ipynb index b7c28130..81bb69db 100755 --- a/tutorials/FITS-images/FITS-images.ipynb +++ b/tutorials/FITS-images/FITS-images.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -37,6 +40,28 @@ "This tutorial demonstrates the use of `astropy.utils.data` to download a data file, then uses `astropy.io.fits` to open the file, and lastly uses `matplotlib` to view the image with different color scales and stretches and to make histograms. In this tutorial we've also included a demonstration of simple image stacking." ] }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/tutorials/FITS-tables/FITS-tables.ipynb b/tutorials/FITS-tables/FITS-tables.ipynb index 7fac5693..dbb4097d 100755 --- a/tutorials/FITS-tables/FITS-tables.ipynb +++ b/tutorials/FITS-tables/FITS-tables.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -34,6 +37,28 @@ "This tutorial demonstrates the use of `astropy.utils.data` to download a data file, then uses `astropy.io.fits` and `astropy.table` to open the file. Lastly, `matplotlib` is used to visualize the data as a histogram." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/tutorials/Models-Quick-Fit/Models-Quick-Fit.ipynb b/tutorials/Models-Quick-Fit/Models-Quick-Fit.ipynb index 3bc5da96..5a7e84c2 100755 --- a/tutorials/Models-Quick-Fit/Models-Quick-Fit.ipynb +++ b/tutorials/Models-Quick-Fit/Models-Quick-Fit.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -34,6 +37,30 @@ "In this tutorial, we will become familiar with the models available in [astropy.modeling](http://docs.astropy.org/en/stable/modeling/ ) and learn how to make a quick fit to our data." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "astroquery\n", + "matplotlib\n", + "numpy\n", + "scipy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/SpectroscopicDataReductionBasics/1-SpectroscopicTraceTutorial.ipynb b/tutorials/SpectroscopicDataReductionBasics/1-SpectroscopicTraceTutorial.ipynb index 3de98d02..b9ab2784 100755 --- a/tutorials/SpectroscopicDataReductionBasics/1-SpectroscopicTraceTutorial.ipynb +++ b/tutorials/SpectroscopicDataReductionBasics/1-SpectroscopicTraceTutorial.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": { "slideshow": { @@ -38,6 +41,31 @@ "A spectroscopic trace is the path of a point source (star) spectrum through a two-dimensional dispersed spectrum. The trace is needed because, in general, spectra are not perfectly aligned with the axes of a detector." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "astroquery\n", + "IPython\n", + "numpy\n", + "PIL\n", + "pylab\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": { diff --git a/tutorials/SpectroscopicDataReductionBasics/2-WavelengthCalibration.ipynb b/tutorials/SpectroscopicDataReductionBasics/2-WavelengthCalibration.ipynb index 2f9d374e..c4132bc4 100755 --- a/tutorials/SpectroscopicDataReductionBasics/2-WavelengthCalibration.ipynb +++ b/tutorials/SpectroscopicDataReductionBasics/2-WavelengthCalibration.ipynb @@ -1,15 +1,5 @@ { "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "with open('requirements.txt') as f:\n", - " print(f\"Required packages for this notebook:\\n{f.read()}\")" - ] - }, { "cell_type": "markdown", "metadata": { @@ -22,13 +12,8 @@ "\n", "\n", "\n", - "This notebook assumes you've completed the Spectroscopic Trace process (see [Part 1](1-SpectroscopicTraceTutorial.ipynb)) and have a trace model handy." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ + "This notebook assumes you've completed the Spectroscopic Trace process (see [Part 1](1-SpectroscopicTraceTutorial.ipynb)) and have a trace model handy.\n", + "\n", "## Authors\n", "Adam Ginsburg, Kelle Cruz, Lia Corrales, Jonathan Sick, Adrian Price-Whelan\n", "\n", @@ -48,6 +33,16 @@ "Finally, it will show how to fit a wavelength solution to a calibration spectrum, integrating information from multiple calibration lamps." ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/tutorials/SpectroscopicDataReductionBasics/3-Trace_Extract_Wavelength-CalibrateSpectrum.ipynb b/tutorials/SpectroscopicDataReductionBasics/3-Trace_Extract_Wavelength-CalibrateSpectrum.ipynb index 9a4a669c..e62c26f2 100755 --- a/tutorials/SpectroscopicDataReductionBasics/3-Trace_Extract_Wavelength-CalibrateSpectrum.ipynb +++ b/tutorials/SpectroscopicDataReductionBasics/3-Trace_Extract_Wavelength-CalibrateSpectrum.ipynb @@ -1,33 +1,13 @@ { "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "with open('requirements.txt') as f:\n", - " print(f\"Required packages for this notebook:\\n{f.read()}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Spectroscopic Data Reduction Part 3: Extracting the final wavelength-calibrated spectrum " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This tutorial assumes you have gone through the [Trace](1-SpectroscopicTraceTutorial.ipynb) and [Wavelength Calibration](2-WavelengthCalibration) tutorials and have their results available." - ] - }, { "cell_type": "markdown", "metadata": {}, "source": [ + "# Spectroscopic Data Reduction Part 3: Extracting the final wavelength-calibrated spectrum \n", + "\n", + "This tutorial assumes you have gone through the [Trace](1-SpectroscopicTraceTutorial.ipynb) and [Wavelength Calibration](2-WavelengthCalibration) tutorials and have their results available.\n", + "\n", "## Authors\n", "Adam Ginsburg, Kelle Cruz, Lia Corrales, Jonathan Sick, Adrian Price-Whelan\n", "\n", @@ -43,6 +23,16 @@ "This tutorial, the third in a series, shows how to apply a trace and a wavelength solution to science data. It then shows how to do basic analysis, i.e., line fitting." ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/UVES/UVES.ipynb b/tutorials/UVES/UVES.ipynb index 0f352735..40a300e7 100644 --- a/tutorials/UVES/UVES.ipynb +++ b/tutorials/UVES/UVES.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -18,9 +19,13 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ + "# Analyzing UVES Spectroscopy with Astropy\n", + "\n", "## Authors\n", "Moritz Guenther, Miguel de Val-Borro, Emily Rice (Learning Goals & formatting)\n", "\n", @@ -48,6 +53,28 @@ "again." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/User-Defined-Model/User-Defined-Model.ipynb b/tutorials/User-Defined-Model/User-Defined-Model.ipynb index a25cdfd0..2f8ad080 100644 --- a/tutorials/User-Defined-Model/User-Defined-Model.ipynb +++ b/tutorials/User-Defined-Model/User-Defined-Model.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -35,6 +38,29 @@ "In this tutorial, we will learn how to define a new model in two ways: with a compound model and with a custom model." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "astroquery\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/astropy-coordinates/1-Coordinates-Intro.ipynb b/tutorials/astropy-coordinates/1-Coordinates-Intro.ipynb index f67dc5d0..3249fadb 100644 --- a/tutorials/astropy-coordinates/1-Coordinates-Intro.ipynb +++ b/tutorials/astropy-coordinates/1-Coordinates-Intro.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -40,6 +43,29 @@ "- [Next tutorial: Astronomical Coordinates 2: Transforming Coordinate Systems and Representations](2-Coordinates-Transforms)" ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "astroquery\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/astropy-coordinates/2-Coordinates-Transforms.ipynb b/tutorials/astropy-coordinates/2-Coordinates-Transforms.ipynb index b78aa84f..bb115d24 100644 --- a/tutorials/astropy-coordinates/2-Coordinates-Transforms.ipynb +++ b/tutorials/astropy-coordinates/2-Coordinates-Transforms.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -39,6 +42,29 @@ "- [Next tutorial: Astronomical Coordinates 3 - Working with Velocity Data](3-Coordinates-Velocities)" ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "astroquery\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/astropy-coordinates/3-Coordinates-Velocities.ipynb b/tutorials/astropy-coordinates/3-Coordinates-Velocities.ipynb index c3a6d77d..b37e6011 100644 --- a/tutorials/astropy-coordinates/3-Coordinates-Velocities.ipynb +++ b/tutorials/astropy-coordinates/3-Coordinates-Velocities.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -38,6 +41,29 @@ "- [Next tutorial: Astronomical Coordinates 4 - Cross-matching Catalogs](4-Coordinates-Crossmatch)" ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "astroquery\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/astropy-coordinates/4-Coordinates-Crossmatch.ipynb b/tutorials/astropy-coordinates/4-Coordinates-Crossmatch.ipynb index 15f4272d..e7ef5fcd 100644 --- a/tutorials/astropy-coordinates/4-Coordinates-Crossmatch.ipynb +++ b/tutorials/astropy-coordinates/4-Coordinates-Crossmatch.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -37,6 +40,29 @@ "- [Previous tutorial: Astronomical Coordinates 3: Working with Velocity Data](3-Coordinates-Velocities)" ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "astroquery\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/color-excess/color-excess.ipynb b/tutorials/color-excess/color-excess.ipynb index ae6cb0e1..eb92b005 100644 --- a/tutorials/color-excess/color-excess.ipynb +++ b/tutorials/color-excess/color-excess.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -18,20 +19,19 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ + "# Analyzing interstellar reddening and calculating synthetic photometry\n", + "\n", "## Authors\n", "\n", "Kristen Larson, Lia Corrales, Stephanie T. Douglas, Kelle Cruz\n", "\n", - "Input from Emir Karamehmetoglu, Pey Lian Lim, Karl Gordon, Kevin Covey" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ + "Input from Emir Karamehmetoglu, Pey Lian Lim, Karl Gordon, Kevin Covey\n", + "\n", "## Learning Goals\n", "- Investigate extinction curve shapes\n", "- Deredden spectral energy distributions and spectra\n", @@ -67,6 +67,31 @@ "```" ] }, + { + "cell_type": "code", + "execution_count": 133, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "astroquery\n", + "dust_extinction\n", + "matplotlib\n", + "numpy\n", + "synphot\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/tutorials/gaia-galactic-orbits/gaia-galactic-orbits.ipynb b/tutorials/gaia-galactic-orbits/gaia-galactic-orbits.ipynb index 64358b7d..ce28d2e9 100644 --- a/tutorials/gaia-galactic-orbits/gaia-galactic-orbits.ipynb +++ b/tutorials/gaia-galactic-orbits/gaia-galactic-orbits.ipynb @@ -1,26 +1,11 @@ { "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "with open('requirements.txt') as f:\n", - " print(f\"Required packages for this notebook:\\n{f.read()}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Computing Galactic Orbits of Stars with Gala" - ] - }, { "cell_type": "markdown", "metadata": {}, "source": [ + "# Computing Galactic Orbits of Stars with Gala\n", + "\n", "## Authors\n", "Adrian Price-Whelan, Stephanie T. Douglas\n", "\n", @@ -42,6 +27,16 @@ "We will use data from the [Gaia mission](https://www.cosmos.esa.int/web/gaia) to get sky positions, distances (parallaxes), proper motions, and radial velocities for a set of stars that are close to the Sun. We will then transform these observed, heliocentric kinematic measurements to Galactocentric Cartesian coordinates and use the positions and velocities as initial conditions to compute the orbits of these stars in the galaxy using the [gala](http://gala.adrian.pw) Python package. We will compare the orbits of high-mass main sequence (i.e. young) stars to the orbits of lower-mass main sequence stars to show that young stars have smaller vertical amplitudes." ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/plot-catalog/plot-catalog.ipynb b/tutorials/plot-catalog/plot-catalog.ipynb index 67a036e3..9b8205bd 100755 --- a/tutorials/plot-catalog/plot-catalog.ipynb +++ b/tutorials/plot-catalog/plot-catalog.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -32,6 +35,28 @@ "This tutorial demonstrates the use of `astropy.io.ascii` for reading ASCII data, `astropy.coordinates` and `astropy.units` for converting RA (as a sexagesimal angle) to decimal degrees, and `matplotlib` for making a color-magnitude diagram and on-sky locations in a Mollweide projection." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/tutorials/position-velocity-diagrams/PVDiagramPlotting.ipynb b/tutorials/position-velocity-diagrams/PVDiagramPlotting.ipynb index bdd042e1..5a4b7b20 100644 --- a/tutorials/position-velocity-diagrams/PVDiagramPlotting.ipynb +++ b/tutorials/position-velocity-diagrams/PVDiagramPlotting.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "id": "1", "metadata": {}, @@ -34,6 +37,30 @@ "Position-velocity diagrams are often used in radio astronomy for analysis of rotating objects, like protostellar disks and galaxies, to measure rotation curves and determine the contained mass. They are also used in studies of atomic and molecular clouds to show where overlapping emission may point at interactions between distinct clouds. Both radio and optical position-velocity diagrams are used to study outflows, jets, and winds; in the optical, two-dimensional spectra obtained from long-slit spectrographs naturally produce the equivalent of a position-velocity diagram." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "numpy\n", + "pvextractor\n", + "pylab\n", + "spectral_cube\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "id": "2", diff --git a/tutorials/quantities/quantities.ipynb b/tutorials/quantities/quantities.ipynb index 6d68538f..f61b3a88 100755 --- a/tutorials/quantities/quantities.ipynb +++ b/tutorials/quantities/quantities.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -45,6 +48,28 @@ "For an in-depth discussion of `Quantity` objects, see the [astropy documentation section](http://docs.astropy.org/en/stable/units/quantity.html)." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/redshift-plot/redshift-plot.ipynb b/tutorials/redshift-plot/redshift-plot.ipynb index ff97a882..425b8c71 100755 --- a/tutorials/redshift-plot/redshift-plot.ipynb +++ b/tutorials/redshift-plot/redshift-plot.ipynb @@ -1,15 +1,5 @@ { "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "with open('requirements.txt') as f:\n", - " print(f\"Required packages for this notebook:\\n{f.read()}\")" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -32,6 +22,16 @@ "Each redshift corresponds to an age of the universe, so if you're plotting some quantity against redshift, it's often useful show the universe age too. The relationship between the two changes depending the type of cosmology you assume, which is where `astropy.cosmology` comes in. In this tutorial we'll show how to use the tools in `astropy.cosmology` to make a plot like this:" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/tutorials/spectral-cube-reprojection/SpectralCubeReprojectExample.ipynb b/tutorials/spectral-cube-reprojection/SpectralCubeReprojectExample.ipynb index c2611ed9..415b38ec 100644 --- a/tutorials/spectral-cube-reprojection/SpectralCubeReprojectExample.ipynb +++ b/tutorials/spectral-cube-reprojection/SpectralCubeReprojectExample.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "id": "1", "metadata": {}, @@ -39,6 +42,30 @@ "Finally, it shows how to do the reprojection using [dask](https://dask.org) to enable parallelization." ] }, + { + "cell_type": "code", + "execution_count": 123, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "dask\n", + "numpy==1.26.4 # pinned on 09-27-24; can remove pin when https://github.com/radio-astro-tools/spectral-cube/pull/917 is merged\n", + "radio_beam\n", + "spectral-cube\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "id": "2", diff --git a/tutorials/synthetic-images/synthetic-images.ipynb b/tutorials/synthetic-images/synthetic-images.ipynb index 3dde32ef..d897f044 100755 --- a/tutorials/synthetic-images/synthetic-images.ipynb +++ b/tutorials/synthetic-images/synthetic-images.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -48,6 +51,28 @@ "[6. Calculate polarization angle and fraction for quiver plot](#6.-Calculate-polarization-angle-and-fraction-for-quiver-plot)" ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/tutorials/units-and-integration/units-and-integration.ipynb b/tutorials/units-and-integration/units-and-integration.ipynb index 80ee9609..82820f01 100755 --- a/tutorials/units-and-integration/units-and-integration.ipynb +++ b/tutorials/units-and-integration/units-and-integration.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -40,6 +43,29 @@ "In this tutorial, we will use the examples of the Planck function and the stellar initial mass function (IMF) to illustrate how to integrate numerically, using the trapezoidal approximation and Gaussian quadrature. We will also explore making a custom class, an instance of which is callable in the same way as a function. In addition, we will encounter `astropy`'s built-in units, and get a first taste of how to convert between them. Finally, we will use $\\LaTeX$ to make our figure axis labels easy to read." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "matplotlib\n", + "numpy\n", + "scipy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/tutorials/vo/conesearch.ipynb b/tutorials/vo/conesearch.ipynb index ca728099..747c09dd 100755 --- a/tutorials/vo/conesearch.ipynb +++ b/tutorials/vo/conesearch.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": { "description": "VO Simple Cone Search basic tutorial." @@ -37,6 +40,29 @@ "This tutorial desmonstrates the [Cone Search](http://astroquery.readthedocs.io/en/latest/vo_conesearch/vo_conesearch.html) subpackage, which allows you to query a catalog of astronomical sources and obtain those that lie within a cone of a given radius around the given position. " ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "astroquery\n", + "matplotlib\n", + "numpy\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/wcs-celestial-coords1/celestial_coords1.ipynb b/tutorials/wcs-celestial-coords1/celestial_coords1.ipynb index d56f4e31..2908f799 100644 --- a/tutorials/wcs-celestial-coords1/celestial_coords1.ipynb +++ b/tutorials/wcs-celestial-coords1/celestial_coords1.ipynb @@ -1,6 +1,7 @@ { "cells": [ { +<<<<<<< Updated upstream "cell_type": "code", "execution_count": null, "metadata": {}, @@ -11,6 +12,8 @@ ] }, { +======= +>>>>>>> Stashed changes "cell_type": "markdown", "metadata": {}, "source": [ @@ -39,6 +42,27 @@ "This tutorial series aims to show how the content of Chapter 1 of \"An Introduction to Modern Astrophysics\" by Carroll and Ostlie can be applied to real life astrophysics research situations, using tools in the Astropy ecosystem. We will introduce two different approaches to building a `astropy.wcs.WCS` object, which contains meta-data that (in this case) defines a mapping between image coordinates and sky coordinates. The `astropy.wcs` subpackage conforms to the standards of the FITS World Coordinate System (WCS) used extensively by the astronomy research community. We will created a 2D WCS for an image of the iconic the Helix nebula (a planetary nebula) and display an image of the nebula with sky coordinates (here, equatorial, ICRS RA and Dec.) labeled. Finally, we will over-plot a scale bar on the Helix nebula image using WCS to give the reader a sense of the angular size of the image." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required packages for this notebook:\n", + "astropy\n", + "matplotlib\n", + "\n" + ] + } + ], + "source": [ + "with open('requirements.txt') as f:\n", + " print(f\"Required packages for this notebook:\\n{f.read()}\")" + ] + }, { "cell_type": "code", "execution_count": null,