webbpsf_ext.coords.dist_image

webbpsf_ext.coords.dist_image(image, pixscale=None, center=None, return_theta=False)[source]

Pixel distances

Returns radial distance in units of pixels, unless pixscale is specified. Use the center keyword to specify the position (in pixels) to measure from. If not set, then the center of the image is used.

return_theta will also return the angular position of each pixel relative to the specified center

Parameters
  • image (ndarray) – Input image to find pixel distances (and theta).

  • pixscale (int, None) – Pixel scale (such as arcsec/pixel or AU/pixel) that dictates the units of the output distances. If None, then values are in units of pixels.

  • center (tuple) – Pixel location (x,y) in the array calculate distance. If set to None, then the default is the array center pixel.

  • return_theta (bool) – Also return the angular positions as a 2nd element.