By the way Barney, when you get here, I think you'll appreciate this function.  I cribbed the starting point for this from the analysis you did for im3shape.  But I found a more efficient way to get g1,g2 after getting scale and theta.

Also, I recommend going through wcs.py before fitswcs.py, which is backwards of the order github displays them (alphabetical).