More PEP8 fixes and comments
Pixel perturbation is now 0.5, for a more accurate calculation of exactly how
much padding to add.
Added a comment about the try/except block that catches malfunctions in
the _get_pixel_distance routines.  Also added a warning emit, so that
the try/catch at least says something if it is triggered.