find_optimal_celestial_wcs#
- reproject.mosaicking.find_optimal_celestial_wcs(input_data, hdu_in=None, frame=None, auto_rotate=False, projection='TAN', resolution=None, reference=None, negative_lon_cdelt=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_dataiterable
One or more input data specifications to include in the calculation of the final WCS. This should be an iterable containing one entry for each specification, where a single data specification is one of:
The name of a FITS file as a
stror apathlib.PathobjectAn
HDUListobjectAn image HDU object such as a
PrimaryHDU,ImageHDU, orCompImageHDUinstanceA tuple where the first element is an Numpy array shape tuple and the second element is either a
BaseLowLevelWCS,BaseHighLevelWCS, or aHeaderobjectA tuple where the first element is a
ndarrayand the second element is either aBaseLowLevelWCS,BaseHighLevelWCS, or aHeaderobjectAn
NDDataobject from which the.dataand.wcsattributes will be used as the input data.A
BaseLowLevelWCSobject witharray_shapeset or aBaseHighLevelWCSobject whose underlying low level WCS object hasarray_shapeset.
If only one input data needs to be provided, it is also possible to pass it in without including it in an iterable.
- hdu_inint or str, optional
If
input_datais a FITS file or anHDUListinstance, specifies the HDU to use.- framestr or
BaseCoordinateFrame The coordinate system for the final image (defaults to the frame of the first image specified).
- auto_rotatebool
Whether to rotate the header to minimize the final image area (if
True, requires shapely>=1.6 to be installed).- projectionstr
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.
- negative_lon_cdeltbool or str, optional
Whether the CDELT value for the longitude coordinate should be negative (
True) or positive (False), or determined automatically ('auto'). For astronomical observations of the sky CDELT is usually negative, while for coordinate systems used in solar physics this is usually positive. If this is'auto', the value will beTrueif the first four characters for CTYPE for the longitude isRA--,GLON,ELON,HLON, orSLON, andFalseotherwise. The default is currentlyTrue, and will become'auto'in future.
- Returns:
- wcs
WCS The optimal WCS determined from the input images.
- shapetuple
The optimal shape required to cover all the output.
- wcs