project_to_header

FITS_tools.project_to_header(fitsfile, header, use_montage=True, quiet=True, **kwargs)[source] [edit on github]

Light wrapper of montage with hcongrid as a backup

kwargs will be passed to hcongrid if use_montage==False

Parameters:

fitsfile : string

a FITS file name

header : Header

A fits Header instance with valid WCS to project to

use_montage : bool

Use montage or hcongrid (based on map_coordinates)

quiet : bool

Silence Montage’s output

Returns:

image : ndarray

image projected to header’s coordinates