Skip to content

Commit

Permalink
Revert "all notebooks: move requirements cell down; ensure preamable …
Browse files Browse the repository at this point in the history
…is in single cell"

This reverts commit 02a05d6.
  • Loading branch information
jeffjennings committed Sep 27, 2024
1 parent 02a05d6 commit f0fc52c
Show file tree
Hide file tree
Showing 25 changed files with 85 additions and 598 deletions.
38 changes: 10 additions & 28 deletions tutorials/FITS-cubes/FITS-cubes.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
<<<<<<< Updated upstream
"cell_type": "code",
"execution_count": null,
"metadata": {},
Expand All @@ -12,8 +11,6 @@
]
},
{
=======
>>>>>>> Stashed changes
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -40,40 +37,25 @@
"\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:\n",
"\n",
"They can be installed using conda:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```\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": "code",
"execution_count": 1,
"cell_type": "markdown",
"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": [
"with open('requirements.txt') as f:\n",
" print(f\"Required packages for this notebook:\\n{f.read()}\")"
"Alternatively, if you don't use conda, you can use pip."
]
},
{
Expand Down
23 changes: 0 additions & 23 deletions tutorials/FITS-header/FITS-header.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
<<<<<<< Updated upstream
"cell_type": "code",
"execution_count": null,
"metadata": {},
Expand All @@ -12,8 +11,6 @@
]
},
{
=======
>>>>>>> Stashed changes
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -37,26 +34,6 @@
"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,
Expand Down
25 changes: 0 additions & 25 deletions tutorials/FITS-images/FITS-images.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
<<<<<<< Updated upstream
"cell_type": "code",
"execution_count": null,
"metadata": {},
Expand All @@ -12,8 +11,6 @@
]
},
{
=======
>>>>>>> Stashed changes
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -40,28 +37,6 @@
"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,
Expand Down
25 changes: 0 additions & 25 deletions tutorials/FITS-tables/FITS-tables.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
<<<<<<< Updated upstream
"cell_type": "code",
"execution_count": null,
"metadata": {},
Expand All @@ -12,8 +11,6 @@
]
},
{
=======
>>>>>>> Stashed changes
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -37,28 +34,6 @@
"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,
Expand Down
27 changes: 0 additions & 27 deletions tutorials/Models-Quick-Fit/Models-Quick-Fit.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
<<<<<<< Updated upstream
"cell_type": "code",
"execution_count": null,
"metadata": {},
Expand All @@ -12,8 +11,6 @@
]
},
{
=======
>>>>>>> Stashed changes
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -37,30 +34,6 @@
"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": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
<<<<<<< Updated upstream
"cell_type": "code",
"execution_count": null,
"metadata": {},
Expand All @@ -12,8 +11,6 @@
]
},
{
=======
>>>>>>> Stashed changes
"cell_type": "markdown",
"metadata": {
"slideshow": {
Expand Down Expand Up @@ -41,31 +38,6 @@
"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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"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": {
Expand All @@ -12,8 +22,13 @@
"\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.\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": [
"## Authors\n",
"Adam Ginsburg, Kelle Cruz, Lia Corrales, Jonathan Sick, Adrian Price-Whelan\n",
"\n",
Expand All @@ -33,16 +48,6 @@
"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,
Expand Down
Loading

0 comments on commit f0fc52c

Please sign in to comment.