From c63cedebc56336322c51e6bc31209c80e17df1a1 Mon Sep 17 00:00:00 2001 From: Kris Stern Date: Wed, 27 Feb 2019 03:50:52 +0800 Subject: [PATCH 01/10] Update Coordinates-Intro to pass Travis CI --- .../notebooks/Coordinates-Intro/Coordinates-Intro.ipynb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tutorials/notebooks/Coordinates-Intro/Coordinates-Intro.ipynb b/tutorials/notebooks/Coordinates-Intro/Coordinates-Intro.ipynb index 704e2c57b..76dc3bc6a 100755 --- a/tutorials/notebooks/Coordinates-Intro/Coordinates-Intro.ipynb +++ b/tutorials/notebooks/Coordinates-Intro/Coordinates-Intro.ipynb @@ -45,6 +45,7 @@ "from astropy import units as u\n", "from astropy.coordinates import SkyCoord\n", "from astropy.table import Table\n", + "from astropy.utils import data\n", "import numpy as np\n", "from IPython.display import Image\n", "\n", @@ -78,7 +79,8 @@ "outputs": [], "source": [ "# initialize a SkyCood object named hcg7_center at the location of HCG 7\n", - "hcg7_center = SkyCoord.from_name('HCG 7')" + "data.conf.remote_timeout = 60\n", + "hcg7_center = SkyCoord.from_name('hcg7')" ] }, { @@ -86,7 +88,7 @@ "metadata": {}, "source": [ "
\n", - "Note that this requires an internet connection. If you don't have one, execute this line instead:\n", + "Note that this requires an internet connection. If you don't have one, execute the following line instead:\n", "
" ] }, @@ -98,7 +100,7 @@ }, "outputs": [], "source": [ - "# uncomment and run this line if you don't have an internet connection\n", + "# Uncomment and run this line if you don't have an Internet connection\n", "# hcg7_center = SkyCoord(9.81625*u.deg, 0.88806*u.deg, frame='icrs')" ] }, From e4eda2c5a0a240c62dab2ee93aa50cc2e45494d9 Mon Sep 17 00:00:00 2001 From: Kris Stern Date: Wed, 27 Feb 2019 04:45:38 +0800 Subject: [PATCH 02/10] Update coordinates.ipynb to pass Travis CI --- tutorials/notebooks/coordinates/coordinates.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tutorials/notebooks/coordinates/coordinates.ipynb b/tutorials/notebooks/coordinates/coordinates.ipynb index 69b3db62b..e906c6534 100644 --- a/tutorials/notebooks/coordinates/coordinates.ipynb +++ b/tutorials/notebooks/coordinates/coordinates.ipynb @@ -30,6 +30,7 @@ "from astropy import units as u\n", "from astropy.coordinates import SkyCoord\n", "from astropy.table import Table\n", + "from astropy.utils import data\n", "import numpy as np\n", "from IPython.display import Image" ] @@ -123,7 +124,8 @@ }, "outputs": [], "source": [ - "hcg7_center = SkyCoord.from_name('HCG 7')\n", + "data.conf.remote_timeout = 60\n", + "hcg7_center = SkyCoord.from_name('hcg7')\n", "hcg7_center" ] }, From 33e7281a684ced3f2149dd85f270cd3d7295f8b4 Mon Sep 17 00:00:00 2001 From: Kris Stern Date: Sun, 10 Mar 2019 23:13:54 +0800 Subject: [PATCH 03/10] Update FITS-images.ipynb to pass Circle CI --- tutorials/notebooks/FITS-images/FITS-images.ipynb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tutorials/notebooks/FITS-images/FITS-images.ipynb b/tutorials/notebooks/FITS-images/FITS-images.ipynb index 26417273c..f37cc11e1 100755 --- a/tutorials/notebooks/FITS-images/FITS-images.ipynb +++ b/tutorials/notebooks/FITS-images/FITS-images.ipynb @@ -10,7 +10,10 @@ "Lia Corrales\n", "\n", "## Learning Goals\n", - "- TODO\n", + "1. Learn how to FITS files and load the image data\n", + "2. Learn how to view the image data and get basic statistics\n", + "3. Learn about basic image math: image stacking\n", + "4. Learn how to write image data to a FITS file\n", "\n", "## Keywords\n", "matplotlib, FITS image, table\n", @@ -39,7 +42,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The following cell is needed to download the example FITS files used here." + "The following cell is needed to download the example FITS files used here. Note the caching can be turned on by setting to True." ] }, { @@ -49,7 +52,7 @@ "outputs": [], "source": [ "from astropy.utils.data import download_file\n", - "image_file = download_file('http://data.astropy.org/tutorials/FITS-images/HorseHead.fits', cache=True )" + "image_file = download_file('http://data.astropy.org/tutorials/FITS-images/HorseHead.fits', cache=False )" ] }, { @@ -293,7 +296,7 @@ "source": [ "base_url = 'http://data.astropy.org/tutorials/FITS-images/M13_blue_{0:04d}.fits'\n", "\n", - "image_list = [download_file(base_url.format(n), cache=True) \n", + "image_list = [download_file(base_url.format(n), cache=False) \n", " for n in range(1, 5+1)]\n", "image_concat = [fits.getdata(image) for image in image_list]" ] From 2482869fb1f49a3ce0fc5cc5d835b07e60d700af Mon Sep 17 00:00:00 2001 From: Kris Stern Date: Sun, 10 Mar 2019 23:20:18 +0800 Subject: [PATCH 04/10] Update FITS-tables.ipynb to pass Circle CI --- tutorials/notebooks/FITS-tables/FITS-tables.ipynb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tutorials/notebooks/FITS-tables/FITS-tables.ipynb b/tutorials/notebooks/FITS-tables/FITS-tables.ipynb index 035f7fcbf..fba8241e7 100755 --- a/tutorials/notebooks/FITS-tables/FITS-tables.ipynb +++ b/tutorials/notebooks/FITS-tables/FITS-tables.ipynb @@ -10,7 +10,9 @@ "Lia Corrales\n", "\n", "## Learning Goals\n", - "- TODO\n", + "- Learn how to open the FITS file and view table contents\n", + "- Learn how to make a 2-D histogram with some table data", + "- Learn how to close the FITS file after use\n", "\n", "## Keywords\n", "table, file input/output, matplotlib, FITS table\n", @@ -69,8 +71,9 @@ "metadata": {}, "outputs": [], "source": [ + "# Caching can be turned on by setting to True if desired.\n", "event_filename = download_file('http://data.astropy.org/tutorials/FITS-tables/chandra_events.fits', \n", - " cache=True)" + " cache=False)" ] }, { From c9a1542ac059fee68a34df675320824590381a86 Mon Sep 17 00:00:00 2001 From: Kris Stern Date: Sun, 10 Mar 2019 23:21:14 +0800 Subject: [PATCH 05/10] Add missing \n in TODO list of FITS-tables.ipynb --- tutorials/notebooks/FITS-tables/FITS-tables.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/notebooks/FITS-tables/FITS-tables.ipynb b/tutorials/notebooks/FITS-tables/FITS-tables.ipynb index fba8241e7..43a16d7bf 100755 --- a/tutorials/notebooks/FITS-tables/FITS-tables.ipynb +++ b/tutorials/notebooks/FITS-tables/FITS-tables.ipynb @@ -11,7 +11,7 @@ "\n", "## Learning Goals\n", "- Learn how to open the FITS file and view table contents\n", - "- Learn how to make a 2-D histogram with some table data", + "- Learn how to make a 2-D histogram with some table data\n", "- Learn how to close the FITS file after use\n", "\n", "## Keywords\n", From 54b7a858d838688245caaf59a638c7bdffe9b31b Mon Sep 17 00:00:00 2001 From: Kris Stern Date: Sun, 10 Mar 2019 23:28:00 +0800 Subject: [PATCH 06/10] Update UVES.ipynb to pass Circle CI --- tutorials/notebooks/UVES/UVES.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/notebooks/UVES/UVES.ipynb b/tutorials/notebooks/UVES/UVES.ipynb index 4daa4200a..175ed0f21 100644 --- a/tutorials/notebooks/UVES/UVES.ipynb +++ b/tutorials/notebooks/UVES/UVES.ipynb @@ -70,7 +70,7 @@ "import tarfile\n", "from astropy.utils.data import download_file\n", "url = 'http://data.astropy.org/tutorials/UVES/data_UVES.tar.gz'\n", - "f = tarfile.open(download_file(url, cache=True), mode='r|*')\n", + "f = tarfile.open(download_file(url, cache=False), mode='r|*') # Caching can be turned on by setting to True.\n", "working_dir_path = '.' # CHANGE TO WHEREVER YOU WANT THE DATA TO BE EXTRACTED\n", "f.extractall(path=working_dir_path)" ] From 0ea5ae476c2c31aa32092a9084e12eb2e7faff7f Mon Sep 17 00:00:00 2001 From: Kris Stern Date: Sun, 10 Mar 2019 23:35:45 +0800 Subject: [PATCH 07/10] Update quantities.ipynb to add TODO list items --- tutorials/notebooks/quantities/quantities.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tutorials/notebooks/quantities/quantities.ipynb b/tutorials/notebooks/quantities/quantities.ipynb index e829d9742..283966e00 100755 --- a/tutorials/notebooks/quantities/quantities.ipynb +++ b/tutorials/notebooks/quantities/quantities.ipynb @@ -10,7 +10,9 @@ "Ana Bonaca, Erik Tollerud, Jonathan Foster\n", "\n", "## Learning Goals\n", - "* TODO\n", + "* Use Quantity objects to estimate a hypothetical galaxy's mass\n", + "* Use Quantity objects such as data cubes to facilitate a full derivation of the total mass of a molecular cloud\n", + "* Write functions that take Quantity objects instead of raw numbers or arrays\n", "\n", "## Keywords\n", "units, matplotlib, radio astronomy, data cubes\n", From 4491c3e6e2a4f2a325b6aaead0b0e67676d1d90d Mon Sep 17 00:00:00 2001 From: Kris Stern Date: Sun, 10 Mar 2019 23:40:39 +0800 Subject: [PATCH 08/10] Update synthetic-images.ipynb to pass Circle CI --- .../notebooks/synthetic-images/synthetic-images.ipynb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tutorials/notebooks/synthetic-images/synthetic-images.ipynb b/tutorials/notebooks/synthetic-images/synthetic-images.ipynb index dbafc8bbc..6ca0d3a22 100755 --- a/tutorials/notebooks/synthetic-images/synthetic-images.ipynb +++ b/tutorials/notebooks/synthetic-images/synthetic-images.ipynb @@ -75,9 +75,10 @@ "metadata": {}, "outputs": [], "source": [ + "# Caching can be turned on by setting to True if desired.\n", "file_i = download_file(\n", " 'http://data.astropy.org/tutorials/synthetic-images/synchrotron_i_lobe_0700_150MHz_sm.fits', \n", - " cache=True)\n", + " cache=False)\n", "hdulist = fits.open(file_i)\n", "hdulist.info()\n", "\n", @@ -415,13 +416,13 @@ "source": [ "file_q = download_file(\n", " 'http://data.astropy.org/tutorials/synthetic-images/synchrotron_q_lobe_0700_150MHz_sm.fits', \n", - " cache=True)\n", + " cache=False)\n", "hdulist = fits.open(file_q)\n", "hdu_q = hdulist['NN_EMISSIVITY_Q_LOBE_150.0MHZ']\n", "\n", "file_u = download_file(\n", " 'http://data.astropy.org/tutorials/synthetic-images/synchrotron_u_lobe_0700_150MHz_sm.fits', \n", - " cache=True)\n", + " cache=False)\n", "hdulist = fits.open(file_u)\n", "hdu_u = hdulist['NN_EMISSIVITY_U_LOBE_150.0MHZ']\n", "\n", From 90473b8573d6f41701a47c0f6fa02b966a5f75a5 Mon Sep 17 00:00:00 2001 From: Kris Stern Date: Sun, 10 Mar 2019 23:46:14 +0800 Subject: [PATCH 09/10] Update units-and-integration.ipynb to capitalize main points of TODO list --- .../units-and-integration/units-and-integration.ipynb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tutorials/notebooks/units-and-integration/units-and-integration.ipynb b/tutorials/notebooks/units-and-integration/units-and-integration.ipynb index ac9ef4320..0071f08c0 100755 --- a/tutorials/notebooks/units-and-integration/units-and-integration.ipynb +++ b/tutorials/notebooks/units-and-integration/units-and-integration.ipynb @@ -10,14 +10,14 @@ "Zach Pace, Lia Corrales\n", "\n", "## Learning Goals\n", - "* perform numerical integration in the `astropy` and scientific python context\n", + "* Perform numerical integration in the `astropy` and scientific python context\n", " * trapezoidal approximation\n", " * gaussian quadrature\n", - "* use `astropy`'s built-in black-body curves\n", - "* understand how `astropy`'s units interact with one another\n", - "* write a mini Python class\n", + "* Use `astropy`'s built-in black-body curves\n", + "* Understand how `astropy`'s units interact with one another\n", + "* Write a mini Python class\n", " * how the `__call__` method works\n", - "* add $\\LaTeX$ labels to `matplotlib` figures using the `latex_inline` formatter\n", + "* Add $\\LaTeX$ labels to `matplotlib` figures using the `latex_inline` formatter\n", "\n", "## Keywords\n", "OOP, LaTeX, astrostatistics, matplotlib, modeling, units\n", From f4c6c67df990dd6f9f54f59a0389fc89504b3455 Mon Sep 17 00:00:00 2001 From: Kris Stern Date: Mon, 11 Mar 2019 03:00:32 +0800 Subject: [PATCH 10/10] Add "scipy" to units-and-integration keywords list --- .../notebooks/units-and-integration/units-and-integration.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/notebooks/units-and-integration/units-and-integration.ipynb b/tutorials/notebooks/units-and-integration/units-and-integration.ipynb index 0071f08c0..d02a2f832 100755 --- a/tutorials/notebooks/units-and-integration/units-and-integration.ipynb +++ b/tutorials/notebooks/units-and-integration/units-and-integration.ipynb @@ -20,7 +20,7 @@ "* Add $\\LaTeX$ labels to `matplotlib` figures using the `latex_inline` formatter\n", "\n", "## Keywords\n", - "OOP, LaTeX, astrostatistics, matplotlib, modeling, units\n", + "OOP, LaTeX, astrostatistics, matplotlib, modeling, units, scipy\n", "\n", "## Companion Content\n", "* http://synphot.readthedocs.io/en/latest/\n",