Edward Brown edited numerical-analysis.tex  about 9 years ago

Commit id: f1f6b1f123e0e3e262d832f88cca91e441f58f18

deletions | additions      

       

\subsection{Introduction of numerical analysis}  Students do their lab work and occasionalin-class  exercises during lecture  using \ipython\ notebooks. There are several reasons for adopting Python: the Python programming language:  it is widely used in astronomy and other STEM disciplines; it is easy to learn but it supports complex programming; it has powerful libraries---\href{http://www.numpy.org/}{numpy}, \href{http://www.scipy.org/}{scipy}, and \href{http://matplotlib.org/}{matplotlib}---for numerical analysis and plotting; and the \ipython\ notebooks are relatively platform-independent.\footnote{To ensure a standard working environment, we require the students to install (using \href{https://www.virtualbox.org/}{VirtualBox}) a virtual machine running Ubuntu Linux with the \href{https://store.continuum.io/cshop/anaconda/}{Anaconda Python} distribution. Given the broad cross-platform distribution of \href{https://store.continuum.io/cshop/anaconda/}{Anaconda Python}, we may drop the usage of virtual machines in subsequent editions of this course.} Figure~\ref{fig:sample-datasets} illustrates an in-class exercise, given in lecture, that uses an \ipython\ notebook. The students use the notebook to generate fake datsets, some of which have outliers or incorrect errorbars. The students then compute $\chi^2$ for those datasets and answer questions about their findings. When finished, the students upload their notebooks to a course dropbox for grading. The notebook used to make Fig.~\ref{fig:sample-datasets} is available from the online version of this document. To try the notebook, move the cursor over the figure and click on the \verb|Launch Ipython| link that appears below the figure. Occasionally the page fails to load if the server is busy; if that happens, simply reload the page.