I’m looking for feedback on my computational physics course

Overview

This will be my first course in which I use some flavour of standards-based grading. This will also be the first time I have taught a computational physics course (or more accurately a computational thinking for physicists course). I do have some experience helping students develop some computational thinking skills from my Advanced Lab course, but I have never taught a full course dedicated to this topic. Fun!

The idea is that I will be getting them to work in Python and Mathematica in parallel. My main purpose behind this is to help the students see the platform-agnostic computational thinking which underlies their their computational tasks. A side benefit is that I can help Python and Mathematica put aside their differences and work toward a common goal.

This course will be based around a weekly cycle of

  • Basic tasks, to be completed in both the Mathematica and Python computing environments; and
  • Intermediate and advanced tasks, to be completed using either of the computing environments.
These tasks will be framed to the students as one, but not the only way that they can show proficiency for a standard or set of standards. I know that a handful of people coming into the course already have some experience working with Mathematica and I look forward to them collecting their previous work to start knocking off standards.

The grading part of SBG

Students will earn marks for each of the content standards and their final grade will come from points earned by demonstrating appropriate mastery of these standards. I will give the students example tasks that correlate to the standards, but the students will always have the option of performing any computational task that they wish that shows appropriate mastery of the standards.

Approximately 2/3rds of the way through the course, the students will start working on a project which models a complex physical system. I have two standards associated with this project (a physics one and a communication one) and I am planning to either weight these standards more heavily than the others or make them into a set of more fine-grained standards. I really haven’t decided on this.

Assessing an individual standard

I plan to assess each standard on a 0-4 scale. I’m not in love with my use of the term “completed” below when discussing tasks, but the idea is that the most important thing to me is that their programs do exactly what they are meant to do.

I think that I will be allowing students to partner up which means that I need a mechanism to assess the individual beyond just a working (and properly commented) program. I think that the individual assessment will be for them to orally run me through their properly working program. Students will be given the option of submitting screencasts to do this, but not all students will have access to a computer that has both a mic and Mathematica so I will need to keep the in-person explanations as a method.

Here’s a rough outline of how I plan to assess an individual standard, where each

  • 4 – Exceeds expectations (student must make the case that they have exceeded expectations or have successfully completed an advanced task)
  • 3 – Meets expectations (student has completed the relevant intermediate tasks or otherwise demonstrated intermediate-level mastery in either environment)
  • 2 – Approaches expectations (student has completed the relevant basic tasks or otherwise demonstrated basic-level mastery in both environments)
  • 1 – Doesn’t meet expectations (student has completed the relevant basic task or otherwise demonstrated basic-level mastery in one of the environments)
  • 0 – Not yet assessed
Notes/caveats

  • Environment is the general term to describe either Mathematica or Python.
  • Program is the general term to describe a Python program/script or a Mathematica notebook.
  • To get a 3 or 4 you need to have shown proficiency at the 2 level (basic) for both environments. If basic proficiency is only shown for one environment, the score on that standard is reduced by 1.
  • To be eligible for reassessments, a 1 must be earned on a given standard within the first two weeks of the standard being opened.
  • Right now the connections to physics are not built in, but that is in the long-term goals for the course.

Very loose weekly plans

We will spend roughly one week on each of the following broad themes.

  1. Introduction to the environment (functions, variable types)
  2. Iteration basics and animation (introductory modeling: similar to the early Matter and Interactions VPython stuff)
  3. File input/output, basics array manipulation and case structures
  4. Advanced list/array operations and manipulation
  5. Data visualization and plotting (histograms, scatter-plots, bar charts, error bars, etc)
  6. Data analysis (basic statistical analyses, fitting)
  7. Solving complex algebraic equations, integration and differentiation
  8. Solving differential equations

After the students have started working on their projects we will spend less than half of our class time working on non-project topics.

  1. Introduction to the physics modeling project
  2. Monte Carlo methods
  3. Numerical methods
  4. Linear algebra
  5. FFTs

The standards

These standards are based on a collection of computational physics learning goals that were put together by Andy Rundquist, Danny Caballero and Phil Wagner. I then went around to all the faculty in my own department and asked them what skills they would like to see the students develop as part of this course and folded the common ones in.

There are some standards marked as “[ungraded]”. The idea with these is that they are things which do not seem to be worth assessing for one reason or another, but are things that I still want to highlight for the students as being important.

Onto the standards…

  1. Environment fundamentals
    1. [ungraded] I can use online and built-in help resources
  2. Computer algebra fundamentals
    1. I can represent and perform common operations with complex numbers and vectors.
    2. I can use built-in integration and differentiation functions. This includes using assumptions for integration.
    3. I can access mathematical and physical constants or define these constants globally when not available.
    4. I can solve algebraic equations. This includes simplifying algebraic results and using a root finder. I can use graphical or other techniques to set appropriate neighborhoods for the root finder.
  3. Programming fundamentals
    1. [ungraded] I can assign and clear variables.
    2. I can write and use robust functions. The important characteristics of a robust function are (1) that they need no access to parameters outside of those which they were passed; (2) they are written such that they can easily be copied into any script or notebook and be used as intended; and (3) they can return information in the form of single parameters, vectors, arrays or other useful objects.
    3. I can use at least two different iteration methods to accomplish the same task.
    4. I can use case structures.
  4. Arrays and lists
    1. I can manipulate and slice arrays/lists. Slicing an array means to pick out columns or rows from larger arrays. Manipulation of an array includes transposing the array, replacing elements, and adding columns/rows to existing arrays
    2. [The wording needs work on this one] I can operate on entire arrays/lists instead of having to operate on the individual elements of the array/list.
  5. Numerical techniques
    1. I can write my own code (not call existing functions) to perform numerical integration with varying levels of precision (Trapezoidal rule, Simpson rule)
  6. Solving differential equations
    1. I can solve ODEs (1st Order, 2nd Order and Coupled) analytically. I can determine if an analytic solution exists.
    2. I can solve ODEs numerically. I can set initial conditions and the domain of the solution.
    3. I can solve a Partial Differential Equation and specify the boundary conditions appropriately.
  7. Data manipulation, input and output
    1. I can import data from a text file which has a standard format (e.g., comma-separated or tab-separated values).
    2. I can export data to a text file which has a standard format.
    3. I can filter and sort data.
  8. Plotting data, quantities and functions
    1. I can plot 1D and 2D continuous functions and discrete data. This includes being able to superimpose multiple plots on the same canvas (e.g., visual comparisons between data and models).
    2. I can use graphical solutions to solve problems, such as simultaneous equations problems.
    3. I can modify the important parameters needed to make a graph “nice”. This includes setting axis limits, adding axis labels, changing line or point styles, making semi-log and log-log plots, plotting error bars.
    4. I can create and interpret 2D, 3D, and density/image/false-colour plots.
    5. I can create vector-field plots.
    6. I can plot solutions to ODEs and PDEs.
  9. Data Analysis
    1. I can compute the average, standard deviation, median, etc., of a data set.
    2. I can fit a model (function) to data using weighted and unweighted chi-square minimization. I can extract the best fit parameters and their errors. I can use reduced chi-square and the scatter of the residuals to evaluate the “goodness of fit”.
    3. I can perform a Fast Fourier Transform (FFT). This includes being able to account for the Nyquist frequency, normalization of the FFT, converting a FFT into a power spectrum or spectral density and performing an inverse FFT.
  10. Monte-Carlo methods
    1. I can use Monte-Carlo methods to model systems which involve random processes.
    2. I can use Monte-Carlo methods to perform error propagation.
    3. I can use Monte-Carlo methods to perform integration
  11. Animation
    1. I can animate a physical system.
  12. Linear algebra
    1. I can perform typical matrix operations such as addition, multiplication, transposition, etc.
    2. I can find eigenvalues and eigenvectors.
    3. I can perform matrix decomposition and reduction
  13. Mathematica-specific standards
    1. [ungraded] The “/.” command.
    2. I can use the Manipulate command.
    3. I can use patterns as part of recursion and case.
  14. Documentation (Portfolio-based: the student must choose and submit their three best examples for each documentation standard)
    1. I can document the use of a function. This is specific to only the details of what goes in and out of the function, not the nuts and bolts of what the function does.
    2. I can use sectioning and big-picture documentation to communicate the overall use of a program as well highlighting and describing the purpose of the major sections of the program.
    3. I can use documentation to clearly explain how a complex chunk of code (such as a function) works.
  15. Project [these are to be expanded into multiple or more heavily weighted standards]
    1. I can model a complicated physical system.
    2. I can write an effective project report using LaTeX.

Some issues with the above standards

  1. Some of the linear algebra stuff overlaps with some of the computer algebra stuff (vectors and matrices).
  2. I would like the standards to be similar in scope to each other, but they are nowhere near that right now.

The feedback I am looking for

I would love to hear any and all feedback you might have, either in the comments below, or you can comment on a google-docs version of this post that I made publicly commentable. Some specific things I have in mind are…

What are the most important or least important standards on the list? If you have any opinions on which ones seem less essential or which ones seem absolutely essential, I would love to hear about it.

How can I improve my proposed assessment of the standards? Do you have any suggestions for alternate ways of assessing the standards at the individual level for work done by a group in this context?

Not this round

I have a very heavy teaching load in the fall (3 new-to-me upper-division courses) so I am trying to figure out appropriately sized chunks of ambition for each. I have lots of ideas for each course, but there is no way that I am going to find the time to do a decent job of everything I have in mind. With that in mind, you will notice that there is no emphasis on sense-making or interpretation in the standards or in the way the standards are assessed. I think Danny Caballero and colleagues are doing some fantastic work with this at CU, and I really want to fold these thing into the course in the future, but for this round these are going to have to be things that I bring up repeatedly in class, but don’t explicitly build into the course. Baby steps Ives. Baby steps.

Advertisements

11 Comments on “I’m looking for feedback on my computational physics course”

  1. bretbenesh says:

    Hi Joss,

    Using both Python and Mathematica is either genius or a disaster waiting to happen. For this course, I am guessing to is more the former.

    How many students do you expect to be enrolled?
    Bret

    • Andy "SuperFly" Rundquist says:

      Pessimist, here: I think it might be the latter. Given the list of standards, quite a few of them are going to be much easier in Mathematica than python. Python’s biggest advantage is cost, but that’s clearly not an issue for these students. Take ODE’s. To do it in python, depending on the package, you likely have to convert the equation into multiple single derivative versions, declare your time steps, etc. In MMA, it’s one command. Now, don’t get me wrong, I think they learn a lot doing it the python way. However, if they see how MMA lets them cut corners, they might jump at it. One approach to help that is to have some standards be such that they’re much easier to demonstrate with python. I think the numeric integration standard (with the various rules you’d like them to try) is a good example of that.

      • Joss Ives says:

        Gents.

        The class is currently sitting at 13 and probably won’t increase by more than a few by the time the fall term actually starts.

        Andy makes some really good points. Honestly I am expecting that most students will use MMA to tackle the more challeging stuff, but that’s AOK by me. We will work through the basic tasks using both environments so that can see that you can accomplish the task in either, but as Andy points out, it will often be much easier in one than the other. Most students will then take the easier choice to tackle the intermediate and above tasks. I will be delighted if I come out the other end of this course feeling that I helped them learn a meta-goal of picking the most appropriate tool for the task.

        Also, there are zero expectations that we have to make it through all the standards (which is why I am looking for feedback on where to trim the fat and what must be kept at all costs). The students with whom I have spoken have told me that they would prefer to take a cut in the course’s coverage in exchange for getting to learn to do things in both environments in parallel.

        I am excited to come out the other side of this course and get the student feedback that helps me decide if I should continue on with this model or scrap it and stick with one environment.

  2. Becca says:

    One thing I like about having students work in two different environments is that with just one environment it would be easy for them to start thinking, “oh, this class is just about Mathematica (or Python).” But really, the class is about computational *thinking*, and the thinking part is independent of whatever programming language you’re using. I would assume (or at least hope) that using two environments at once will help students focus more on the big picture ideas of what the code is trying to do and why, instead of focusing exclusively on the smaller details of how the specific language accomplishes those tasks.

    The number one thing I would think might be bad about using two languages is that students have twice as many opportunities to mess up the syntax/get lost in the details/get frustrated with unsuccessful debugging, which, if they get stuck in that for too long will probably detract from their learning. But I would think that you could make basic tasks that are sufficiently simple such that students won’t have too many problems implementing them, and then this won’t really be an issue. So my guess is that using two languages will be worth it.

    • Joss Ives says:

      Hi Becca,

      Your comments mirror my thinking on why using the two different environments is potentially worth it, and what the major possible issue would be. Before I had committed to doing it this way I discussed the idea with a handful of my students and they all thought that it would be great to learn to work in the two environments in parallel, so I already have some student buy-in which should help moderate some of the smaller roadbumps.

  3. I think your list of topics leans very heavily toward Mathematica. You also don’t mention what Python packages you will be using. numpy? scipy? matplotlib? … Your choice of packages makes a huge difference here.

    You might want to do some problems that are somewhat hard to model analytically, but straightforward numerically (like rigid pendulums that swing more than ±90°).

    I found simulating a water rocket to be quite challenging (see http://gasstationwithoutpumps.wordpress.com/2012/06/04/soda-bottle-rocket-simulation-take-2/
    )

    • Joss Ives says:

      I completely agree with you that the topics lean heavily toward Mathematica. For the most part they are doable in python, but easier in Mathematica (as Andy points out). As I mentioned, I put them together in consultation with a number of people in the context of “what computational abilities should your typical physics major have?” So they weren’t intended to be more Mathematica-friendly, it just happens that Mathematica is already a great platform for doing the things that my colleagues consider to be important general scientific computation skills.

      I really like the idea of straightforward numerically, but hard to model analytically. I don’t have a lot examples under my belt, so your suggestion is very much appreciated.

      • Look through the computational exercises at the end of each chapter of Matter and Interactions. They are often problems that are straight-forward numerically but challenging analytically.

      • Andy "SuperFly" Rundquist says:

        I don’t understand the argument that the numeric problems are easier in python compared with mma. Sure, you probably learn more doing it in python, but I’ve found even numeric problems to be much easier to do in Mathematica.

  4. Mathematica is expensive, Python is free. I think that you do students a major disservice if you only teach the expensive tools. I’ve no idea how easy or difficult numeric computations are in Mathematica, because I’ve never been willing to pay the license fee for it.

    The numeric computations are very easy in Python, so I don’t see how they could be much easier in Mathematica, though.

    • Andy "SuperFly" Rundquist says:

      Right, we’ve already covered the cost issues in lots of these conversations about python and Mathematica. I’m trying to help Joss do a great thing: teach them both without them just running to the easier one (since the school is paying the cost for them anyways). My point about the numeric approach is that it’s not a clear winner for python. Realizing what you’re doing at all stages, though, is likely easier in python, and that’s why I think Joss’s standards about coding various methods by hand is a really good idea. I’ve had students do that as well, in Mathematica, but I don’t do a good job of having them learn enough from that as I think I think I move too quickly into the packaged routines (most notably: NDSolve).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s