find_optimal_celestial_wcs

reproject.mosaicking.find_optimal_celestial_wcs(input_data, frame=None, auto_rotate=False, projection='TAN', resolution=None, reference=None)[source]

Given one or more images, return an optimal WCS projection object and shape.

This currently only works with 2-d images with celestial WCS.

Parameters:
input_data : iterable

One or more input datasets to include in the calculation of the final WCS. This should be an iterable containing one entry for each dataset, where a single dataset is one of:

frame : str or BaseCoordinateFrame

The coordinate system for the final image (defaults to the frame of the first image specified)

auto_rotate : bool

Whether to rotate the header to minimize the final image area (if True, requires shapely>=1.6 to be installed)

projection : str

Three-letter code for the WCS projection

resolution : Quantity

The resolution of the final image. If not specified, this is the smallest resolution of the input images.

reference : SkyCoord

The reference coordinate for the final header. If not specified, this is determined automatically from the input images.

Returns:
wcs : WCS

The optimal WCS determined from the input images.

shape : tuple

The optimal shape required to cover all the output.