I was trying to find a calculator for Clebsch-Gordan tables online the other day, but couldn’t find anything that produced tables of a nicely printable format.
This post was ported from my old blog. The code is extremely long in the tooth, but it still works, and has very few dependencies.
In particular, I was looking for something that provided output like these tables. As a result, I was forced to write my own, which gave me some decent experience in working with the Python Imaging Library (PIL). After a little bit of playing around, I was able to produce tables that looked decently similar.
It makes tables like these:
Anyway, I figured that people might find the script useful, so I’ve decided to upload it. It requires Python 2.5. You will also need the PIL installed in order to use this. Just run the program like
and follow the onscreen instructions. The script should be fairly easily adaptable to other applications as well (for instance if you wanted to modify it to write to a spreadsheet instead or something), you’ll just need to add a new render method to the tableWedge class.
I DO NOT guarantee the accuracy of the outputted values, although I’ve tested it against all the values of the linked page above, and it seemed to work fine. Please let me know if you find any issues and I’ll try to fix them.
Yes, I’m aware of the recursion relations that can be used to calculate these values. I decided against using them to calculate the coefficients though because I think it would make the code far more complex, not to mention, computing power is cheap. I was able to calculate a table for 13/2 X 13/2 in just a few seconds.