reproject_exact¶
- reproject.reproject_exact(input_data, output_projection, shape_out=None, hdu_in=0, parallel=False, return_footprint=True)[source]¶
Reproject data to a new projection using flux-conserving spherical polygon intersection (this is the slowest algorithm).
- Parameters:
- input_data
The input data to reproject. This can be:
The name of a FITS file
An
HDUList
objectAn image HDU object such as a
PrimaryHDU
,ImageHDU
, orCompImageHDU
instanceA tuple where the first element is a
ndarray
and the second element is either aWCS
or aHeader
objectAn
NDData
object from which the.data
and.wcs
attributes will be used as the input data.
- output_projection
WCS
orHeader
The output projection, which can be either a
WCS
or aHeader
instance.- shape_outtuple, optional
If
output_projection
is aWCS
instance, the shape of the output data should be specified separately.- hdu_inint or str, optional
If
input_data
is a FITS file or anHDUList
instance, specifies the HDU to use.- parallelbool 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. IfFalse
, a serial implementation is chosen. If the flag is a positive integern
greater than one, a parallel implementation usingn
processes is chosen.- return_footprintbool
Whether to return the footprint in addition to the output array.
- Returns: