align_array

jwst.coron.imageregistration.align_array(reference, target, mask=None, return_aligned=True)[source]

Compute shifts and realign target image to reference.

Shifts are computed between target image (or image “slices”) and the reference image and input target images are realigned to the reference image.

Parameters:
referencendarray

A 2D (NxK) reference image to which input images will be aligned.

targetndarray

A 2D (NxK) or 3D (MxNxK first index used to select slices) image(s) that need to be aligned to the reference image.

maskndarray or None

A 2D (NxK) image indicating pixels to ignore when performing the minimization. The masks acts as a weighting function in performing the fit.

return_alignedbool

Boolean that indicates whether the aligned image is returned.

Returns:
alignedndarray

The aligned image (2D or 3D image of the same shape as input target image). This is only returned if the input keyword returned_aligned is True.

shiftsndarray

1D vector of three elements in the case of 2D input target image of (xshift, yshift, beta) values from LSQ optimization (see align_fourier_lsq() for details) for each slice in the target array.