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

The link below will take you to a script where you can upload your finished tutorial/homework files for us to grade. You have to be logged into CALNET to be able to upload your files. Please enter your name as it appears on telebears, and choose a filename with your name in it (we instruct you to do this in the tutorials themselves). If you have multiple files to upload, please zip, rar, or tar your files before uploading.

Tutorial 1

Tutorial one is really short and easy to ease everyone into things. You can download the pdf for it below, and when you have followed the instructions and created an output file, you can turn it in at the link above.

Access the Tutorial

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).

Solutions for Tutorial 2

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

Solutions for Tutorial 3

Tutorial 4

This tutorial concerns performing best fit lines to data!

Tutorial 5

This tutorial is on imaging in python.

Tutorial 6

This tutorial is a look at functions.

Tutorial 7: Classes

MYO Pokemon game using classes.

Tutorial 7.5: Extra credit

A brief look at 2D Spectra extraction

Acess the Tutorial

Folder with the solar spec fits file (Same download format as before)(If you don't have pyfits load the img from the backup solar txt).