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 (MxNxKfirst 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_alignedisTrue.- shiftsndarray
1D vector of three elements in the case of 2D input
targetimage of (xshift,yshift,beta) values from LSQ optimization (seealign_fourier_lsq()for details) for each slice in thetargetarray.