chi2n_map

image_registration.chi2_shifts.chi2n_map(im1, im2, err=None, boundary='wrap', nthreads=1, zeromean=False, use_numpy_fft=False, return_all=False, reduced=False)[source]
Parameters:
im1np.ndarray
im2np.ndarray

The images to register.

errnp.ndarray

Per-pixel error in image 2

boundary‘wrap’,’constant’,’reflect’,’nearest’

Option to pass to map_coordinates for determining what to do with shifts outside of the boundaries.

zeromeanbool

Subtract the mean from the images before cross-correlating? If no, you may get a 0,0 offset because the DC levels are strongly correlated.

nthreadsbool

Number of threads to use for fft (only matters if you have fftw installed)

reducedbool

Return the reduced \(\chi^2\) array, or unreduced? (assumes 2 degrees of freedom for the fit)

Returns:
chi2nnp.ndarray

the \(\chi^2\) array

term1float

Scalar, term 1 in the \(\chi^2\) equation

term2np.ndarray

Term 2 in the equation, -2 * cross-correlation(x/sigma^2,y)

term3np.ndarray | float

If error is an array, returns an array, otherwise is a scalar float corresponding to term 3 in the equation