reproject_exact¶
-
reproject.reproject_exact(input_data, output_projection, shape_out=None, hdu_in=0, parallel=True, return_footprint=True)[source]¶ Reproject data to a new projection using flux-conserving spherical polygon intersection (this is the slowest algorithm).
Parameters: - input_data : str or
HDUListorPrimaryHDUorImageHDUor tuple The input data to reproject. This can be:
- The name of a FITS file
- An
HDUListobject - An image HDU object such as a
PrimaryHDU,ImageHDU, orCompImageHDUinstance - A tuple where the first element is a
ndarrayand the second element is either aWCSor aHeaderobject
- output_projection :
WCSorHeader The output projection, which can be either a
WCSor aHeaderinstance.- shape_out : tuple, optional
If
output_projectionis aWCSinstance, the shape of the output data should be specified separately.- hdu_in : int or str, optional
If
input_datais a FITS file or anHDUListinstance, 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. IfFalse, a serial implementation is chosen. If the flag is a positive integerngreater than one, a parallel implementation usingnprocesses is chosen.- return_footprint : bool
Whether to return the footprint in addition to the output array.
Returns: - input_data : str or