full_spectrum_wcsheader

grizli.utils.full_spectrum_wcsheader(center_wave=14000.0, dlam=40, NX=100, spatial_scale=1, NY=10)[source]

Make a WCS header for a 2D spectrum

Parameters:
center_wave : float

Wavelength of the central pixel, in Anstroms

dlam : float

Delta-wavelength per (x) pixel

NX, NY : int

Number of x & y pixels. Output will have shape (2*NY, 2*NX).

spatial_scale : float

Spatial scale of the output, in units of the input pixels

Returns:
header : Header

Output WCS header

wcs : WCS

Output WCS

Examples

>>> from grizli.utils import make_spectrum_wcsheader
>>> h, wcs = make_spectrum_wcsheader()
>>> print(wcs)
WCS Keywords
Number of WCS axes: 2
CTYPE : 'WAVE'  'LINEAR'
CRVAL : 14000.0  0.0
CRPIX : 101.0  11.0
CD1_1 CD1_2  : 40.0  0.0
CD2_1 CD2_2  : 0.0  1.0
NAXIS    : 200 20