sub_image

sub_image(im: Image, shape)[source]

Subsection an image to desired shape, cutting equally from all edges

Appropriate for standard 4D image with axes (freq, pol, y, x). Only works in y, x

The wcs crpix is adjusted appropriately.

Parameters:
  • im – Image to be padded

  • shape – Shape in 4 dimensions

Returns:

Padded image