reproject_exact

reproject.reproject_exact(input_data, output_projection, shape_out=None, hdu_in=None, parallel=True)[source]

Reproject data to a new projection using flux-conserving spherical polygon intersection (this is the slowest algorithm).

Parameters:

input_data : str or HDUList or PrimaryHDU or ImageHDU or tuple

The input data to reproject. This can be:

output_projection : WCS or Header

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

shape_out : tuple, optional

If output_projection is a WCS 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 an HDUList instance, specifies the HDU to use.

parallel : bool or int

Flag for parallel implementation. If True, a parallel implementation is chosen, the number of processes selected automatically to be equal to the number of logical CPUs detected on the machine. If False, a serial implementation is chosen. If the flag is a positive integer n greater than one, a parallel implementation using n processes is chosen.

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. Intermediate values indicate partial coverage.