to_header

grizli.utils.to_header(wcs, add_naxis=True, relax=True, key=None)[source]

Modify astropy.wcs.WCS.to_header to produce more keywords

Parameters:
wcs : WCS

Input WCS.

add_naxis : bool

Add NAXIS keywords from WCS dimensions

relax : bool

Passed to WCS.to_header(relax=).

key : str

See to_header.

Returns:
header : Header

Output header.