15 minute break
Easist ways to obtain are:
Anaconda (2.0) http://continuum.io/downloads
The above includes astropy 0.3.2
To update that version to 0.4rc1 (at the OS shell level):
conda install astropy=0.4rc1
IPython Notebook is the basis for tutorial material
To obtain the notebooks used for this tutorial, and the associated data, download:
http://bit.ly/astropy-scipy2014 (~30 MB zip file)
The notebook files themselves can be found under the notebooks/
subdirectory of that zip file. The associated data files are under notebooks/data
. Many of the examples references data files with relative filenames like data/<filename>
, launch ipython from within the notebooks/
directory for best results in resolving filenames.
In general, we will supply enough exercises to fill everyone's time. Depending on background and experience, some will only get the first part or two done; some will get further. The exercises generally increase in sophistication and difficulty. Few will finish all.
For the introduction, the exercises are mainly to see that everything is working and installed on your computer
Open the second tutorial session (Unit_Conversion.ipynb). Execute a few code cells
# example code cell
x = 2**10
print x
Create a new cell and try the following imports
import numpy as np
import astropy.units as u
import astropy.io.fits as iof
import astropy.wcs as wcs
import astropy.io.ascii as ioa
import astropy.coordinates as coord
import astropy.time as time
import matplotlib.pyplot as plt
IF any of these don't work, ask for help with checking your installation.
Try executing the following commands within an ipython notebook cell (requires downloading data files and unpacking. Run these commands from the directory that the files are in):
# assumes above imports have been done
hdus = iof.open('data/msx.fits')
plt.imshow(hdus[0].data, vmax=0.0003, origin='lower')
Write a python function to compute the first 10**100 primes in 5 minutes. Select the most interesting one.