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_wavefloat
Wavelength of the central pixel, in Anstroms
- dlamfloat
Delta-wavelength per (x) pixel
- NX, NYint
Number of x & y pixels. Output will have shape
(2*NY, 2*NX)
.- spatial_scalefloat
Spatial scale of the output, in units of the input pixels
- Returns
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