diff --git a/tutorials/notebooks/Spectral-FITS-Data/Spectral-FITS-Data.ipynb b/tutorials/notebooks/Spectral-FITS-Data/Spectral-FITS-Data.ipynb index 1fba594d4..f60a24266 100644 --- a/tutorials/notebooks/Spectral-FITS-Data/Spectral-FITS-Data.ipynb +++ b/tutorials/notebooks/Spectral-FITS-Data/Spectral-FITS-Data.ipynb @@ -64,7 +64,10 @@ "\n", "from specutils import Spectrum1D\n", "\n", - "%matplotlib inline" + "%matplotlib inline\n", + "\n", + "# Set tutorial path for data files\n", + "tutorial_path = ''" ] }, { @@ -83,7 +86,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "catalog_name = 'J/ApJS/212/1/wisecat'\n", @@ -104,7 +109,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "catalog_sample = catalog_sample_list[0]\n", @@ -136,7 +143,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "#Lift the row limit for the astroquery Vizier class\n", @@ -160,7 +169,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "#Delete extra columns of information we don't need\n", @@ -182,7 +193,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "#Create SkyCoord objects of the coordinates\n", @@ -215,25 +228,38 @@ "## Download and visualize the WHAM all-sky map\n", "\n", "An integrate FITS image of this survey is available online at [http://www.astro.wisc.edu/wham/ss/wham-ss-DR1-v161116-170912-int-grid.fits](http://www.astro.wisc.edu/wham/ss/wham-ss-DR1-v161116-170912-int-grid.fits). We can download this file directly and plot it, overlaying our identified HII region positions. \n", - "\n" + "\n", + "For ease of use - this file is also available through this tutorial directly, so we can download the file from there.\n" ] }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ - "#Download the wham integrate FITS image\n", + "'''\n", + "# Download the wham integrated FITS image from the UW-Madison host\n", + "\n", "wham_image_file = download_file(\n", " 'http://www.astro.wisc.edu/wham/ss/wham-ss-DR1-v161116-170912-int-grid.fits',\n", - " cache=True, show_progress = True)" + " cache=True, show_progress = True)\n", + "'''\n", + "\n", + "#Download the wham integrated FITS image\n", + "wham_image_file = download_file(tutorialpath + \n", + " 'wham-ss-DR1-v161116-170912-int-grid.fits',\n", + " cache=True, show_progress = True)" ] }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Open the FITS file for reading\n", @@ -253,7 +279,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Access and store the data and header\n", @@ -284,7 +312,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Initiate a matplotlib figure object\n", @@ -328,7 +358,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''\n", @@ -374,6 +406,9 @@ "## Examine the WHAM Kinematic Data\n", "\n", "The data is available as a FITS Table and can be downloaded directly from [http://www.astro.wisc.edu/wham/ss/wham-ss-DR1-v161116-170912.fits](http://www.astro.wisc.edu/wham/ss/wham-ss-DR1-v161116-170912.fits) and read in as an astropy Table. \n", + "\n", + "Once again for ease of use, this file is also available through this tutorial so we can download by just referring to the filename `wham-ss-DR1-v161116-170912.fits` with `tutorial_path + 'wham-ss-DR1-v161116-170912.fits'\n", + "\n", "\n", "### Exercise 2: Download the survey file to cache open it to display some info\n", "\n", @@ -387,7 +422,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "'''\n", @@ -395,14 +432,9 @@ "'''\n", "\n", "# Download the Kinematic Data Table\n", - "wham_data_file = download_file('http://www.astro.wisc.edu/wham/ss/wham-ss-DR1-v161116-170912.fits',\n", - " cache=True, show_progress = True)\n", - " \n", - "'''\n", - "Using a local file for now to make my life easy as I write this without an internet connection...\n", - "\n", - "wham_data_file = '/Volumes/DK_Storage/Data/wham/wham-ss-DR1-v161116-170912.fits'\n", - "'''\n", + "wham_data_file = download_file(tutorial_path + \n", + " 'wham-ss-DR1-v161116-170912.fits',\n", + " cache=True, show_progress = True)\n", "\n", "# Open the FITS file for reading\n", "wham_data_hdu = fits.open(wham_data_file)" @@ -411,7 +443,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Display some basic information on the FITS image file\n", @@ -428,7 +462,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# View the Primary Header\n", @@ -438,7 +474,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# View the Table Header\n", @@ -455,7 +493,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "wham_data_hdu[1].columns" @@ -471,7 +511,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "#Read in data as a Table\n", @@ -519,7 +561,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "wham_data" @@ -555,7 +599,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Match our catalogs\n", @@ -577,7 +623,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Create a sub Table of the WHAM matched data\n", @@ -598,7 +646,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Construct a new Table from the two existing Tables\n", @@ -653,7 +703,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Calculate H-Alpha rest wavelength\n", @@ -710,7 +762,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Function to convert H-Alpha intensity to an Emission Measure\n", @@ -765,7 +819,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Display our final Table\n", @@ -793,7 +849,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Write data to file \n", @@ -915,7 +973,9 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Initiate a matplotlib figure object\n", @@ -960,8 +1020,9 @@ "outputs": [], "source": [ "# Download the Kinematic Data Table\n", - "wham_data_file = download_file('http://www.astro.wisc.edu/wham/ss/wham-ss-DR1-v161116-170912.fits',\n", - " cache=True, show_progress = True)\n", + "wham_data_file = download_file(tutorial_path + \n", + " 'wham-ss-DR1-v161116-170912.fits',\n", + " cache=True, show_progress = True)\n", "\n", "# Open the FITS file for reading\n", "wham_data_hdu = fits.open(wham_data_file)"