register_fits

image_registration.FITS_tools.register_fits(fitsfile1, fitsfile2, errfile=None, return_error=True, register_method=<function chi2_shift_iterzoom>, return_cropped_images=False, return_shifted_image=False, return_header=False, sigma_cut=None, **kwargs)[source]

Determine the shift between two FITS images using the cross-correlation technique. Requires montage or hcongrid.

kwargs are passed to register_method()

Parameters:
fitsfile1: str

Reference fits file name

fitsfile2: str

Offset fits file name

errfilestr [optional]

An error image, intended to correspond to fitsfile2

register_methodfunction

Can be any of the shift functions in image_registration. Defaults to chi2_shift_iterzoom()

return_errors: bool

Return the errors on each parameter in addition to the fitted offset

return_cropped_images: bool

Returns the images used for the analysis in addition to the measured offsets

return_shifted_images: bool

Return image 2 shifted into image 1’s space

return_headerbool

Return the header the images have been projected to

quiet: bool

Silence messages?

sigma_cut: bool or int

Perform a sigma-cut before cross-correlating the images to minimize noise correlation?

Returns:
xoff,yoff(float,float)

pixel offsets

xoff_wcs,yoff_wcs(float,float)

world coordinate offsets

exoff,eyoff(float,float) (only if return_errors is True)

Standard error on the fitted pixel offsets

exoff_wcs,eyoff_wcs(float,float) (only if return_errors is True)

Standard error on the fitted world coordinate offsets

proj_image1, proj_image2(ndarray,ndarray) (only if return_cropped_images is True)

The images projected into the same coordinates

shifted_image2ndarray (if return_shifted_image is True)

The second image projected and shifted to match image 1.

headerpyfits.Header (only if return_header is True)

The header the images have been projected to