===== Resources ===== ==== Python ==== Check your Python version if your numpy/scipy/matplotlib don't work. Here are a few links to Python tutorials. [[http://www.amazon.com/exec/obidos/ASIN/0596002815|Learning Python]], which we have as a real book in the lab, is also a good place to start. Otherwise: * [[http://www.greenteapress.com/thinkpython/thinkCSpy.pdf|How To Think Like a Computer Scientist: Learning With Python]]. Although you might not want to do that (i.e., think like a computer scientist) this is a very nice introduction to Python and to programming, if you want to start from the very basics. * More whimsical, much faster introductions for non-programmers: [[http://hetland.org/writing/instant-hacking.html|Instant Hacking]]; segue with [[http://hetland.org/writing/instant-python.html|Instant Python]]. * [[http://www.python.org/doc/current/tut/tut.html|Python Tutorial]] by Guido van Rossum, Python's author. A more standard introduction to Python for those who already program (a little) in other languages. In general, [[http://www.python.org]] is the place to go for all things Python (such as function and module reference, etc.) * [[http://www.diveintopython.net/toc/index.html|Dive Into Python]]. A fast introduction for the programmer, with comparisons to C, Java, and Visual Basic. Has the highest information/page ratio, but it might be too fast-paced for some. * [[http://www.leettips.org/2013/02/top-10-free-python-pdf-ebooks-download.html|10 best free python books]] There are tutorials, automatic competitions, clubs, secret societies, and communities of Python throughout the interwebs. If you can't find a subculture to match your level, style, and interests, then start your own. Students are encouraged to make use of existing libraries of commonly used functions rather than writing their own. In particular, numpy, scipy, and matplotlib enable Mathematica/Matlab functionality and feel. If matplotlib is not working, you're welcome to use GNUPlot, xmgrace, or any other equivalently user unfriendly plotting program. Or write your own. If you're having difficulty juggling dependencies on OSX (Apple products...) and getting nasty errors, you could try the [[https://github.com/fonnesbeck/ScipySuperpack|scipy superpack]], which purports to install the whole lot at once. Finally, for anyone looking to gain a complete command over a language, there are the [[http://projecteuler.net/problems|Euler Problems]]. ==== Unix/Linux ==== Linux is no longer an impressively obdurate seething mass of opaque code and bearded men living in their mum's basement. It now has a GUI. However, in order to understand why it remains the OS of choice for most numerical scientists (bearded or no), and to understand the intense humour of this slightly bizarre subculture, it is necessary to attain fluency. Here's a few Linux/Unix tutorials that you might find useful: - This [[http://www.tldp.org/LDP/intro-linux/html|Introduction to Linux]] and especially its [[http://www.tldp.org/LDP/intro-linux/html/sect_02_02.html|Absolute Basics]]. - This RedHat-specific [[http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/getting-started-guide/|intro]]. - [[http://www.tldp.org/LDP/Bash-Beginners-Guide/html/index.html|On bash]], which is the shell you should be using once you figure out what a shell really is. Right now, you probably have tcsh: to change it, do ''ypchsh'', give your password, and then ''/bin/bash''. Books on Linux may one day have value as collectors items. Today, online documentation is profuse and generally up-to-date. If in doubt, google " linux". === List of Computation Lab Computers (for sshing) === To connect remotely: run **ssh -Y [username]@[servername].caltech.edu** from a unix terminal (present by default on Linux and MacOS systems, but you'll need to install [[http://x.cygwin.com/|Cygwin/X]] on Windows). The -Y flag allows you to run graphical programs using the [[http://en.wikipedia.org/wiki/X_Window_System|X Window System]]. * lazirus * vorpal * white-knight * mad-hatter * queen-of-hearts * bandersnatch * dodgson * cheshire-cat * boojum ==== LaTeX ==== LaTeX is //the// lingua franca of scientific discourse, and proficiency is assumed. We require you to write your report with LaTeX. To start with, check Overleaf [[https://www.overleaf.com|here]]. You can also write and compile LaTeX codes on your laptop. A quickstart guide to LaTeX from the command line in Unix type systems (Ok, LINUX!) can be found [[http://ringlord.com/latex-to-pdf-howto.html|here]], and includes a few templates to get you started. In addition, Python and LaTeX can be made to interact in interesting and potentially time-saving ways. For instance, if you have a document with figures generated by some code, it's possible to have the code automatically update the figures in a directory each time the code is run, and to recompile the LaTeX document. This approach enables rapid changes in code and can expedite the process of document revision. LaTeX can be written in Emacs or any other text editor, and compiled from the command line. A quick reference for equations and figures (its main strength) is the [[http://en.wikibooks.org/wiki/LaTeX|relevant wikibook]]. ==== Graphing ==== Although students are required to demonstrate ability with open-source graphing packages such as matplotlib, gnuplot, xmgrace, or g, the sometimes spartan nature of their GUI (if any) is no excuse for morally emaciated graphs. Graphical design is an integral part of science communication, which in turn is the life-blood of the research community. A thorough knowledge of LaTeX formatting and graphical design ability is assumed knowledge in anyone with a degree in science who intends to use it. The global authority on the graphical presentation of quantitative information is Edward Tufte, whose lifelong crusade for informational clarity and density has produced multiple books and even more headaches, summarises his ethos with 'simple design, intense content'. A more thorough exposition of his principles of design can be found [[http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCwQFjAA&url=http%3A%2F%2Fieg.ifs.tuwien.ac.at%2F~gschwand%2Fteaching%2Finfovis_ue_ws10%2Fdownload%2FPrinciples%2520of%2520Graphical%2520Excellence.pdf&ei=jhhwUr7BMMShiQKxqIGQDg&usg=AFQjCNFHigbVqOCTXLoDTnPrr1Lw2x-gAg&sig2=FCBx4P2g9h9akQ3gX0Ni0g&bvm=bv.55617003,d.cGE&cad=rja|here]], and is well worth the 3 minutes it will take to read. Plotting programs eliminate the hours of drafting and plotting common in times past, but this should be an aid to revision and perfection rather than a hindrance. As the courses progress we expect to see an improvement in all areas of scientific computing, including communication and presentation. Tufte's books are also available from the library or the TAs, though are somewhat longer reads! A seminar course run by an ex TA of this course (Michele Vallisneri) on Friday afternoon in Cahill on scientific computing has now had past lectures summarized and put on the internet. [[http://www.vallis.org/salon/summary-5.txt|Here]] is the one that concerns graphing nicely, and [[http://www.vallis.org/salon|here]] is the root directory with all the archived emails available. ===== Readings and Assignments ===== Assignments are due by midnight on the due date listed on the course website. For submission, please include your codes and a report written with LaTex. All assignments can also be found on these ([[http://pmaweb.caltech.edu/~physlab/|Ph20/21/22]]) pages. In case of confusion, inconsistent dates and pending updates, these websites represent the correct information. ^ Ph 20 (Winter 2019) |||| ^ Week of ^ Reading List ^ Assignment ^ Due Date ^ | Jan 7 | [[20.1]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_20_current/Ph20_1_Intro_to_Python.pdf|Introduction to Python]] | Jan 18 | | Jan 14 | [[20.2]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_20_current/Ph20_2_Numerical_Intro.pdf|Introduction to Numerical Techniques]] | Jan 25 | | Jan 21 | [[20.3]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_20_current/Ph20_3_ODEs.pdf|Numerical Solution of Differential Equations]] | Feb 8| | Feb 4 | [[20.4]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_20_current/Ph20_4_Unix_Tools.pdf|Unix Tools: Shell, Version Control, Makefiles]] | Feb 22 | | Feb 18 | [[20.5]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_20_current/Ph20_5_Introduction_to_Mathematica.pdf|Introduction to Symbolic Computing in Mathematica]] | Mar 1 | | Feb 25 | [[20.6]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_20_current/Ph20_6_Numerical_Mathematica.pdf|Numerical Computation in Mathematica]] | Mar 8 | | Mar 4 | [[20.7]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_20_current/Ph20_7_Crypto.pdf|To be updated]] | Mar 13 | ^ Ph 21 (Winter 2019) |||| ^ Week of ^ Reading List ^ Assignment ^ Due Date ^ | Jan 7 |[[21.1]] |[[http://www.pmaweb.caltech.edu/~physlab/lab_21_current/Ph21_1_Strings_and_Webs.pdf|Strings and webs]] | Jan 17/18 | | Jan 14 |[[21.2]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_21_current/Ph21_2_Time_Freq.pdf|Fourier Techniques]] | Jan 31/ Feb 1 | | Jan 28 |[[21.3]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_21_current/Ph21_3_Image.pdf|Image processing]] | Feb 14/15 | | Feb 11 |[[21.4]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_21_current/Ph21_4a_Bayesian_Analysis.pdf|Bayesian Analysis]] | Feb 21/22 | | Feb 18 |[[21.5]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_21_current/Ph21_4b_MCMC.pdf|Markov chain Monte Carlo]] | Feb 28/ Mar 1 | | Feb 25 |[[21.6]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_21_current/Ph21_5_Covariance_PCA.pdf|Principal Component Analysis]] | Mar 7/ Mar 8 | ^ Ph 22 (Spring 2019) |||| ^ Week of ^ Reading List ^ Assignment ^ Due Date ^ | Mar 31 | [[22.0]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_22_current/Ph22_0_Finding_Roots.pdf|Finding Roots]] | Tuesday Apr 15 | | Apr 14 | [[22.1]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_22_current/Ph22_1_ODEs.pdf|ODEs, higher order methods]] |Tuesday Apr 29 | | Apr 28 | [[22.2]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_22_current/Ph22_2_Three_body.pdf|Three body problem]] |Tuesday May 6 | | May 5 | [[22.3]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_22_current/Ph22_3_Nbody_1.pdf|N-body Simulations]] | Tuesday May 13| | May 12 | [[22.4]] | [[http://www.pmaweb.caltech.edu/~physlab/lab_22_current/Ph22_4_Nbody_2.pdf| N-body using approximations]] | Tuesday June 2| [[Old Readings for defunct assignments]] ===== Acknowledgements ===== The text on this page and others is derived in part from the work of many previous TAs of this course, including Michele Vallisneri.