ImageMath is part of PIL (http://www.pythonware.com/library/pil/handbook/imagemath.htm).  You will see on line 162 I use it to divide by 16.0 and then convert to 8bit greyscale.

Also note that the validation code at the end will not technically be true since I only handle MSB_INTEGER for 16 bit images at this point.  So I should probably fix that as well.