welcome to the course webpage for

Computation in the Physical Sciences

Take your Question to the next level with high level computational open source programming language: Python! Students begin with the basics of coding in the first few days: variables, loops and functions. Students will learn critical practices to carry out a computational project from beginning to end, including code modularization, readability and re-use, as well as version control to organize their coding projects and collaborate effectively. Ultimately, students will use these tools to analyze their own datasets in a term project. For preparation, students will work through a sample dataset from a radioactive isotope decay experiment together as a class. Skills will be taught via a combination of live-coding sessions and work-along sessions. Think of it as a guided three hour hackathon each day of the block.

Syllabus here.

Academic 1/320, Quest University, Squamish, BC, Canada October 26 - November 18, 2015

Tutor: Tiffany Timbers, office: AC 405

Fork me on GitHub


required course textbook:

Effective Computation in Physics

by Kathryn Huff & Anthony Scopatz

This textbook can be purchased online and as an ebook here.

Before each class, please read the corresponding textbook chapter. The tentative topic schedule for the block is listed on the syllabus. A more up-to date schedule will be posted below. In class we will review some, but not all textbook material.

Reading Schedule

2015-10-26 The Command Line Chapter 1 & Noble, 2009
2015-10-27 Version Control Chapter 15 & Chapter 16
2015-10-28 Introduction to Python Chapter 2 & 3
2015-10-29 Control Flow and Functions Chapter 4 & 5
2015-10-30 Loading and Manipulating Data Chapter 7
2015-11-02 More munging data Chapter 7
2015-11-03 Visualizing data Chapter 7
2015-11-04 Basic statistics in Python
2015-11-05 Regular Expressions Chapter 8
2015-11-06 Writing Python scripts Software Carpentry
2015-11-09 Version Control 2
2015-11-10 Debugging and Testing Chapter 17 & 18
2015-11-11 Building Pipelines and Software Chapter 14
2015-11-12 Publication Chapter 20
2015-11-13 Using Remote Machines


Assignments will consist of applying the material learned in class to the students final project. A detailed list of assignments and assignment expectations will be provided on the first day of class. Assignment grading will be broken down as 40% for the planning and documentation of how the problem will be solved, 20% for how accurate the code is, 20% for how reusable the code is, and 20% for how readable the code is. In other words, code that does not work can get a maximum of 40%.

Assignments are due 12:00 noon on the day indicated!

Assignment 1 can be submitted to me via email.

All other assignment submission will be via Github.

Assignment # Due Date Topic
1 2015-10-27 Organizing & setting up a project directory
2 2015-10-28 Versioning
3 2015-10-29 Solving problems in Python 1
4 2015-10-30 Solving problems in Python 2
5 2015-11-03 Analyzing data
6 2015-11-04 Visualizing data
7 2015-11-05 Basic statistics in Python
8 2015-11-06 Regular expressions
9 2015-11-11 Writing scripts in Python
10 2015-11-13 Debugging and Testing
Code Review

Group Code Review

Group Code Review will be done in preassigned small groups of ~ 3-4 and facilitated by the tutor. Students will share the code that they have recently written for their final project, along with a written plan about what the code is supposed to do. The other students will read the shared plan and code, and then make comments and/or edits on it and submit these suggestions to the student who wrote the code via a pull request. The following day in class, each student will be given 5 minutes to share their most important piece of feedback on the code with the group. All participants will be expected to follow a strict code of conduct. The assessment for the group code review will be 20% for the 10 minute plan for your code, 60% for written comments on others code, and 20% for oral discussion of feedback on others code.

Important dates:

Date Item
2015-11-09 Ten minute plan due
2015-11-10 Pull requests due & in-class code review
2015-11-11 Updated ten minute plan due
2015-11-12 Pull requests due & in-class code review
2015-11-13 Updated ten minute plan due
2015-11-16 Pull requests due & in-class code review
Final Project

Final Project

Student’s final Project topic will be decided on in the first week and ideally fall under the umbrella of the student’s question. This will be done in consultation with the tutor. Students will work on the project over the duration of the course, applying what they learned in each class to their project with the daily assignments. Students will also be given 6 hours of in-class time to work on the final project at the end of the course. During these in class work-along sessions, students are encouraged to consult the tutor and each other for help when needed. The project will be done under version control and submitted as a repository to Github. This assessment will consist of a proposal (5%), the code and public repository (45%), a final written report (25%), and a 10 minute Jupyter notebook presentation of the project (25%).

Need some inspiration for your proposal? Find some here.

Important dates:

Date Item
2015-11-02 Final project proposal due
2015-11-18 Code, final report and final presentations due


IMPORTANT! Self-service centre is now correct, classes will be held in the afternoons from 1-4 pm in Academic 320.

IMPORTANT! October 28 Class time changed to 2 - 5pm.