code: def pilscale(self, r):
          
          return r * float(self.upsamplefactor) / float(self.binfactor)
docs: Converts a "scale" (like an aperture radius) of the original array or FITS file to the current PIL coordinates.