reproject_interp¶

reproject.
reproject_interp
(input_data, output_projection, shape_out=None, hdu_in=0, order=u'bilinear', independent_celestial_slices=False)[source]¶ Reproject data to a new projection using interpolation (this is typically the fastest way to reproject an image).
Parameters: input_data : str or
HDUList
orPrimaryHDU
orImageHDU
or tupleThe input data to reproject. This can be:
 The name of a FITS file
 An
HDUList
object  An image HDU object such as a
PrimaryHDU
,ImageHDU
, orCompImageHDU
instance  A tuple where the first element is a
ndarray
and the second element is either aWCS
or aHeader
object
output_projection :
WCS
orHeader
shape_out : tuple, optional
If
output_projection
is aWCS
instance, the shape of the output data should be specified separately.hdu_in : int or str, optional
If
input_data
is a FITS file or anHDUList
instance, specifies the HDU to use.order : int or str, optional
The order of the interpolation (if
mode
is set to'interpolation'
). This can be either one of the following strings: ‘nearestneighbor’
 ‘bilinear’
 ‘biquadratic’
 ‘bicubic’
or an integer. A value of
0
indicates nearest neighbor interpolation.independent_celestial_slices : bool, optional
This can be set to
True
for ndimensional input in the following case (all conditions have to be fulfilled): The number of pixels in each noncelestial dimension is the same between the input and target header.
 The WCS coordinates along the noncelestial dimensions are the same between the input and target WCS.
 The celestial WCS component is independent from other WCS coordinates.
In this special case, we can make things a little faster by reprojecting each celestial slice independently using the same transformation.
Returns: array_new :
ndarray
The reprojected array
footprint :
ndarray
Footprint of the input array in the output array. Values of 0 indicate no coverage or valid values in the input image, while values of 1 indicate valid values.