prev next
 

Tutorials

All of the tutorials for the class will be posted here as we assign them. The basic principle behind the tutorials is that they are fairly intensive, but well defined (and of course we will be around to help with any questions). In addition, some tutorials have a "bonus" component that need not be completed, but can be an additional source of practice to anyone endeavouring to really master the concepts being taught.

If you consult the syllabus, you will see that tutorials are worth 50% of your grade (towards earning a P). The main portion of the tutorials are designed to be completed in about an hour, the length of the tutorial meeting. The homework each week will essentially be to finish whatever portion of the tutorial you dont finish during the lab period. Our aim is to reward those who are actively trying their best to learn, so as long as you are asking for help and showing up for class, you should have no problem getting your percentage for your work.

Tutorial Turn In

Tutorial turn ins have been moved to BCOURSES.

Tutorial 1

This weeks tutorial is a basic one on variables, datatypes, and unix. Download the ipython notebook template here and complete it!NOTE: Don't click the link; right click and say "save as..." and then choose to save it to your computer as an .ipynb file.

Tutorial 2

Tutorial 2 is focused on the basics of loading a data file (a spectrum) into python, performing some array manipulations, and plotting it. The homework is focused on writing a script with text-entry to solve a mathematical equation.

Access the Tutorial

Neon spectrum file (save the txt to your computer in the same directory as the python script you are working on).

Tutorial 3

This tutorial focuses on using loops, conditionals, and functions on real data for the purpose of analysis. We will be calculating the centroids (center of mass) for the peaks of a neon spectrum.

Note: ocf doesn't allow for files to be easily "downloaded". When the txt opens in a new tab, you can use ctrl-a, ctrl-c,ctrl-v to select, copy, and paste it into a notepad like app to save it as a txt on your computer. (If you have canopy open, you can paste into the canopy editor and save as a txt from there).

Access the Tutorial

Neon Spectrum

Tutorial 4

This tutorial concerns performing best fit lines to data!

Tutorial 6

This tutorial is a look at functions.

Tutorial 7: Classes