Skip to content
8 changes: 5 additions & 3 deletions tutorials/notebooks/Coordinates-Intro/Coordinates-Intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -78,15 +79,16 @@
"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')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-info\">\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",
"</div>"
]
},
Expand All @@ -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')"
]
},
Expand Down
11 changes: 7 additions & 4 deletions tutorials/notebooks/FITS-images/FITS-images.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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."
]
},
{
Expand All @@ -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 )"
]
},
{
Expand Down Expand Up @@ -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]"
]
Expand Down
7 changes: 5 additions & 2 deletions tutorials/notebooks/FITS-tables/FITS-tables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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\n",
"- Learn how to close the FITS file after use\n",
"\n",
"## Keywords\n",
"table, file input/output, matplotlib, FITS table\n",
Expand Down Expand Up @@ -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)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorials/notebooks/UVES/UVES.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
]
Expand Down
4 changes: 3 additions & 1 deletion tutorials/notebooks/coordinates/coordinates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down Expand Up @@ -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"
]
},
Expand Down
4 changes: 3 additions & 1 deletion tutorials/notebooks/quantities/quantities.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 4 additions & 3 deletions tutorials/notebooks/synthetic-images/synthetic-images.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
"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",
"OOP, LaTeX, astrostatistics, matplotlib, modeling, units, scipy\n",
"\n",
"## Companion Content\n",
"* http://synphot.readthedocs.io/en/latest/\n",
Expand Down