translate_limits

Stoner.Image.imagefuncs.translate_limits(im, translation, reverse=False)[source]

Find the limits of an image after a translation.

After using ImageArray.translate some areas will be black, this finds the max area that still has original pixels in

Parameters

translation – 2-tuple the (x,y) translation applied to the image

Keyword Arguments

reverse (bool) – whether to reverse the translation vector (default False, no)

Returns

limits

4-tuple

(xmin,xmax,ymin,ymax) the maximum coordinates of the image with original information