reproject_interp

reproject.reproject_interp(input_data, output_projection, shape_out=None, hdu_in=0, order='bilinear', output_array=None, return_footprint=True)[source]

Reproject data to a new projection using interpolation (this is typically the fastest way to reproject an image).

Parameters
input_data

The input data to reproject. This can be:

output_projectionWCS or Header

The output projection, which can be either a WCS or a Header instance.

shape_outtuple, optional

If output_projection is a WCS instance, the shape of the output data should be specified separately.

hdu_inint or str, optional

If input_data is a FITS file or an HDUList instance, specifies the HDU to use.

orderint or str, optional

The order of the interpolation. This can be any of the following strings:

  • ‘nearest-neighbor’

  • ‘bilinear’

  • ‘biquadratic’

  • ‘bicubic’

or an integer. A value of 0 indicates nearest neighbor interpolation.

output_arrayNone or ndarray

An array in which to store the reprojected data. This can be any numpy array including a memory map, which may be helpful when dealing with extremely large files.

return_footprintbool

Whether to return the footprint in addition to the output array.

Returns
array_newndarray

The reprojected array

footprintndarray

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.